1 2018-06-27 Pedro Alves <palves@redhat.com>
3 * proc-service.c (get_ps_regcache): New.
4 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5 (ps_lsetfpregs): Use it.
7 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
10 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
11 (dwarf_decode_lines_1): Adjust.
13 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
15 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
17 <info_proc>: Likewise.
19 2018-06-26 Joel Brobecker <brobecker@adacore.com>
21 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
22 to windows_fetch_one_register, and only handle the case of
23 fetching one register. Move the code that reloads the context
24 and iterates over all registers if R is negative to...
25 (windows_nat_target::fetch_registers): ... here.
26 (do_windows_store_inferior_registers): Rename to
27 windows_store_one_register, and only handle the case of storing
28 one register. Move the code that handles the case where r is
30 (windows_nat_target::store_registers) ... here.
32 2018-06-26 Tom Tromey <tom@tromey.com>
35 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
36 * rust-lang.c (rust_print_struct_def): Add podata parameter.
38 (rust_internal_print_type): Add podata parameter.
39 (rust_print_type): Update.
41 2018-06-26 Tom Tromey <tom@tromey.com>
43 * typeprint.h (struct print_offset_data) <update, finish,
44 maybe_print_hole>: New methods.
45 <indentation>: New constant.
46 * typeprint.c (print_offset_data::indentation): Define.
47 (print_offset_data::maybe_print_hole, print_offset_data::update)
48 (print_offset_data::finish): Move from c-typeprint.c and rename.
49 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
50 (print_spaces_filtered_with_print_options): Update.
51 (c_print_type_union_field_offset, maybe_print_hole)
52 (c_print_type_struct_field_offset): Move to typeprint.c and
54 (c_type_print_base_struct_union): Update.
56 2018-06-25 Pedro Alves <palves@redhat.com>
58 * gdbthread.h (thread_info_ref, delete_thread)
59 (delete_thread_silent, first_thread_of_inferior)
60 (any_thread_of_inferior, switch_to_thread)
61 (enable_thread_stack_temporaries)
62 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
63 (get_last_thread_stack_temporary)
64 (value_in_thread_stack_temporaries, can_access_registers_thread):
65 Spell out "struct thread_info" instead of just "thread_info".
66 * inferior.h (notice_new_inferior): Likewise.
68 2018-06-25 Pedro Alves <palves@redhat.com>
70 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
71 pass thread_info pointer to delete_thread.
72 (windows_nat_target::detach): Pass inferior pointer to
74 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
76 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
77 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
78 and pass a thread_info pointer to delete_thread.
79 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
80 pass thread_info pointer to delete_thread.
81 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
82 delete_thread_silent call.
83 * procfs.c (procfs_target::detach): Pass inferior pointer to
85 (procfs_target::wait): Pass thread_info pointer to delete_thread.
86 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
87 delete_thread_silent call.
88 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
89 pass thread_info pointer to delete_thread.
90 (windows_nat_target::detach): Pass inferior pointer to
93 2018-06-22 Alan Hayward <alan.hayward@arm.com>
95 * regcache.c (readable_regcache::read_part): Fix asserts.
96 (reg_buffer::raw_collect_part): New function.
97 (regcache::write_part): Fix asserts.
98 (reg_buffer::raw_supply_part): New function.
99 (regcache::transfer_regset_register): New helper function.
100 (regcache::transfer_regset): Call new functions.
101 (regcache_supply_regset): Use gdb_byte*.
102 (regcache::supply_regset): Likewise.
103 (regcache_collect_regset): Likewise.
104 (regcache::collect_regset): Likewise.
105 * regcache.h (reg_buffer::raw_collect_part): New declaration.
106 (reg_buffer::raw_supply_part): Likewise.
107 (regcache::transfer_regset_register): Likewise.
108 (regcache::transfer_regset): Use gdb_byte*.
110 2018-06-22 Alan Hayward <alan.hayward@arm.com>
112 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
114 2018-06-21 Pedro Alves <palves@redhat.com>
116 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
117 instead of a ptid_t. All callers adjusted.
118 * ada-tasks.c (ada_get_task_number): Likewise. All callers
120 (print_ada_task_info, display_current_task_id, task_command_1):
122 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
124 (breakpoint_kind): Adjust.
125 (remove_breakpoints_pid): Rename to ...
126 (remove_breakpoints_inf): ... this. Adjust to take an inferior
127 pointer. All callers adjusted.
128 (bpstat_clear_actions): Use inferior_thread.
129 (get_bpstat_thread): New.
130 (bpstat_do_actions): Use it.
131 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
132 to take a thread_info pointer. All callers adjusted.
133 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
134 (breakpoint_re_set_thread): Use inferior_thread.
135 * breakpoint.h (struct inferior): Forward declare.
136 (bpstat_stop_status): Update.
137 (remove_breakpoints_pid): Delete.
138 (remove_breakpoints_inf): New.
139 * bsd-uthread.c (bsd_uthread_target::wait)
140 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
141 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
142 (maint_btrace_packet_history_cmd)
143 (maint_btrace_clear_packet_history_cmd): Adjust.
144 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
146 * cli/cli-interp.c: Include "inferior.h".
147 * common/refcounted-object.h (struct
148 refcounted_object_ref_policy): New.
149 * compile/compile-object-load.c: Include gdbthread.h.
150 (store_regs): Use inferior_thread.
151 * corelow.c (core_target::close): Use current_inferior.
152 (core_target_open): Adjust to use first_thread_of_inferior and use
153 the current inferior.
154 * ctf.c (ctf_target::close): Adjust to use current_inferior.
155 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
156 <thread>: ... this new field. All references adjusted.
157 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
158 Take a thread_info pointer instead of a ptid_t.
159 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
160 (dummy_frame_discard, register_dummy_frame_dtor): Take a
161 thread_info pointer instead of a ptid_t.
162 * elfread.c: Include "inferior.h".
163 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
165 * eval.c (evaluate_subexp): Likewise.
166 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
168 * gdb_proc_service.h (struct thread_info): Forward declare.
169 (struct ps_prochandle) <ptid>: Delete, replaced by ...
170 <thread>: ... this new field. All references adjusted.
171 * gdbarch.h, gdbarch.c: Regenerate.
172 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
173 'thread' parameter. All implementations and callers adjusted.
174 * gdbthread.h (thread_info) <set_running>: New method.
175 (delete_thread, delete_thread_silent): Take a thread_info pointer
177 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
178 (first_thread_of_process): Delete, replaced by ...
179 (first_thread_of_inferior): ... this new function. All callers
181 (any_live_thread_of_process): Delete, replaced by ...
182 (any_live_thread_of_inferior): ... this new function. All callers
184 (switch_to_thread, switch_to_no_thread): Declare.
185 (is_executing): Delete.
186 (enable_thread_stack_temporaries): Update comment.
187 <enable_thread_stack_temporaries>: Take a thread_info pointer
188 instead of a ptid_t. Incref the thread.
189 <~enable_thread_stack_temporaries>: Decref the thread.
192 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
193 (get_last_thread_stack_temporary)
194 (value_in_thread_stack_temporaries, can_access_registers_thread):
195 Take a thread_info pointer instead of a ptid_t. All callers
197 * infcall.c (get_call_return_value): Use inferior_thread.
198 (run_inferior_call): Work with thread pointers instead of ptid_t.
199 (call_function_by_hand_dummy): Work with thread pointers instead
200 of ptid_t. Use thread_info_ref.
201 * infcmd.c (proceed_thread_callback): Access thread's state
203 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
204 access thread's state directly.
205 (continue_command): Use inferior_thread.
206 (info_program_command): Use find_thread_ptid and access thread
208 (proceed_after_attach_callback): Use thread state directly.
209 (notice_new_inferior): Take a thread_info pointer instead of a
210 ptid_t. All callers adjusted.
211 (exit_inferior): Take an inferior pointer instead of a pid. All
213 (exit_inferior_silent): New.
214 (detach_inferior): Delete.
215 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
216 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
217 (detach_inferior_command, kill_inferior_command): Use
218 find_inferior_id instead of valid_gdb_inferior_id and
219 gdb_inferior_id_to_pid.
220 (inferior_command): Use inferior and thread pointers.
221 * inferior.h (struct thread_info): Forward declare.
222 (notice_new_inferior): Take a thread_info pointer instead of a
223 ptid_t. All callers adjusted.
224 (detach_inferior): Delete declaration.
225 (exit_inferior, exit_inferior_silent): Take an inferior pointer
226 instead of a pid. All callers adjusted.
227 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
228 (valid_gdb_inferior_id): Delete.
229 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
230 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
231 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
233 <inf>: ... this new field.
234 <step_ptid>: Delete, replaced by ...
235 <step_thread>: ... this new field.
236 (get_displaced_stepping_state): Take an inferior pointer instead
237 of a pid. All callers adjusted.
238 (displaced_step_in_progress_any_inferior): Adjust.
239 (displaced_step_in_progress_thread): Take a thread pointer instead
240 of a ptid_t. All callers adjusted.
241 (displaced_step_in_progress, add_displaced_stepping_state): Take
242 an inferior pointer instead of a pid. All callers adjusted.
243 (get_displaced_step_closure_by_addr): Adjust.
244 (remove_displaced_stepping_state): Take an inferior pointer
245 instead of a pid. All callers adjusted.
246 (displaced_step_prepare_throw, displaced_step_prepare)
247 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
248 All callers adjusted.
249 (start_step_over): Adjust.
250 (infrun_thread_ptid_changed): Remove bit updating ptids in the
251 displaced step queue.
252 (do_target_resume): Adjust.
253 (fetch_inferior_event): Use inferior_thread.
254 (context_switch, get_inferior_stop_soon): Take an
255 execution_control_state pointer instead of a ptid_t. All callers
257 (switch_to_thread_cleanup): Delete.
258 (stop_all_threads): Use scoped_restore_current_thread.
259 * inline-frame.c: Include "gdbthread.h".
260 (inline_state) <inline_state>: Take a thread pointer instead of a
261 ptid_t. All callers adjusted.
262 <ptid>: Delete, replaced by ...
263 <thread>: ... this new field.
264 (find_inline_frame_state): Take a thread pointer instead of a
265 ptid_t. All callers adjusted.
266 (skip_inline_frames, step_into_inline_frame)
267 (inline_skipped_frames, inline_skipped_symbol): Take a thread
268 pointer instead of a ptid_t. All callers adjusted.
269 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
270 (inline_skipped_frames, inline_skipped_symbol): Likewise.
271 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
273 * linux-nat.c (get_detach_signal): Likewise.
274 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
275 (thread_db_notice_clone): Adjust.
276 (thread_db_find_new_threads_silently)
277 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
278 a thread pointer instead of a ptid_t. All callers adjusted.
279 * mi/mi-cmd-var.c: Include "inferior.h".
280 (mi_cmd_var_update_iter): Update to use thread pointers.
281 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
283 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
285 (mi_output_running): ... this new function.
286 (mi_on_resume_1): Adjust to use it.
287 (mi_user_selected_context_changed): Adjust to use inferior_thread.
288 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
290 (interrupt_thread_callback): : Adjust to use thread and inferior
292 * proc-service.c: Include "gdbthread.h".
293 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
294 * progspace-and-thread.c: Include "inferior.h".
295 * progspace.c: Include "inferior.h".
296 * python/py-exitedevent.c (create_exited_event_object): Adjust to
297 hold a reference to an inferior_object.
298 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
300 * python/py-inferior.c (struct inferior_object): Give the type a
301 tag name instead of a typedef.
302 (python_on_normal_stop): No need to check if the current thread is
304 (inferior_to_inferior_object): Change return type to
305 inferior_object. All callers adjusted.
306 (find_thread_object): Delete, bits factored out to ...
307 (thread_to_thread_object): ... this new function.
308 * python/py-infthread.c (create_thread_object): Use
309 inferior_to_inferior_object.
310 (thpy_is_stopped): Use thread pointer directly.
311 (gdbpy_selected_thread): Use inferior_thread.
312 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
313 field, replaced with ...
314 <thread>: ... this new field. All users adjusted.
315 (btpy_insn_or_gap_new): Drop const.
316 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
318 * python/py-record.c: Include "gdbthread.h".
319 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
320 a ptid_t. All callers adjusted.
321 (gdbpy_current_recording): Use inferior_thread.
322 * python/py-record.h (recpy_record_object) <ptid>: Delete
323 field, replaced with ...
324 <thread>: ... this new field. All users adjusted.
325 (recpy_element_object) <ptid>: Delete
326 field, replaced with ...
327 <thread>: ... this new field. All users adjusted.
328 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
329 a ptid_t. All callers adjusted.
330 * python/py-threadevent.c: Include "gdbthread.h".
331 (get_event_thread): Use thread_to_thread_object.
332 * python/python-internal.h (struct inferior_object): Forward
334 (find_thread_object, find_inferior_object): Delete declarations.
335 (thread_to_thread_object, inferior_to_inferior_object): New
337 * record-btrace.c: Include "inferior.h".
338 (require_btrace_thread): Use inferior_thread.
339 (record_btrace_frame_sniffer)
340 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
341 (get_thread_current_frame): Use scoped_restore_current_thread and
343 (get_thread_current_frame): Use thread pointer directly.
344 (record_btrace_replay_at_breakpoint): Use thread's inferior
346 * record-full.c: Include "inferior.h".
347 * regcache.c: Include "gdbthread.h".
348 (get_thread_arch_regcache): Use the inferior's address space
350 (get_thread_regcache, registers_changed_thread): New.
351 * regcache.h (get_thread_regcache(thread_info *thread)): New
353 (registers_changed_thread): New.
354 (remote_target) <remote_detach_1>: Swap order of parameters.
355 (remote_add_thread): <remote_add_thread>: Return the new thread.
356 (get_remote_thread_info(ptid_t)): New overload.
357 (remote_target::remote_notice_new_inferior): Use thread pointers
359 (remote_target::process_initial_stop_replies): Use
360 thread_info::set_running.
361 (remote_target::remote_detach_1, remote_target::detach)
362 (extended_remote_target::detach): Adjust.
363 * stack.c (frame_show_address): Use inferior_thread.
364 * target-debug.h (target_debug_print_thread_info_pp): New.
365 * target-delegates.c: Regenerate.
366 * target.c (default_thread_address_space): Delete.
367 (memory_xfer_partial_1): Use current_inferior.
368 (target_detach): Use current_inferior.
369 (target_thread_address_space): Delete.
370 (generic_mourn_inferior): Use current_inferior.
371 * target.h (struct target_ops) <thread_address_space>: Delete.
372 (target_thread_address_space): Delete.
373 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
375 (delete_thread_1, delete_thread, delete_thread_silent): Take a
376 thread pointer instead of a ptid_t. Adjust all callers.
377 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
378 (first_thread_of_process): Delete, replaced by ...
379 (first_thread_of_inferior): ... this new function. All callers
381 (any_thread_of_process): Rename to ...
382 (any_thread_of_inferior): ... this, and take an inferior pointer.
383 (any_live_thread_of_process): Rename to ...
384 (any_live_thread_of_inferior): ... this, and take an inferior
386 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
387 (value_in_thread_stack_temporaries)
388 (get_last_thread_stack_temporary): Take a thread pointer instead
389 of a ptid_t. Adjust all callers.
390 (thread_info::set_running): New.
391 (validate_registers_access): Use inferior_thread.
392 (can_access_registers_ptid): Rename to ...
393 (can_access_registers_thread): ... this, and take a thread
395 (print_thread_info_1): Adjust to compare thread pointers instead
397 (switch_to_no_thread, switch_to_thread): Make extern.
398 (scoped_restore_current_thread::~scoped_restore_current_thread):
399 Use m_thread pointer directly.
400 (scoped_restore_current_thread::scoped_restore_current_thread):
402 (thread_command): Use thread pointer directly.
403 (thread_num_make_value_helper): Use inferior_thread.
404 * top.c (execute_command): Use inferior_thread.
405 * tui/tui-interp.c: Include "inferior.h".
406 * varobj.c (varobj_create): Use inferior_thread.
407 (value_of_root_1): Use find_thread_global_id instead of
408 global_thread_id_to_ptid.
410 2018-06-21 Alan Hayward <alan.hayward@arm.com>
412 * regcache.c (readable_regcache::read_part): Avoid memcpy when
414 (regcache::write_part): Likewise.
415 (readable_regcache::cooked_read_part): Update comment.
416 (readable_regcache::cooked_write_part): Likewise.
417 * regcache.h: (readable_regcache::read_part): Likewise.
418 (regcache::write_part): Likewise.
420 2018-06-21 Richard Bunt <richard.bunt@arm.com>
421 Dirk Schubert <dirk.schubert@arm.com>
423 * aarch64-linux-nat.c (post_attach): New.
424 (aarch64_linux_nat_target::post_attach): Override post_attach to
425 record the number of hardware debug registers.
427 2018-06-20 Tom Tromey <tom@tromey.com>
429 * python/py-param.c (add_setshow_generic): Make parameters const.
430 (parmpy_init): Update.
432 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
434 * regcache.h (regcache_cooked_read_ftype): Rename to...
435 (register_read_ftype): ...this, change type to function_view.
436 (class reg_buffer) <save>: Remove src parameter.
437 (readonly_detached_regcache) <readonly_detached_regcache>: Make
438 parameter non-const in first overload. Remove src parameter in
440 * regcache.c (do_cooked_read): Remove.
441 (readonly_detached_regcache::readonly_detached_regcache): Make
442 parameter non-const, adjust call to other constructor.
443 (reg_buffer::save): Remove src parameter.
444 * frame.c (do_frame_register_read): Remove.
445 (frame_save_as_regcache): Use lambda function.
446 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
447 parameter to ppu2spu_data *.
448 (ppu2spu_sniffer): Use lambda function.
450 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
452 * record-full.c (record_full_target::insert_breakpoint): Remove
453 "struct" keyword, add const.
455 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
457 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
458 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
459 * configure.ac: Remove AC_PREREQ, add missing quoting.
460 * gnulib/configure.ac: Modernize usage of
461 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
462 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
463 (AUTOMAKE_VERSION): Bump to 1.15.1.
464 * configure: Re-generate.
465 * config.in: Re-generate.
466 * aclocal.m4: Re-generate.
467 * gnulib/aclocal.m4: Re-generate.
468 * gnulib/config.in: Re-generate.
469 * gnulib/configure: Re-generate.
470 * gnulib/import/Makefile.in: Re-generate.
472 2018-06-19 Pedro Alves <palves@redhat.com>
474 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
475 (lookup_minimal_symbol_by_pc_section): ... here with
476 gdb_assert_not_reached added.
478 2018-06-19 Pedro Alves <palves@redhat.com>
480 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
481 parameter with a block parameter. Compare location's block symbol
482 with the frame's block instead of addresses.
483 (skip_inline_frames): Pass the current block instead of the
484 frame's address. Break out as soon as we determine the frame
485 should not be skipped.
487 2018-06-18 Tom Tromey <tom@tromey.com>
489 * solib-aix.c (solib_aix_get_section_offsets): Return
491 (solib_aix_solib_create_inferior_hook): Update.
493 2018-06-18 Tom Tromey <tom@tromey.com>
495 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
497 2018-06-18 Tom Tromey <tom@tromey.com>
499 * solib-frv.c (frv_relocate_main_executable): Use
501 * solib-dsbt.c (dsbt_relocate_main_executable): Use
504 2018-06-18 Tom Tromey <tom@tromey.com>
506 * objfiles.h (inhibit_section_map_updates): Update.
507 (resume_section_map_updates, resume_section_map_updates_cleanup):
509 * solib-svr4.c (svr4_handle_solib_event): Update.
510 * objfiles.c (inhibit_section_map_updates): Return
511 scoped_restore_tmpl<int>.
512 (resume_section_map_updates, resume_section_map_updates_cleanup):
515 2018-06-18 Tom Tromey <tom@tromey.com>
517 * valprint.h (read_string): Update.
518 * valprint.c (read_string): Change type of "buffer".
519 (val_print_string): Update.
520 * python/py-value.c (valpy_string): Update.
521 * language.h (struct language_defn) <la_get_string>: Change
523 (default_get_string, c_get_string): Update.
524 * language.c (default_get_string): Change type of "buffer".
525 * guile/scm-value.c (gdbscm_value_to_string): Update.
526 * c-lang.c (c_get_string): Change type of "buffer".
528 2018-06-18 Tom Tromey <tom@tromey.com>
530 * ser-mingw.c (struct pipe_state_destroyer): New.
531 (pipe_state_up): New typedef.
532 (cleanup_pipe_state): Remove.
533 (pipe_windows_open): Use pipe_state_up. Don't release argv.
535 2018-06-18 Tom Tromey <tom@tromey.com>
537 * rust-lang.h (rust_yyerror): Don't declare.
538 * rust-lang.c (rust_language_defn): Update.
539 * rust-exp.y (yyerror): Now static.
540 * parse.c (parse_exp_in_context_1): Update.
541 * p-lang.h (p_yyerror): Don't declare.
542 * p-lang.c (p_language_defn): Update.
543 * p-exp.y (yyerror): Now static.
544 * opencl-lang.c (opencl_language_defn): Update.
545 * objc-lang.c (objc_language_defn): Update.
546 * m2-lang.h (m2_yyerror): Don't declare.
547 * m2-lang.c (m2_language_defn): Update.
548 * m2-exp.y (yyerror): Now static.
549 * language.h (struct language_defn) <la_error>: Remove.
550 * language.c (unk_lang_error): Remove.
551 (unknown_language_defn, auto_language_defn): Remove.
552 * go-lang.h (go_yyerror): Don't declare.
553 * go-lang.c (go_language_defn): Update.
554 * go-exp.y (yyerror): Now static.
555 * f-lang.h (f_yyerror): Don't declare.
556 * f-lang.c (f_language_defn): Update.
557 * f-exp.y (yyerror): Now static.
558 * d-lang.h (d_yyerror): Don't declare.
559 * d-lang.c (d_language_defn): Update.
560 * d-exp.y (yyerror): Now static.
561 * c-lang.h (c_yyerror): Don't declare.
562 * c-lang.c (c_language_defn, cplus_language_defn)
563 (asm_language_defn, minimal_language_defn): Update.
564 * c-exp.y (yyerror): Now static.
565 * ada-lang.h (ada_yyerror): Don't declare.
566 * ada-lang.c (ada_language_defn): Update.
567 * ada-exp.y (yyerror): Now static.
569 2018-06-18 Alan Hayward <alan.hayward@arm.com>
571 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
572 (store_sveregs_to_thread): Likewise.
573 (aarch64_linux_fetch_inferior_registers): Check for SVE.
574 (aarch64_linux_store_inferior_registers): Likewise.
575 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
577 (aarch64_sve_regs_copy_to_regcache): Likewise.
578 (aarch64_sve_regs_copy_from_regcache): Likewise.
579 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
581 (aarch64_sve_regs_copy_to_regcache): Likewise.
582 (aarch64_sve_regs_copy_from_regcache): Likewise.
583 (sve_context): Structure from Linux headers.
584 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
585 (SVE_SIG_ZREG_SIZE): Likewise.
586 (SVE_SIG_PREG_SIZE): Likewise.
587 (SVE_SIG_FFR_SIZE): Likewise.
588 (SVE_SIG_REGS_OFFSET): Likewise.
589 (SVE_SIG_ZREGS_OFFSET): Likewise.
590 (SVE_SIG_ZREG_OFFSET): Likewise.
591 (SVE_SIG_ZREGS_SIZE): Likewise.
592 (SVE_SIG_PREGS_OFFSET): Likewise.
593 (SVE_SIG_PREG_OFFSET): Likewise.
594 (SVE_SIG_PREGS_SIZE): Likewise.
595 (SVE_SIG_FFR_OFFSET): Likewise.
596 (SVE_SIG_REGS_SIZE): Likewise.
597 (SVE_SIG_CONTEXT_SIZE): Likewise.
598 (SVE_PT_REGS_MASK): Likewise.
599 (SVE_PT_REGS_FPSIMD): Likewise.
600 (SVE_PT_REGS_SVE): Likewise.
601 (SVE_PT_VL_INHERIT): Likewise.
602 (SVE_PT_VL_ONEXEC): Likewise.
603 (SVE_PT_REGS_OFFSET): Likewise.
604 (SVE_PT_FPSIMD_OFFSET): Likewise.
605 (SVE_PT_FPSIMD_SIZE): Likewise.
606 (SVE_PT_SVE_ZREG_SIZE): Likewise.
607 (SVE_PT_SVE_PREG_SIZE): Likewise.
608 (SVE_PT_SVE_FFR_SIZE): Likewise.
609 (SVE_PT_SVE_FPSR_SIZE): Likewise.
610 (SVE_PT_SVE_FPCR_SIZE): Likewise.
611 (__SVE_SIG_TO_PT): Likewise.
612 (SVE_PT_SVE_OFFSET): Likewise.
613 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
614 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
615 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
616 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
617 (SVE_PT_SVE_PREG_OFFSET): Likewise.
618 (SVE_PT_SVE_PREGS_SIZE): Likewise.
619 (SVE_PT_SVE_FFR_OFFSET): Likewise.
620 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
621 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
622 (SVE_PT_SVE_SIZE): Likewise.
623 (SVE_PT_SIZE): Likewise.
624 (HAS_SVE_STATE): New define.
626 2018-06-18 Alan Hayward <alan.hayward@arm.com>
628 * nat/aarch64-sve-linux-sigcontext.h: New file.
629 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
631 (SVE_VQ_MIN): Likewise.
632 (SVE_VQ_MAX): Likewise.
633 (SVE_VL_MIN): Likewise.
634 (SVE_VL_MAX): Likewise.
635 (SVE_NUM_ZREGS): Likewise.
636 (SVE_NUM_PREGS): Likewise.
637 (sve_vl_valid): Likewise.
638 (struct user_sve_header): Likewise.
640 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
641 Richard Bunt <Richard.Bunt@arm.com>
643 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
644 was requested by GDB.
646 2018-06-15 Tom de Vries <tdevries@suse.de>
648 * MAINTAINERS (Write After Approval): Add Tom de Vries.
650 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
652 * gnulib/update-gnulib.sh: Print expected versions of
655 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
657 * arch-utils.c (default_type_align): Use type_length_units.
658 * gdbtypes.c (type_align): Use type_length_units.
660 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
662 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
665 2018-06-14 Tom de Vries <tdevries@suse.de>
668 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
669 get_no_prettyformat_print_options.
671 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
673 * sparc-nat.h: Include target.h.
674 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
675 <fetch_registers>: Remove this argument in function call.
676 <store_registers>: Remove this argument in function call, remove
678 <low_forget_process>: Call sparc64_forget_process instead of
679 sparc_forget_process.
681 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
683 * procfs.c (_initialize_procfs): Use add_inf_child_target.
684 (procfs_target::make_corefile_notes): Adjust to new
685 target_read_alloc return type.
687 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
688 Stephen Roberts <stephen.roberts@arm.com>
691 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
692 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
693 Move should_notify_stop local into more inner scope.
695 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
696 Stephen Roberts <stephen.roberts@arm.com>
699 * infrun.c (resume_1): Add call to mark_async_event_handler.
701 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
703 * infrun.c (do_target_wait): Change old version of $pc printed.
705 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
707 * dwarf2read.c (read_index_from_section): Rename to...
708 (read_gdb_index_from_section): ... this, update all callers.
709 (dwarf2_read_index): Rename to...
710 (dwarf2_read_gdb_index): ... this, update all callers.
712 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
714 * gdb/hppa-linux-nat.c
715 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
716 hppa_linux_nat_target::fetch_registers.
718 2018-06-11 Alan Hayward <alan.hayward@arm.com>
720 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
721 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
722 (AARCH64_DWARF_SVE_FFR): Likewise.
723 (AARCH64_DWARF_SVE_P0): Likewise.
724 (AARCH64_DWARF_SVE_Z0): Likewise.
726 2018-06-11 Alan Hayward <alan.hayward@arm.com>
728 * common/common-regcache.h (raw_compare): New function.
729 * regcache.c (regcache::raw_compare): Likewise.
730 * regcache.h (regcache::raw_compare): New declaration.
732 2018-06-11 Alan Hayward <alan.hayward@arm.com>
734 * common/common-regcache.h (reg_buffer_common): New structure.
735 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
736 (reg_buffer::raw_supply): Likewise.
737 (reg_buffer::raw_supply_integer): Likewise.
738 (reg_buffer::raw_supply_zeroed): Likewise.
739 (reg_buffer::raw_collect): Likewise.
740 (reg_buffer::raw_collect_integer): Likewise.
741 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
742 (reg_buffer::raw_supply): Likewise.
743 (reg_buffer::raw_supply_integer): Likewise.
744 (reg_buffer::raw_supply_zeroed): Likewise.
745 (reg_buffer::raw_collect): Likewise.
746 (reg_buffer::raw_collect_integer): Likewise.
748 2018-06-10 Tom Tromey <tom@tromey.com>
750 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
751 (class remote_state) <stop_reply_queue>: Now std::vector.
752 (remote_state::~remote_state)
753 (remote_target::stop_reply_queue_length): Update.
754 (struct queue_iter_param, remove_child_of_pending_fork)
755 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
756 (check_pending_event_prevents_wildcard_vcont_callback)
757 (remove_stop_reply_for_inferior)
758 (remove_stop_reply_of_remote_state)
759 (remote_notif_remove_once_on_match)
760 (stop_reply_match_ptid_and_ws)
761 (remote_kill_child_of_pending_fork): Remove.
762 (remote_target::remove_new_fork_children)
763 (remote_target::check_pending_events_prevent_wildcard_vcont)
764 (remote_target::discard_pending_stop_replies)
765 (remote_target::discard_pending_stop_replies_in_queue)
766 (remote_target::remote_notif_remove_queued_reply)
767 (remote_target::queued_stop_reply)
768 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
769 (remote_target::wait, remote_target::kill_new_fork_children)
770 (remote_target::async): Update.
772 2018-06-10 Tom Tromey <tom@tromey.com>
774 * record-full.c (record_full_arch_list_cleanups): Remove.
775 (record_full_message): Use try/catch.
776 (record_full_wait_cleanups): Remove.
777 (record_full_wait_1): Use try/catch.
778 (record_full_restore): Likewise.
780 2018-06-10 Tom Tromey <tom@tromey.com>
782 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
783 declare VEC. Add constructor.
784 <in_target_beneath>: Now bool.
785 (record_full_breakpoints): Now a std::vector, static.
786 (record_full_sync_record_breakpoints)
787 (record_full_init_record_breakpoints)
788 (record_full_target::insert_breakpoint)
789 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
791 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
793 * dwarf2read.c (process_cu_includes): Remove struct keyword.
794 * serial.c (serial_interface_lookup): Remove struct keyword.
796 2018-06-10 Tom Tromey <tom@tromey.com>
798 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
800 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
802 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
804 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
805 "beneath" as a method.
806 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
807 Use "beneath" as a method.
809 2018-06-10 Tom Tromey <tom@tromey.com>
811 * tracefile.c (struct trace_file_writer_deleter): New.
812 <operator()>: Rename from trace_file_writer_xfree.
813 (trace_file_writer_up): New typedef.
814 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
816 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
818 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
819 <m_registers, m_register_status>: Change type to
821 * regcache.c (reg_buffer::reg_buffer): Use new instead of
824 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
826 * common/common-regcache.h (enum register_status): Add
827 underlying type "signed char".
828 * regcache.h (reg_buffer) <m_register_status>: Change type to
830 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
831 register_status instead of signed char.
832 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
833 (reg_buffer::get_register_status): Remove cast.
834 (readable_regcache::raw_read): Remove cast.
835 (readable_regcache::cooked_read): Remove cast.
837 2018-06-09 Tom Tromey <tom@tromey.com>
839 * source.c (reverse_search_command, forward_search_command): Use
842 2018-06-09 Tom Tromey <tom@tromey.com>
844 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
845 (serial_ops_list): Now static, std::vector.
846 (serial_interface_lookup, serial_add_interface): Update.
848 2018-06-09 Tom Tromey <tom@tromey.com>
850 * dwarf2read.c (process_cu_includes): Update.
851 (process_full_comp_unit): Update.
852 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
855 2018-06-08 Paul Koning <paul_koning@dell.com>
859 * python/python.c (do_start_initialization):
860 Avoid call to internal Python API.
861 (init__gdb_module): New function.
863 2018-06-08 Gary Benson <gbenson@redhat.com>
865 * linux-thread-db.c (valprint.h): New include.
866 (struct check_thread_db_info): New structure.
867 (check_thread_db_on_load, tdb_testinfo): New static globals.
868 (check_thread_db, check_thread_db_callback): New functions.
869 (try_thread_db_load_1): Run integrity checks if requested.
870 (maintenance_check_libthread_db): New function.
871 (_initialize_thread_db): Register "maint check libthread-db"
872 and "maint set/show check-libthread-db".
873 * NEWS: Mention the above new commands.
875 2018-06-08 Tom Tromey <tom@tromey.com>
877 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
880 2018-06-08 Tom Tromey <tom@tromey.com>
882 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
884 2018-06-08 Tom Tromey <tom@tromey.com>
886 * common/btrace-common.h (struct btrace_data): Add constructor,
887 destructor, move assignment operator.
888 <empty, clear, fini>: New methods.
889 <format>: Initialize.
890 (btrace_data_init, btrace_data_fini, btrace_data_clear)
891 (btrace_data_empty): Don't declare.
892 * common/btrace-common.c (btrace_data_init): Remove.
893 (btrace_data::fini): Rename from btrace_data_fini.
894 (btrace_data::empty): Rename from btrace_data_empty.
895 (btrace_data::clear): Rename from btrace_data_clear. Return
897 * btrace.h (make_cleanup_btrace_data): Don't declare.
898 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
899 (parse_xml_btrace): Update.
900 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
901 (maint_btrace_clear_packet_history_cmd): Update.
903 2018-06-07 Pedro Alves <palves@redhat.com>
905 * target.h (target_ops) <beneath>: Now a method. All references
907 (class target_stack): New.
908 * target.c (g_target_stack): New.
909 (g_current_top_target): Delete.
910 (current_top_target): Get the top target out of g_target_stack.
911 (target_stack::push, target_stack::unpush): New.
912 (push_target, unpush_target): Reimplement.
913 (target_is_pushed): Reimplement in terms of g_target_stack.
914 (target_ops::beneath, target_stack::find_beneath): New.
916 2018-06-07 Pedro Alves <palves@redhat.com>
918 * target.h (find_target_beneath): Delete declaration.
919 * target.c (find_target_beneath): Delete definition.
920 * aix-thread.c: All callers of find_target_beneath adjusted to
921 call target_ops::beneath instead.
922 * bsd-uthread.c: Likewise.
923 * linux-thread-db.c: Likewise.
924 * ravenscar-thread.c: Likewise.
925 * sol-thread.c: Likewise.
926 * spu-multiarch.c: Likewise.
928 2018-06-07 Pedro Alves <palves@redhat.com>
930 * target.h (target_ops) <beneath>: Now a method. All references
932 (target_ops) <m_beneath>: New.
933 * target.c (target_ops::beneath): New.
934 * corelow.c: Adjust all references to target_ops::beneath.
935 * linux-thread-db.c: Likewise.
936 * make-target-delegates: Likewise.
937 * record-btrace.c: Likewise.
938 * record-full.c: Likewise.
939 * remote.c: Likewise.
940 * target.c: Likewise.
941 * target-delegates.c: Regenerate.
943 2018-06-07 Pedro Alves <palves@redhat.com>
945 * target.h (target_stack): Delete.
946 (current_top_target): Declare function.
947 * target.c (target_stack): Delete.
948 (g_current_top_target): New.
949 (current_top_target): New function.
950 * auxv.c: Use current_top_target instead of target_stack
952 * avr-tdep.c: Likewise.
953 * breakpoint.c: Likewise.
954 * corefile.c: Likewise.
955 * elfread.c: Likewise.
957 * exceptions.c: Likewise.
959 * gdbarch-selftests.c: Likewise.
960 * gnu-v3-abi.c: Likewise.
961 * ia64-tdep.c: Likewise.
962 * ia64-vms-tdep.c: Likewise.
963 * infcall.c: Likewise.
964 * infcmd.c: Likewise.
965 * infrun.c: Likewise.
966 * linespec.c: Likewise.
967 * linux-tdep.c: Likewise.
968 * minsyms.c: Likewise.
969 * ppc-linux-nat.c: Likewise.
970 * ppc-linux-tdep.c: Likewise.
971 * procfs.c: Likewise.
972 * regcache.c: Likewise.
973 * remote.c: Likewise.
974 * rs6000-tdep.c: Likewise.
975 * s390-linux-nat.c: Likewise.
976 * s390-tdep.c: Likewise.
977 * solib-aix.c: Likewise.
978 * solib-darwin.c: Likewise.
979 * solib-dsbt.c: Likewise.
980 * solib-spu.c: Likewise.
981 * solib-svr4.c: Likewise.
982 * solib-target.c: Likewise.
983 * sparc-tdep.c: Likewise.
984 * sparc64-tdep.c: Likewise.
985 * spu-tdep.c: Likewise.
986 * symfile.c: Likewise.
987 * symtab.c: Likewise.
988 * target-descriptions.c: Likewise.
989 * target-memory.c: Likewise.
990 * target.c: Likewise.
991 * target.h: Likewise.
992 * tracefile-tfile.c: Likewise.
993 * tracepoint.c: Likewise.
994 * valops.c: Likewise.
995 * valprint.c: Likewise.
997 * windows-tdep.c: Likewise.
998 * mi/mi-main.c: Likewise.
1000 2018-06-07 Tom Tromey <tom@tromey.com>
1002 * valprint.h (build_address_symbolic): Declare.
1003 * printcmd.c (print_address_symbolic): Update.
1004 (build_address_symbolic): Change "name" and "filename" to
1006 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1008 * defs.h (build_address_symbolic): Remove declaration.
1010 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1012 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1013 (aarch64_vnv_type): Add function.
1014 (aarch64_pseudo_register_name): Add V regs for SVE.
1015 (aarch64_pseudo_register_type): Likewise.
1016 (aarch64_pseudo_register_reggroup_p): Likewise.
1017 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1018 (aarch64_pseudo_read_value): Add V regs for SVE.
1019 (aarch64_pseudo_write_2): Use V0 offset for SVE
1020 (aarch64_pseudo_write): Add V regs for SVE.
1021 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1023 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1025 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1026 (sve_vl_from_vq): Likewise.
1028 2018-06-05 Tom Tromey <tom@tromey.com>
1030 * cli/cli-cmds.c (show_version): Update.
1031 * top.c (print_gdb_version): Add "interactive" parameter.
1033 * main.c (captured_main_1): Update.
1034 * top.h (print_gdb_version): Add "interactive" parameter and a
1037 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1039 * common/enum-flags.h: Add trailing semicolon to example in
1042 2018-06-05 Tom Tromey <tom@tromey.com>
1045 * NEWS: Add entry about pager.
1046 * utils.c (pagination_disabled_for_command): New global.
1047 (prompt_for_continue): Allow "c" response to prompt.
1048 (reinitialize_more_filter): Clear
1049 pagination_disabled_for_command.
1050 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1052 2018-06-04 Tom Tromey <tom@tromey.com>
1054 * ada-lang.h (ada_lookup_symbol_list): Update.
1055 * ada-lang.c (resolve_subexp): Update.
1056 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1058 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1059 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1060 results parameter to std::vector.
1061 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1063 * ada-exp.y (block_lookup): Update.
1064 (select_possible_type_sym): Change type of syms. Remove nsyms
1066 (write_var_or_type, write_name_assoc): Update.
1068 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1070 * windows-nat.c (windows_nat_target::xfer_partial): Return
1071 TARGET_XFER_E_IO if we need to delegate to the target beneath
1072 but BENEATH is NULL.
1074 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1076 * Makefile.in (config.status): Add configure.nat as a
1079 2018-06-04 Tom Tromey <tom@tromey.com>
1081 * cp-name-parser.y (cpname_state): Add method declarations.
1082 (HANDLE_QUAL): Update.
1083 (cpname_state::d_grab, cpname_state::fill_comp)
1084 (cpname_state::make_operator, cpname_state::make_dtor)
1085 (cpname_state::make_builtin_type, cpname_state::make_name)
1086 (cpname_state::d_qualify, cpname_state::d_int_type)
1087 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1088 (%union): Move earlier.
1090 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1092 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1094 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1096 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1097 (aarch64_pseudo_write_1): Likewise.
1098 (aarch64_pseudo_read_value): Use helper.
1099 (aarch64_pseudo_write): Likewise.
1101 2018-06-04 Pedro Alves <palves@redhat.com>
1103 * darwin-nat.c (darwin_ops): Delete.
1104 (darwin_attach_pid): Use get_native_target.
1106 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1108 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1109 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1111 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1113 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1114 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1115 (aarch64_gdbarch_init): Check for SVE.
1116 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1118 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1120 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1121 * aarch64-tdep.h (aarch64_read_description): Likewise.
1122 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1123 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1124 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1125 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1126 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1128 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1130 * value.c (value_fetch_lazy_bitfield): New.
1131 (value_fetch_lazy_memory): New.
1132 (value_fetch_lazy_register): New.
1133 (value_fetch_lazy): Factor out to smaller functions.
1135 2018-06-01 Tom Tromey <tom@tromey.com>
1137 * cp-name-parser.y (backslashable, represented): Now const.
1139 2018-06-01 Tom Tromey <tom@tromey.com>
1141 * cp-name-parser.y: Include parser-defs.h.
1142 (parser_fprintf): Remove declaration.
1144 2018-06-01 Tom Tromey <tom@tromey.com>
1146 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1148 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1149 (global_result): Remove globals.
1150 (struct cpname_state): New.
1151 (yyparse): Don't declare.
1152 (yylex, yyerror): Move declarations after %union.
1153 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1154 (make_name): Add state parameter.
1156 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1158 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1160 (yylex): Add lvalp, state parameters.
1161 (yyerror): Add state parameter.
1162 (cp_demangled_name_to_comp): Update.
1164 2018-06-01 Tom Tromey <tom@tromey.com>
1166 * cp-name-parser.y (parser_fprintf): Declare.
1167 (GDB_YY_REMAP_PREFIX): Define.
1168 Include yy-remap.h. Don't redefine yy* identifiers.
1170 2018-06-01 Tom Tromey <tom@tromey.com>
1172 * python/py-type.c (typy_legacy_template_argument): Update.
1173 * cp-support.h (cp_demangled_name_to_comp): Update.
1174 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1175 parameter to be a "std::string *".
1178 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1180 * ada-lex.l: Include "diagnostics.h" instead of
1181 "common/diagnostics.h".
1182 * unittests/environ-selftests.c: Likewise.
1183 * common/diagnostics.h: Moved to ../include.
1185 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1187 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1188 to language_mode_manual while calling breakpoint_re_set_one.
1190 2018-06-01 Tom Tromey <tom@tromey.com>
1192 * valops.c (value_cast_structs, destructor_name_p): Update.
1193 * symtab.c (gdb_mangle_name): Update.
1194 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1196 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1197 (pascal_object_print_value_fields, pascal_object_print_value):
1199 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1200 * linespec.c (find_methods): Update.
1201 * gdbtypes.h (type_name_no_tag): Remove.
1202 (type_name_or_error): Rename from type_name_no_tag_or_error.
1203 * gdbtypes.c (type_name_no_tag): Remove.
1204 (type_name_or_error): Rename from type_name_no_tag_or_error.
1205 (lookup_struct_elt_type, check_typedef): Update.
1206 * expprint.c (print_subexp_standard): Update.
1207 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1208 * d-namespace.c (d_lookup_nested_symbol): Update.
1209 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1210 (cp_print_class_member): Update.
1211 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1212 * completer.c (add_struct_fields): Update.
1213 * c-typeprint.c (cp_type_print_derivation_info)
1214 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1216 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1217 (ada_prefer_type, ada_is_exception_sym): Update.
1219 2018-06-01 Tom Tromey <tom@tromey.com>
1221 * valops.c (enum_constant_from_type, value_namespace_elt)
1222 (value_maybe_namespace_elt): Update.
1223 * valarith.c (find_size_for_pointer_math): Update.
1224 * target-descriptions.c (make_gdb_type): Update.
1225 * symmisc.c (print_symbol): Update.
1226 * stabsread.c (define_symbol, read_type)
1227 (complain_about_struct_wipeout, add_undefined_type)
1228 (cleanup_undefined_types_1): Update.
1229 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1230 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1231 (rust_internal_print_type, rust_composite_type)
1232 (rust_evaluate_funcall, rust_evaluate_subexp)
1233 (rust_inclusive_range_type_p): Update.
1234 * python/py-type.c (typy_get_tag): Update.
1235 * p-typeprint.c (pascal_type_print_base): Update.
1236 * mdebugread.c (parse_symbol, parse_type): Update.
1237 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1239 * guile/scm-type.c (gdbscm_type_tag): Update.
1240 * go-lang.c (sixg_string_p): Update.
1241 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1243 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1244 (TYPE_TAG_NAME): Remove.
1245 * gdbtypes.c (type_name_no_tag): Simplify.
1246 (check_typedef, check_types_equal, recursive_dump_type)
1247 (copy_type_recursive, arch_composite_type): Update.
1248 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1249 in summary mode when needed.
1250 * eval.c (evaluate_funcall): Update.
1251 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1252 (process_structure_scope, read_enumeration_type)
1253 (read_namespace_type, read_module_type, determine_prefix): Update.
1254 * cp-support.c (inspect_type): Update.
1255 * coffread.c (process_coff_symbol, decode_base_type): Update.
1256 * c-varobj.c (c_is_path_expr_parent): Update.
1257 * c-typeprint.c (c_type_print_base_struct_union): Update.
1258 (c_type_print_base_1): Update. Print struct/class/union/enum in
1259 summary when using C language.
1260 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1261 (gen_maybe_namespace_elt): Update.
1262 * ada-lang.c (ada_type_name): Simplify.
1263 (empty_record, ada_template_to_fixed_record_type_1)
1264 (template_to_static_fixed_type)
1265 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1267 2018-06-01 Tom Tromey <tom@tromey.com>
1269 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1271 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1272 (c_print_type): Update.
1273 (c_print_type): New overload.
1274 (c_type_print_varspec_prefix, c_type_print_args)
1275 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1276 (c_type_print_base_struct_union, c_type_print_base_1)
1277 (cp_type_print_method_args): Add "language" parameter.
1278 (c_type_print_base): Update.
1279 * c-lang.h (c_print_type): Add new overload.
1281 2018-06-01 Tom Tromey <tom@tromey.com>
1283 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1284 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1286 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1288 * aarch64-tdep.c (aarch64_sve_register_names): New const
1290 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1291 (AARCH64_SVE_Z_REGS_NUM): New define.
1292 (AARCH64_SVE_P_REGS_NUM): Likewise.
1293 (AARCH64_SVE_NUM_REGS): Likewise.
1295 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1297 * nat/linux-ptrace.h [__alpha__]
1298 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1301 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1303 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1304 the endianness selected.
1305 * NEWS: Document `set endian auto' mode operation update.
1307 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1309 * Makefile.in: Add new header.
1310 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1311 (sve_vl_from_vg): Likewise.
1312 (sve_vq_from_vl): Likewise.
1313 (sve_vl_from_vq): Likewise.
1314 (sve_vq_from_vg): Likewise.
1315 (sve_vg_from_vq): Likewise.
1316 * configure.nat: Add new c file.
1317 * nat/aarch64-sve-linux-ptrace.c: New file.
1318 * nat/aarch64-sve-linux-ptrace.h: New file.
1320 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1322 * aarch64-linux-nat.c (aarch64_linux_read_description):
1324 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1326 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1327 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1328 (aarch64_gdbarch_init): Add parmeter zero.
1329 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1330 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1331 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1333 * doc/gdb.texinfo: Describe SVE feature
1334 * features/aarch64-sve.c: New file.
1336 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1339 * gdbarch.sh (significant_addr_bit): Default to zero when
1340 not set by target architecture.
1341 * gdbarch.c: Re-generated.
1342 * utils.c (address_significant): Update.
1344 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1346 * stack.c (func_command): Remove trailing newline in call to error.
1348 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1350 * regcache.h (regcache_raw_collect): Remove, update callers to
1351 use regcache::raw_collect.
1352 * regcache.c (regcache_raw_collect): Remove.
1354 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1356 * regcache.h (regcache_raw_supply): Remove, update callers to
1357 use detached_regcache::raw_supply.
1358 * regcache.c (regcache_raw_supply): Remove.
1360 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1362 * regcache.h (regcache_cooked_write_part): Remove, update
1363 callers to use regcache::cooked_write_part.
1364 * regcache.c (regcache_cooked_write_part): Remove.
1366 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1368 * regcache.h (regcache_cooked_read_part): Remove, update callers
1369 to use readable_regcache::cooked_read_part.
1370 * regcache.c (regcache_cooked_read_part): Remove.
1372 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1374 * regcache.h (regcache_cooked_read_value): Remove, update
1375 callers to use readable_regcache::cooked_read_value.
1376 * regcache.c (regcache_cooked_read_value): Remove.
1378 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1380 * regcache.h (regcache_cooked_write): Remove, update callers to
1381 use regcache::cooked_write.
1382 * regcache.c (regcache_cooked_write): Remove.
1384 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1386 * regcache.h (regcache_invalidate): Remove, update callers to
1387 use detached_regcache::invalidate instead.
1388 * regcache.c (regcache_invalidate): Remove.
1390 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1392 * regcache.h (regcache_raw_write_part): Remove, update callers
1393 to use regcache::raw_write_part instead.
1394 * regcache.c (regcache_raw_write_part): Remove.
1396 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1398 * regcache.h (regcache_raw_read_part): Remove, update callers to
1399 use readable_regcache::raw_read_part instead.
1400 * regcache.c (regcache_raw_read_part): Remove.
1402 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1404 * regcache.h (regcache_cooked_read): Remove, update callers to
1405 use readable_regcache::cooked_read instead.
1406 * regcache.c (regcache_cooked_read): Remove.
1408 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1410 * regcache.h (regcache_raw_write): Remove, update callers to use
1411 regcache::raw_write instead.
1412 * regcache.c (regcache_raw_write): Remove.
1414 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1416 * regcache.h (regcache_raw_read): Remove, update callers to use
1417 readable_regcache::raw_read instead.
1418 * regcache.c (regcache_raw_read): Remove.
1420 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1422 * regcache.h (regcache_raw_update): Remove, update callers to
1423 use readable_regcache::raw_update instead.
1424 * regcache.c (regcache_raw_update): Remove.
1426 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1428 * regcache.h (regcache_register_status): Remove, update callers
1429 to use reg_buffer::get_register_status directly instead.
1430 * regcache.c (regcache_register_status): Remove.
1432 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1434 * regcache.h (regcache_get_ptid): Remove, update all callers to
1435 call regcache::ptid instead.
1436 * regcache.c (regcache_get_ptid): Remove.
1438 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1440 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1442 2018-05-30 Pedro Alves <palves@redhat.com>
1444 * common/common-exceptions.h (exception_rethrow): Use
1447 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1449 * breakpoint.c (print_solib_event, check_status_catch_solib):
1450 Remove struct keyword in range-based for loops.
1451 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1452 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1454 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1456 * symfile.c (addr_info_make_relative): Likewise.
1457 * thread.c (value_in_thread_stack_temporaries): Likewise.
1459 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1462 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1463 aggregate type to get its real type before accessing it.
1465 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1467 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1468 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1469 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1470 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1471 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1472 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1473 * printcmd.c (info_address_command): Likewise.
1475 2018-05-29 Tom Tromey <tom@tromey.com>
1477 * windows-nat.c (handle_exception): Update fall-through comment.
1479 2018-05-29 Tom Tromey <tom@tromey.com>
1481 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1482 (struct program_space) <added_solibs>: Now a std::vector.
1483 * breakpoint.c (print_solib_event): Update.
1484 (check_status_catch_solib): Update.
1485 * progspace.c (clear_program_space_solib_cache): Update.
1486 * solib.c (update_solib_list): Update.
1488 2018-05-29 Tom Tromey <tom@tromey.com>
1490 * python/py-type.c (typy_richcompare): Update.
1491 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1492 * gdbtypes.h (types_deeply_equal): Return bool.
1493 (types_equal): Likewise.
1494 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1496 (check_types_equal): Change worklist to std::vector. Return
1498 (struct type_equality_entry): Add constructor.
1499 (compare_maybe_null_strings): Return bool.
1500 (check_types_worklist): Return bool. Change worklist to
1502 (types_deeply_equal): Use std::vector.
1503 (types_equal): Return bool.
1504 (compare_maybe_null_strings): Simplify.
1506 2018-05-29 Tom Tromey <tom@tromey.com>
1508 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1510 2018-05-29 Tom Tromey <tom@tromey.com>
1512 * objc-lang.h: Don't include cp-support.h.
1513 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1516 2018-05-27 Tom Tromey <tom@tromey.com>
1518 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1520 2018-05-25 Tom Tromey <tom@tromey.com>
1522 * value.c (value::location): Initialize.
1524 2018-05-25 Tom Tromey <tom@tromey.com>
1526 * dbxread.c (init_bincl_list): Remove.
1527 (bincl_list): Now a std::vector.
1528 (bincls_allocated, next_bincl): Remove.
1529 (free_bincl_list, do_free_bincl_list_cleanup)
1530 (make_cleanup_free_bincl_list): Remove.
1531 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1533 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1534 (struct header_file_location): Add constructor.
1535 (add_bincl_to_list): Remove.
1537 2018-05-25 Tom Tromey <tom@tromey.com>
1539 * tui/tui.c (tui_enable): Update.
1540 * mi/mi-interp.c (mi_interp::init): Update.
1541 * interps.h (class interp) <name>: New method.
1542 <m_name>: Rename from name.
1543 (~scoped_restore_interp): Update.
1544 * interps.c (interp::interp): Update.
1545 (interp_add, interp_set, interp_lookup_existing)
1546 (current_interp_named_p): Update.
1548 2018-05-25 Tom Tromey <tom@tromey.com>
1550 * interps.c (interp_name): Remove.
1551 * mi/mi-interp.c (mi_interp::init): Update.
1552 * interps.h (interp_name): Remove.
1553 (~scoped_restore_interp): Update.
1554 * tui/tui.c (tui_enable): Update.
1556 2018-05-25 Tom Tromey <tom@tromey.com>
1558 * utils.c (fputs_maybe_filtered): Update.
1559 * linespec.c (decode_line_full): Update.
1560 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1561 (mi_print_breakpoint_for_event, mi_solib_loaded)
1562 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1563 (mi_user_selected_context_changed): Update.
1564 * mi/mi-main.c (mi_execute_command): Update.
1565 * cli/cli-script.c (execute_control_command): Update.
1566 * python/python.c (execute_gdb_command): Update.
1567 * solib.c (info_sharedlibrary_command): Update.
1568 * interps.c (interp_ui_out): Remove.
1569 * interps.h (interp_ui_out): Remove.
1571 2018-05-25 Tom Tromey <tom@tromey.com>
1573 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1574 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1575 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1577 2018-05-25 Tom Tromey <tom@tromey.com>
1579 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1580 * interps.c (interp_exec): Use scoped_restore.
1582 2018-05-25 Tom Tromey <tom@tromey.com>
1584 * remote.c (remote_target::remote_file_get): Use
1586 (remote_target::remote_file_put): Likewise.
1588 2018-05-25 Tom Tromey <tom@tromey.com>
1590 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1592 (get_pe_section_index, add_pe_exported_sym): Update.
1593 (read_pe_exported_syms): Use gdb::def_vector.
1595 2018-05-25 Tom Tromey <tom@tromey.com>
1597 * frame.c (remove_prev_frame): Remove.
1598 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1600 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1602 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1604 * mips-linux-nat.c (supply_fpregset): Always call
1605 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1606 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1607 `mips_fill_fpregset'.
1608 * mips-linux-tdep.c (mips_supply_fpregset)
1609 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1610 (mips_fill_fpregset_wrapper): Remove functions.
1611 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1612 (mips_linux_fpregset): Remove variable.
1613 (mips_linux_iterate_over_regset_sections): Use
1614 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1615 (mips_linux_o32_sigframe_init): Remove comment.
1617 2018-05-25 Pedro Alves <palves@redhat.com>
1619 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1620 (struct readahead_cache, struct packet_reg, struct
1621 remote_arch_state, class remote_state): Move higher up in the
1623 (remote_target::m_remote_state): Now an object instead of a pointer.
1624 (remote_target::get_remote_state): Adjust.
1626 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1628 * stack.c (select_and_print_frame): Delete.
1629 (struct function_bounds): Move struct within function.
1630 (func_command): Most content moved into new function
1631 find_frame_for_function, use new function, print result, add
1633 (find_frame_for_function): New function, now returns a result.
1635 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1637 * stack.c (iterate_over_block_arg_vars): Fix comment.
1638 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1640 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1644 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1646 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1648 * frame.h (class scoped_restore_selected_frame): New class.
1649 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1650 of any exception, use scoped_restore_selected_frame to restore the
1653 2018-05-24 Pedro Alves <palves@redhat.com>
1655 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1658 2018-05-23 Tom Tromey <tom@tromey.com>
1660 * complaints.c (struct complaints): Remove.
1661 (symfile_complaint_book): Remove.
1662 (series): New global.
1663 (complaint_internal): Update.
1664 (clear_complaints): Update.
1666 2018-05-23 Tom Tromey <tom@tromey.com>
1668 * complaints.c (counters): New global.
1669 (struct complain): Remove.
1670 (struct complaints) <root>: Remove.
1671 (complaint_sentinel): Remove.
1672 (symfile_complaint_book): Update.
1673 (find_complaint) Remove.
1674 (complaint_internal, clear_complaints): Update.
1676 2018-05-23 Tom Tromey <tom@tromey.com>
1678 * complaints.c (struct complain) <file, line>: Remove.
1679 (find_complaint): Remove file, line parameters.
1680 (complaint_internal): Update.
1682 2018-05-23 Tom Tromey <tom@tromey.com>
1684 * complaints.c (vcomplaint): Remove.
1685 (complaint_internal) Merge in contents of vcomplaint.
1687 2018-05-23 Tom Tromey <tom@tromey.com>
1689 * complaints.c (struct complaints) <explanation>: Remove.
1690 (symfile_explanations): Remove.
1691 (symfile_complaint_book): Update.
1692 (vcomplaint): Update.
1693 (struct explanation): Remove.
1695 2018-05-23 Tom Tromey <tom@tromey.com>
1697 * complaints.c (symfile_complaints): Remove.
1698 (complaint_internal): Remove "complaints" parameter.
1699 (clear_complaints, vcomplaint): Remove "c" parameter.
1700 (get_complaints): Remove.
1701 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1702 (dwarf2_debug_line_missing_file_complaint)
1703 (dwarf2_debug_line_missing_end_sequence_complaint)
1704 (dwarf2_complex_location_expr_complaint)
1705 (dwarf2_const_value_length_mismatch_complaint)
1706 (dwarf2_section_buffer_overflow_complaint)
1707 (dwarf2_macro_malformed_definition_complaint)
1708 (dwarf2_invalid_attrib_class_complaint)
1709 (create_addrmap_from_index, dw2_symtab_iter_next)
1710 (dw2_expand_marked_cus)
1711 (dw2_debug_names_iterator::find_vec_in_debug_names)
1712 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1713 (create_debug_type_hash_table, init_cutu_and_read_dies)
1714 (partial_die_parent_scope, add_partial_enumeration)
1715 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1716 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1717 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1718 (create_cus_hash_table, create_dwp_hash_table)
1719 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1720 (dwarf2_rnglists_process, dwarf2_ranges_process)
1721 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1722 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1723 (handle_struct_member_die, process_structure_scope)
1724 (read_array_type, read_common_block, read_module_type)
1725 (read_tag_pointer_type, read_typedef, read_base_type)
1726 (read_subrange_type, load_partial_dies, partial_die_info::read)
1727 (partial_die_info::read, partial_die_info::read)
1728 (partial_die_info::read, read_checked_initial_length_and_offset)
1729 (dwarf2_string_attr, read_formatted_entries)
1730 (dwarf_decode_line_header)
1731 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1732 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1733 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1734 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1735 (get_signatured_type, get_DW_AT_signature_type)
1736 (decode_locdesc, file_file_name, consume_improper_spaces)
1737 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1738 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1739 (dwarf2_symbol_mark_computed, set_die_type)
1740 (read_attribute_value): Update.
1741 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1743 * dbxread.c (unknown_symtype_complaint)
1744 (lbrac_mismatch_complaint, repeated_header_complaint)
1745 (set_namestring, function_outside_compilation_unit_complaint)
1746 (read_dbx_symtab, process_one_symbol): Update.
1747 * gdbtypes.c (stub_noname_complaint): Update.
1748 * windows-nat.c (handle_unload_dll): Update.
1749 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1750 (decode_base_type): Update.
1751 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1752 (eb_complaint, record_include_begin, record_include_end)
1753 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1754 (process_xcoff_symbol, read_symbol)
1755 (function_outside_compilation_unit_complaint)
1756 (scan_xcoff_symtab): Update.
1757 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1758 * buildsym.c (finish_block_internal, make_blockvector)
1759 (end_symtab_get_static_block, augment_type_symtab): Update.
1760 * dtrace-probe.c (dtrace_process_dof)
1761 (dtrace_static_probe_ops::get_probes): Update.
1762 * complaints.h (struct complaint): Don't declare.
1763 (symfile_complaints): Remove.
1764 (complaint_internal): Remove "complaints" parameter.
1765 (complaint): Likewise.
1766 (clear_complaints): Likewise.
1767 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1768 (reread_symbols): Update.
1769 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1770 (dwarf2_frame_cache, decode_frame_entry): Update.
1771 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1772 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1773 (info_selectors_command): Update.
1774 * macrotab.c (macro_include, check_for_redefinition)
1775 (macro_undef): Update.
1776 * objfiles.c (filter_overlapping_sections): Update.
1777 * stabsread.c (invalid_cpp_abbrev_complaint)
1778 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1779 (define_symbol, error_type, read_type, rs6000_builtin_type)
1780 (stabs_method_name_from_physname, read_member_functions)
1781 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1782 (attach_fields_to_type, complain_about_struct_wipeout)
1783 (read_range_type, read_args, common_block_start)
1784 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1786 * mdebugread.c (index_complaint, unknown_ext_complaint)
1787 (basic_type_complaint, bad_tag_guess_complaint)
1788 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1789 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1790 (parse_procedure, parse_lines)
1791 (function_outside_compilation_unit_complaint)
1792 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1793 (bad_tag_guess_complaint, reg_value_complaint): Update.
1794 * cp-support.c (demangled_name_complaint): Update.
1795 * macroscope.c (sal_macro_scope): Update.
1796 * dwarf-index-write.c (class debug_names): Update.
1798 2018-05-23 Tom Tromey <tom@tromey.com>
1800 * complaints.c (clear_complaints): Remove "noisy" parameter.
1801 * complaints.h (clear_complaints): Update.
1802 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1803 (reread_symbols): Update.
1805 2018-05-23 Tom Tromey <tom@tromey.com>
1807 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1809 (vcomplaint, clear_complaints): Update.
1810 (symfile_explanations): Remove some messages.
1812 2018-05-23 Tom Tromey <tom@tromey.com>
1814 * complaints.c (internal_complaint): Remove.
1815 * complaints.h (internal_complaint): Remove.
1817 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1819 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1821 2018-05-22 Pedro Alves <palves@redhat.com>
1823 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1824 (remote_fileio_badfd, remote_fileio_return_errno)
1825 (remote_fileio_return_success, remote_fileio_func_open)
1826 (remote_fileio_func_open, remote_fileio_func_close)
1827 (remote_fileio_func_read, remote_fileio_func_write)
1828 (remote_fileio_func_lseek, remote_fileio_func_rename)
1829 (remote_fileio_func_unlink, remote_fileio_func_stat)
1830 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1831 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1832 remote_target parameter.
1833 (remote_fio_func_map) <func>: Add remote_target parameter.
1834 (do_remote_fileio_request, remote_fileio_request):
1835 * remote-fileio.h (remote_fileio_request):
1836 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1837 remote_target parameter.
1838 (remote_notif_process, handle_notification): Adjust to pass down
1840 (remote_notif_state_allocate): Add remote_target parameter. Save
1842 * remote-notif.h (struct remote_target): Forward declare.
1843 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1844 remote_target parameter.
1845 (struct remote_notif_state) <remote>: New field.
1846 (remote_notif_ack, remote_notif_parse): Add remote_target
1848 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1849 remote_target parameter.
1850 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1851 (threads_listing_context, rmt_thread_action, protocol_feature)
1852 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1853 (packet_result, struct threads_listing_context, remote_state):
1854 Move definitions and declarations higher up.
1855 (remote_target) <~remote_target>: Declare.
1856 (remote_download_command_source, remote_file_put, remote_file_get)
1857 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1858 (remote_hostio_pread_vFile, remote_hostio_send_command)
1859 (remote_hostio_set_filesystem, remote_hostio_open)
1860 (remote_hostio_close, remote_hostio_unlink, remote_state)
1861 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1862 (get_memory_write_packet_size, get_memory_read_packet_size)
1863 (append_pending_thread_resumptions, remote_detach_1)
1864 (append_resumption, remote_resume_with_vcont)
1865 (add_current_inferior_and_thread, wait_ns, wait_as)
1866 (process_stop_reply, remote_notice_new_inferior)
1867 (process_initial_stop_replies, remote_add_thread)
1868 (btrace_sync_conf, remote_btrace_maybe_reopen)
1869 (remove_new_fork_children, kill_new_fork_children)
1870 (discard_pending_stop_replies, stop_reply_queue_length)
1871 (check_pending_events_prevent_wildcard_vcont)
1872 (discard_pending_stop_replies_in_queue, stop_reply)
1873 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1874 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1875 (remote_interrupt_as, remote_interrupt_ns)
1876 (remote_get_noisy_reply, remote_query_attached)
1877 (remote_add_inferior, remote_current_thread, get_current_thread)
1878 (set_thread, set_general_thread, set_continue_thread)
1879 (set_general_process, write_ptid)
1880 (remote_unpack_thread_info_response, remote_get_threadinfo)
1881 (parse_threadlist_response, remote_get_threadlist)
1882 (remote_threadlist_iterator, remote_get_threads_with_ql)
1883 (remote_get_threads_with_qxfer)
1884 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
1885 (get_offsets, remote_check_symbols, remote_supported_packet)
1886 (remote_query_supported, remote_packet_size)
1887 (remote_serial_quit_handler, remote_detach_pid)
1888 (remote_vcont_probe, remote_resume_with_hc)
1889 (send_interrupt_sequence, interrupt_query)
1890 (remote_notif_get_pending_events, fetch_register_using_p)
1891 (send_g_packet, process_g_packet, fetch_registers_using_g)
1892 (store_register_using_P, store_registers_using_G)
1893 (set_remote_traceframe, check_binary_download)
1894 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
1895 (remote_xfer_live_readonly_partial, remote_read_bytes)
1896 (remote_send_printf, remote_flash_write, readchar)
1897 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
1898 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
1899 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
1900 (extended_remote_disable_randomization, extended_remote_run)
1901 (send_environment_packet, extended_remote_environment_support)
1902 (extended_remote_set_inferior_cwd, remote_write_qxfer)
1903 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
1904 (packet_command): Now methods of ...
1905 (remote_target): ... this class.
1906 (m_remote_state) <remote_target>: New field.
1907 (struct remote_state) <stop_reply_queue,
1908 remote_async_inferior_event_token, wait_forever_enabled_p>: New
1910 (remote_state::remote_state): Allocate stop_reply_queue.
1911 (remote_state): Delete global.
1912 (get_remote_state_raw): Delete.
1913 (remote_target::get_remote_state): Allocate m_remote_state on
1915 (get_current_remote_target): New.
1916 (remote_ops, extended_remote_ops): Delete.
1917 (wait_forever_enabled_p, remote_async_inferior_event_token):
1918 Delete, moved to struct remote_state.
1919 (remote_target::close): Delete self. Destruction bits split to
1921 (remote_target::~remote_target): ... this.
1922 (show_memory_packet_size): Adjust to use
1923 get_current_remote_target.
1924 (struct protocol_feature) <func>: Add remote_target parameter.
1925 All callers adjusted.
1926 (curr_quit_handler_target): New.
1927 (remote_serial_quit_handler): Reimplement.
1928 (remote_target::open_1): Adjust to use get_current_remote_target.
1929 Heap-allocate remote_target/extended_remote_target instances.
1930 (vcont_builder::vcont_builder): Add remote_target parameter, and
1931 save it in m_remote. All callers adjusted.
1932 (vcont_builder::m_remote): New field.
1933 (vcont_builder::restart, vcont_builder::flush)
1934 (vcont_builder::push_action): Use it.
1935 (remote_target::commit_resume): Use it.
1936 (struct queue_iter_param) <remote>: New field.
1937 (remote_target::remove_new_fork_children): Fill in 'remote' field.
1938 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1939 (check_pending_event_prevents_wildcard_vcont_callback)
1940 (remote_target::check_pending_events_prevent_wildcard_vcont)
1941 (remote_target::discard_pending_stop_replies)
1942 (remote_target::discard_pending_stop_replies_in_queue)
1943 (remote_target::remote_notif_remove_queued_reply): Fill in
1945 (remote_notif_get_pending_events): New.
1946 (remote_target::readchar, remote_target::remote_serial_write):
1947 Save/restore curr_quit_handler_target.
1949 (kill_new_fork_children): Fill in 'remote' field.
1950 (packet_command): Use get_current_remote_target, defer to
1951 remote_target method of same name.
1952 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1953 parameter, and save it in m_remote. All callers adjusted.
1954 (scoped_remote_fd::release): Use m_remote.
1955 (scoped_remote_fd::m_remote): New field.
1956 (remote_file_put, remote_file_get, remote_file_delete): Use
1957 get_current_remote_target, defer to remote_target method of same
1959 (remote_btrace_reset): Add remote_state paremeter. Update all
1961 (remote_async_inferior_event_handler). Pass down 'data'.
1962 (remote_new_objfile): Use get_current_remote_target.
1963 (remote_target::vcont_r_supported): New.
1964 (set_range_stepping): Use get_current_remote_target and
1965 remote_target::vcont_r_supported.
1966 (_initialize_remote): Don't allocate 'remote_state' and
1967 'stop_reply_queue' globals.
1968 * remote.h (struct remote_target): Forward declare.
1969 (getpkt, putpkt, remote_notif_get_pending_events): Add
1970 'remote_target' parameter.
1972 2018-05-22 Pedro Alves <palves@redhat.com>
1974 * remote.c (vcont_builder): Now a class. Make all data members
1976 (vcont_builder) <vcont_builder, restart, flush, push_action>:
1978 (vcont_builder_restart): Rename to ...
1979 (vcont_builder::restart): ... this.
1980 (vcont_builder_flush): Rename to ...
1981 (vcont_builder::flush): ... this.
1982 (vcont_builder_push_action): Rename to ...
1983 (vcont_builder::push_action): ... this.
1984 (remote_target::commit_resume): Adjust.
1986 2018-05-22 Pedro Alves <palves@redhat.com>
1988 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1989 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1990 (get_fixed_memory_packet_size): New.
1991 (get_memory_packet_size): Use it.
1992 (set_memory_packet_size): Don't override the config size with
1993 DEFAULT_MAX_MEMORY_PACKET_SIZE.
1994 (show_memory_packet_size): Use get_fixed_memory_packet_size.
1995 Don't refer to get_memory_packet_size if not connected to a remote
1996 target. Show "(default)" if configured size is 0.
1998 2018-05-22 Pedro Alves <palves@redhat.com>
2000 * remote.c (remote_target::mourn_inferior): Move
2001 discard_pending_stop_replies call here from ...
2002 (_initialize_remote): ... here.
2004 2018-05-22 Pedro Alves <palves@redhat.com>
2006 * remote.c (compare_section_command): Remove set_general_process
2009 2018-05-22 Pedro Alves <palves@redhat.com>
2011 * remote.c (struct packet_reg, struct remote_arch_state):
2012 Move higher up in the file.
2013 (remote_state) <m_arch_states>: Store remote_arch_state values
2014 instead of remote_arch_state pointers.
2015 (remote_state::get_remote_arch_state): Adjust.
2017 2018-05-22 Pedro Alves <palves@redhat.com>
2019 * remote.c: Include <unordered_map>.
2020 (remote_state): Now a class.
2021 (remote_state) <get_remote_arch_state>: Declare method.
2022 <get_remote_arch_state>: New field.
2023 (remote_arch_state) <remote_arch_state>: Declare ctor.
2024 <regs>: Now a unique_ptr.
2025 (remote_gdbarch_data_handle): Delete.
2026 (get_remote_arch_state): Delete.
2027 (remote_state::get_remote_arch_state): New.
2028 (get_remote_state): Adjust to call remote_state's
2029 get_remote_arch_state method.
2030 (init_remote_state): Delete, bits factored out to ...
2031 (remote_arch_state::remote_arch_state): ... this new method.
2032 (get_remote_packet_size, get_memory_packet_size)
2033 (process_g_packet, remote_target::fetch_registers)
2034 (remote_target::prepare_to_store, store_registers_using_G)
2035 (remote_target::store_registers, remote_target::get_trace_status):
2036 Adjust to call remote_state's method.
2037 (_initialize_remote): Remove reference to
2038 remote_gdbarch_data_handle.
2040 2018-05-22 Pedro Alves <palves@redhat.com>
2042 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2043 pread>: New method declarations.
2044 (remote_target::open_1): Adjust.
2045 (readahead_cache_invalidate): Rename to ...
2046 (readahead_cache::invalidate): ... this, and adjust to be a class
2048 (readahead_cache_invalidate_fd): Rename to ...
2049 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2051 (remote_hostio_pwrite): Adjust.
2052 (remote_hostio_pread_from_cache): Rename to ...
2053 (readahead_cache::pread): ... this, and adjust to be a class
2055 (remote_hostio_close): Adjust.
2057 2018-05-22 Pedro Alves <palves@redhat.com>
2059 * remote.c (remote_hostio_close_cleanup): Delete.
2060 (class scoped_remote_fd): New.
2061 (remote_file_put, remote_file_get): Use it.
2063 2018-05-22 Pedro Alves <palves@redhat.com>
2065 (struct vCont_action_support): Use bool and initialize all fields.
2066 (struct readahead_cache): Initialize all fields.
2067 (remote_state): Use bool and initialize all fields.
2068 (remote_state::remote_state, remote_state::~remote_state): New.
2069 (new_remote_state): Delete.
2070 (_initialize_remote): Use new to allocate remote_state.
2072 2018-05-22 Pedro Alves <palves@redhat.com>
2076 * c-exp.y: Include "c-support.h".
2077 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2078 of tolower. Use c_ident_is_alpha to scan names.
2079 * c-lang.c: Include "c-support.h".
2080 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2081 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2082 * c-support.h: New file, with bits factored out from ...
2083 * cp-name-parser.y: ... this file.
2084 Include "c-support.h".
2085 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2086 c-support.h and renamed.
2087 (symbol_end, yylex): Adjust.
2089 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2091 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2092 parameter type to CORE_ADDR.
2093 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2094 parameter type in declaration to CORE_ADDR.
2095 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2096 target_auxv_search to get AT_HWCAP and use the result to get the
2098 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2099 to CORE_ADDR. Remove the cast of the return value to unsigned
2100 long. Fix error predicate of target_auxv_search.
2101 (ppc_linux_nat_target::read_description): Change the type of the
2102 hwcap variable to CORE_ADDR.
2104 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2106 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2107 if the size of fpscr is larger than 32 bits.
2109 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2111 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2112 (ppc32_linux_vsxregmap): New global.
2113 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2114 regcache_supply_regset, and regcache_collect_regset.
2115 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2116 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2117 (fetch_vsx_register, store_vsx_register): Remove.
2118 (fetch_vsx_registers): Add regno parameter. Get regset using
2119 ppc_linux_vsxregset. Use regset to supply registers.
2120 (store_vsx_registers): Add regno parameter. Get regset using
2121 ppc_linux_vsxregset. Use regset to collect registers.
2122 (fetch_register): Call fetch_vsx_registers instead of
2124 (store_register): Call store_vsx_registers instead of
2126 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2127 new regno parameter.
2128 (store_ppc_registers): Call store_vsx_registers with -1 for the
2129 new regno parameter.
2130 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2131 (ppc_collect_vsxregset): Remove.
2133 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2135 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2137 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2138 for vector register offset fields.
2139 (ppc64_fbsd_reg_offsets): Likewise.
2140 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2141 to vector register offset fields.
2142 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2143 to vector register offset fields.
2144 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2145 vector register offset fields.
2146 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2147 initializers for vector register offset fields.
2148 (rs6000_aix64_reg_offsets): Likewise.
2149 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2150 (ppc_supply_vrregset): Remove.
2151 (ppc_collect_vrregset): Remove.
2152 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2153 (ppc_linux_vrregset) : New function.
2154 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2155 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2156 (ppc32_linux_vrregset): Remove.
2157 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2158 and use result instead of ppc32_linux_vrregset.
2159 (ppc32_linux_reg_offsets): Remove initializers for vector register
2161 (ppc64_linux_reg_offsets): Likewise.
2162 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2163 * ppc-linux-nat.c: Include regset.h.
2164 (gdb_vrregset_t): Adjust comment to account for little-endian
2166 (supply_vrregset, fill_vrregset): Remove.
2167 (fetch_altivec_register, store_altivec_register): Remove.
2168 (fetch_altivec_registers): Add regno parameter. Get regset using
2169 ppc_linux_vrregset. Use regset to supply registers.
2170 (store_altivec_registers): Add regno parameter. Get regset using
2171 ppc_linux_vrregset. Use regset to collect registers.
2172 (fetch_register): Call fetch_altivec_registers instead of
2173 fetch_altivec_register.
2174 (store_register): Call store_altivec_registers instead of
2175 store_altivec_register.
2176 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2177 the new regno parameter.
2178 (store_ppc_registers): Call store_altivec_registers with -1 for
2179 the new regno parameter.
2181 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2183 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2184 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2185 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2186 (gdb_vrregset_t): Change array type size to
2187 PPC_LINUX_SIZEOF_VRREGSET.
2188 (gdb_vsxregset_t): Change array type size to
2189 PPC_LINUX_SIZEOF_VSXREGSET.
2190 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2191 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2192 PPC_LINUX_SIZEOF_VSXREGSET.
2194 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2196 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2197 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2199 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2200 ppc_linux_target_wordsize with tid.
2201 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2203 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2204 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2205 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2206 tid parameter. Remove static specifier.
2207 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2208 (ppc_linux_target_wordsize): New declaration.
2210 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2212 * arch/ppc-linux-common.c: New file.
2213 * arch/ppc-linux-common.h: New file.
2214 * arch/ppc-linux-tdesc.h: New file.
2215 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2216 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2217 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2218 arch/ppc-linux-tdesc.h.
2219 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2220 arch/ppc-linux-tdesc.h.
2221 (ppc_linux_nat_target::read_description): Remove target
2222 description matching code. Fill a ppc_linux_features struct and
2223 call ppc_linux_match_description with it. Move comment about ISA
2224 2.05 to ppc-linux-common.c.
2225 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2226 arch/ppc-linux-tdesc.h.
2227 (ppc_linux_core_read_description): Remove target description
2228 matching code. Fill a ppc_linux_features struct and call
2229 ppc_linux_match_description with it.
2230 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2231 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2232 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2233 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2234 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2235 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2236 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2237 (tdesc_powerpc_e500l): Remove.
2239 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2241 * ada-lang.c (catch_assert_command): Pass empty string instead
2242 of NULL for excep_string argument.
2244 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2246 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2247 the width of the requested register exceeds the width of the
2250 2018-05-21 Tom Tromey <tom@tromey.com>
2252 * printcmd.c (output_command): Remove.
2253 (output_command_const): Rename to output_command.
2254 * valprint.h (output_command): Rename from output_command_const.
2255 * tracepoint.c (trace_dump_actions): Call output_command.
2257 2018-05-21 Tom Tromey <tom@tromey.com>
2259 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2260 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2261 * ada-lang.h (create_ada_exception_catchpoint): Update.
2262 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2264 (create_excep_cond_exprs, ~ada_catchpoint)
2265 (should_stop_exception, print_one_exception)
2266 (print_mention_exception, print_recreate_exception): Update.
2267 (ada_get_next_arg): Remove.
2268 (catch_ada_exception_command_split): Use std::string. Change type
2269 of "excep_string", "cond_string".
2270 (catch_ada_exception_command): Update.
2271 (create_ada_exception_catchpoint): Change type of excep_string.
2272 (ada_exception_sal): Remove excep_string parameter.
2273 (~ada_catchpoint): Remove.
2275 2018-05-21 Tom Tromey <tom@tromey.com>
2277 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2280 2018-05-21 Tom Tromey <tom@tromey.com>
2282 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2283 Return unique_xmalloc_ptr.
2284 (print_it_exception): Update.
2286 2018-05-21 Tom Tromey <tom@tromey.com>
2288 * tracepoint.c (trace_dump_actions): Use std::string.
2290 2018-05-21 Tom Tromey <tom@tromey.com>
2292 * symfile.c (reread_symbols): Use std::string for original_name.
2294 2018-05-21 Tom Tromey <tom@tromey.com>
2296 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2297 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2300 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2302 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2304 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2305 * objfiles.c (get_objfile_bfd_data): Allocate
2306 objfile_per_bfd_storage with obstack_new when allocating on
2309 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2311 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2313 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2314 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2315 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2316 (add_pending): Likewise.
2317 (parse_symbol): Likewise.
2318 (parse_partial_symbols): Likewise.
2319 (psymtab_to_symtab_1): Likewise.
2320 (new_psymtab): Likewise.
2321 (elfmdebug_build_psymtabs): Likewise.
2322 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2323 * objfiles.c (get_objfile_bfd_data): Likewise.
2324 (objfile_register_static_link): Likewise.
2325 * psymtab.c (allocate_psymtab): Likewise.
2326 * stabsread.c (read_member_functions): Likewise.
2327 * xcoffread.c (xcoff_end_psymtab): Likewise.
2329 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2331 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2332 compiler supports std::is_trivially_constructible.
2333 * common/poison.h: Include obstack.h.
2334 (IsMallocable): Define to is_trivially_constructible if the
2335 compiler supports it, define to true_type otherwise.
2339 (XOBNEWVEC): Redefine.
2340 * gdb_obstack.h (obstack_zalloc): New.
2341 (OBSTACK_ZALLOC): Redefine.
2342 (obstack_calloc): New.
2343 (OBSTACK_CALLOC): Redefine.
2345 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2346 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2348 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2349 obstack_calloc/obstack_zalloc.
2350 (gdbarch_obstack_zalloc): Remove.
2351 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2353 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2355 * stack.c (backtrace_command_1): Remove useless variable int i.
2357 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2359 * stack.c (print_frame_info): Fix comment.
2361 2018-05-18 Tom Tromey <tom@tromey.com>
2363 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2364 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2365 (~dwarf2_per_objfile): Update
2366 (dwarf2_get_dwz_file): Use new.
2367 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2370 2018-05-18 Tom Tromey <tom@tromey.com>
2372 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2374 * dwarf2read.c (struct dwp_file): Add constructor and
2376 (open_and_init_dwp_file): Return a unique_ptr.
2377 (dwarf2_per_objfile, create_dwp_hash_table)
2378 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2379 (lookup_dwo_unit_in_dwp): Update.
2380 (open_and_init_dwp_file, get_dwp_file): Update.
2382 2018-05-18 Tom Tromey <tom@tromey.com>
2384 * dwarf2read.c (dwarf2_per_objfile): Update.
2385 (struct mapped_index): Add initializers.
2386 (dwarf2_read_index): Use new.
2387 (dw2_symtab_iter_init): Update.
2388 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2391 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2393 * dwarf2read.c (mapped_index) <total_size>: Remove.
2395 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2397 * unittests/format_pieces-selftests.c (test_format_specifier):
2400 2018-05-18 Tom Tromey <tom@tromey.com>
2402 * c-typeprint.c (maybe_print_hole): New function.
2403 (c_print_type_struct_field_offset): Update.
2404 (c_type_print_base_struct_union): Call maybe_print_hole.
2406 2018-05-17 Keith Seitz <keiths@redhat.com>
2408 * breakpoint.c (build_bpstat_chain): New function, moved from
2410 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2411 If no stop chain is passed, call build_bpstat_chain to build it.
2412 * breakpoint.h (build_bpstat_chain): Declare.
2413 (bpstat_stop_status): Move documentation here from breakpoint.c.
2414 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2415 build the stop chain and pass it to skip_inline_frames.
2416 Pass this stop chain to bpstat_stop_status.
2417 * inline-frame.c: Include breakpoint.h.
2418 (stopped_by_user_bp_inline_frame): New function.
2419 (skip_inline_frames): Add parameter `stop_chain'.
2420 Move documention to inline-frame.h.
2421 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2422 whether the frame should be elided.
2423 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2424 Add moved documentation and update for new parameter.
2426 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2429 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2430 unittests/format_pieces-selftests.c.
2431 * common/format.h (format_piece) <operator==>: New.
2432 (format_pieces) <operator[]>: Remove.
2433 * common/format.c (format_pieces::format_pieces): Handle \e.
2434 * unittests/format_pieces-selftests.c: New.
2436 2018-05-17 Tom Tromey <tom@tromey.com>
2439 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2440 (dw2_instantiate_symtab): Add skip_partial parameter.
2441 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2442 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2443 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2444 (dw2_expand_symtabs_matching_one)
2445 (dw2_find_pc_sect_compunit_symtab)
2446 (dw2_debug_names_lookup_symbol)
2447 (dw2_debug_names_expand_symtabs_for_function): Update.
2448 (init_cutu_and_read_dies): Add skip_partial parameter.
2449 (process_psymtab_comp_unit, build_type_psymtabs_1)
2450 (process_skeletonless_type_unit, load_partial_comp_unit)
2451 (psymtab_to_symtab_1): Update.
2452 (load_full_comp_unit): Add skip_partial parameter.
2453 (process_imported_unit_die, dwarf2_read_addr_index)
2454 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2455 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2456 (read_signatured_type): Update.
2458 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2460 * value.c (release_value): Remove unused variable.
2461 (record_latest_value): Likewise.
2462 (access_value_history): Likewise.
2463 (preserve_values): Likewise.
2465 2018-05-17 Tom Tromey <tom@tromey.com>
2467 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2470 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2473 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2474 Also handle registers whose width is not a multiple of
2476 (linux_nat_trad_target::store_register): Likewise.
2478 2018-05-16 Tom Tromey <tom@tromey.com>
2480 * gdbcore.h (core_bfd): Redefine.
2481 * corelow.c (core_target::close): Update.
2482 (core_target_open): Update.
2483 * progspace.h (struct program_space) <cbfd>: Now a
2486 2018-05-16 Tom Tromey <tom@tromey.com>
2489 * symfile-add-flags.h (enum symfile_add_flags)
2490 <SYMFILE_NOT_FILENAME>: New constant.
2491 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2492 objfile name from BFD.
2493 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2494 * minidebug.c (find_separate_debug_file_in_section): Put
2495 ".gnu_debugdata" into BFD's file name.
2497 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2499 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2502 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2505 * aarch64-tdep.c (aarch64_analyze_prologue,
2506 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2507 Indicate not interested in errors.
2509 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2511 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2512 Supply the MIPS_ZERO_REGNUM register.
2514 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2516 * mips-tdep.c (mask_address_var): Make variable static.
2518 2018-05-14 Tom Tromey <tom@tromey.com>
2520 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2522 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2524 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2525 FXSAVE_ADDR for the mxcsr register.
2527 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2529 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2531 2018-05-11 Pedro Alves <palves@redhat.com>
2533 * corelow.c (core_target) <core_target>: No longer inline.
2534 Initialize m_core_gdbarch, m_core_vec and build the section table
2536 <~core_target>: New.
2537 <core_gdbarch, get_core_register_section>: New methods.
2538 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2539 factored out from ...
2540 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2542 (sniff_core_bfd): Add gdbarch parameter.
2543 (core_close): Delete, merged into ...
2544 (core_target::close): ... here. Delete self.
2545 (core_close_cleanup): Delete.
2546 (core_target_open): Allocate a core_target on the heap. Use a
2547 unique_ptr instead of a cleanup. Bits moved into the core_target
2548 ctor. Adjust to use core_target methods instead of globals.
2549 (get_core_register_section): Rename to ...
2550 (core_target::get_core_register_section): ... this and adjust.
2551 (struct get_core_registers_cb_data): New.
2552 (get_core_registers_cb): Use it. Use bool.
2553 (core_target::fetch_registers, core_target::files_info)
2554 (core_target::xfer_partial, core_target::read_description)
2555 (core_target::pid_to, core_target::thread_name): Adjust to
2556 reference class fields instead of globals.
2557 * target.h (struct target_ops_deleter, target_ops_up): New.
2559 2018-05-11 Pedro Alves <palves@redhat.com>
2561 * corefile.c (core_file_command): Move to corelow.c.
2562 * corelow.c (the_core_target): Delete.
2563 (core_file_command): Moved from corefile.c. Check exec_bfd
2564 instead of the_core_target. Use target_detach instead of calling
2565 into the_core_target directly.
2566 (maybe_say_no_core_file_now): New.
2567 (core_target::detach): Use it.
2568 (_initialize_corelow): Remove references to the_core_target.
2569 * gdbcore.h (the_core_target): Delete.
2571 2018-05-11 Tom Tromey <tromey@redhat.com>
2572 Pedro Alves <palves@redhat.com>
2574 * corefile.c (core_bfd): Remove.
2575 * gdbcore.h (core_bfd): Now a macro.
2576 * progspace.h (struct program_space) <cbfd>: New field.
2578 2018-05-11 Tom Tromey <tom@tromey.com>
2580 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2583 2018-05-10 Tom Tromey <tom@tromey.com>
2585 * configure: Rebuild.
2586 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2588 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2591 * regformats/regdat.sh: Adjust script, following the addition
2592 of the new expedite_regs parameter to init_target_desc.
2594 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2597 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2598 set_gdbarch_significant_addr_bit.
2599 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2600 set_gdbarch_significant_addr_bit.
2601 * utils.c (address_significant): Update to sign extend addr.
2603 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2605 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2606 (xtensa_linux_init_abi): Limit tdep->num_regs by
2607 tdep->num_nopriv_regs.
2608 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2609 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2612 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2614 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2616 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2618 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2619 (I387_MXCSR_INIT_VAL): New constant.
2620 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2621 buffer if it was supplied by the inferior.
2622 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2623 (i387_xsave_get_clear_bv): New function.
2624 (i387_supply_xsave): Only read x87 control registers from the
2625 xsave buffer if the feature is enabled, and the state will have
2626 been written, otherwise, provide a suitable default.
2627 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2628 including x87 control registers. Update control registers if they
2629 have changed from the default value, and mark features as enabled
2631 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2633 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2635 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2637 2018-05-07 Tom Tromey <tom@tromey.com>
2639 * configure: Rebuild.
2640 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2642 2018-05-07 Tom Tromey <tom@tromey.com>
2645 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2646 bit. Use correct value for VDIV.
2648 2018-05-04 Tom Tromey <tom@tromey.com>
2650 * configure: Rebuild.
2651 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2653 2018-05-04 Tom Tromey <tom@tromey.com>
2655 * linux-record.c (record_linux_system_call) <case
2656 RECORD_SYS_RECVFROM>: Add "break".
2658 2018-05-04 Tom Tromey <tom@tromey.com>
2660 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2661 Add missing "break".
2662 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2663 Add missing "break".
2665 2018-05-04 Tom Tromey <tom@tromey.com>
2667 * rs6000-tdep.c (ppc_process_record_op4)
2668 (ppc_process_record_op63): Add fall-through comment.
2670 2018-05-04 Tom Tromey <tom@tromey.com>
2672 * i386-tdep.c (i386_process_record): Add fall-through comment.
2674 2018-05-04 Tom Tromey <tom@tromey.com>
2676 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2679 2018-05-04 Tom Tromey <tom@tromey.com>
2681 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2682 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2683 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2685 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2687 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2690 2018-05-04 Tom Tromey <tom@tromey.com>
2692 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2694 2018-05-04 Tom Tromey <tom@tromey.com>
2696 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2697 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2698 * symfile.c (section_is_mapped): Fix fall-through comment.
2699 * stabsread.c (define_symbol, read_member_functions): Fix
2700 fall-through comment.
2701 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2703 * remote.c (remote_wait_as): Fix fall-through comment.
2704 * p-exp.y (yylex): Fix fall-through comment.
2705 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2707 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2708 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2709 * jv-exp.y (yylex): Fix fall-through comment.
2710 * go-exp.y (lex_one_token): Fix fall-through comment.
2711 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2712 fall-through comment.
2713 * f-exp.y (yylex): Fix fall-through comment.
2714 * dwarf2read.c (process_die): Fix fall-through comments.
2715 * dbxread.c (process_one_symbol): Fix fall-through comment.
2716 * d-exp.y (lex_one_token): Fix fall-through comment.
2717 * cp-name-parser.y (yylex): Fix fall-through comment.
2718 * coffread.c (coff_symtab_read): Fix fall-through comment.
2719 * c-exp.y (lex_one_token): Fix fall-through comment.
2720 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2722 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2725 2018-05-04 Tom Tromey <tom@tromey.com>
2728 * NEWS: Mention gdb.execute change.
2729 * gdbcmd.h (execute_control_command): Don't declare.
2730 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2731 execute_control_commands, execute_control_commands_to_string.
2732 * cli/cli-script.h (execute_control_commands)
2733 (execute_control_commands_to_string): Declare.
2734 (execute_control_command): Add from_tty parameter.
2735 * cli/cli-script.c (execute_control_commands)
2736 (execute_control_commands_to_string): New functions.
2737 (execute_user_command): Use execute_control_commands.
2738 (execute_control_command_1): Add "from_tty" parameter. Update.
2739 (execute_control_command): Likewise.
2741 2018-05-04 Tom Tromey <tom@tromey.com>
2744 * NEWS: Mention that breakpoint commands are writable.
2745 * python/py-breakpoint.c (bppy_set_commands): New function.
2746 (breakpoint_object_getset) <"commands">: Use it.
2748 2018-05-04 Tom Tromey <tom@tromey.com>
2750 * tracepoint.c (actions_command): Update.
2751 * mi/mi-cmd-break.c (mi_command_line_array)
2752 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2753 (mi_read_next_line): Remove.
2754 (mi_cmd_break_commands): Update.
2755 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2757 * cli/cli-script.c (get_command_line): Update.
2758 (process_next_line): Use function_view. Constify.
2759 (recurse_read_control_structure, read_command_lines)
2760 (read_command_lines_1): Change argument types to function_view.
2761 (do_define_command, document_command): Update.
2762 * breakpoint.h (check_tracepoint_command): Don't declare.
2763 * breakpoint.c (check_tracepoint_command): Remove.
2764 (commands_command_1, create_tracepoint_from_upload): Update.
2766 2018-05-04 Tom Tromey <tom@tromey.com>
2769 * cli/cli-script.h (enum command_control_type) <define_control>:
2771 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2772 (build_command_line, execute_control_command_1)
2773 (process_next_line): Likewise.
2774 (do_define_command): New function, extracted from define_command.
2775 (define_command): Use it.
2777 2018-05-04 Tom Tromey <tom@tromey.com>
2779 * tracepoint.c (actions_command): Update.
2780 * cli/cli-script.h (read_command_lines): Update.
2781 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2782 (MAX_TMPBUF): Remove define.
2783 (define_command): Use string_printf.
2784 (document_command): Likewise.
2785 * breakpoint.c (commands_command_1): Update.
2787 2018-05-04 Tom Tromey <tom@tromey.com>
2789 * top.c (execute_command): Update.
2790 * cli/cli-script.h (print_command_lines): Now varargs.
2791 * cli/cli-script.c (print_command_lines): Now varargs.
2792 (execute_control_command_1) <case while_control, case if_control>:
2795 2018-05-04 Tom Tromey <tom@tromey.com>
2797 * tracepoint.c (all_tracepoint_actions): Rename from
2798 all_tracepoint_actions_and_cleanup. Change return type.
2799 (actions_command, encode_actions_1, encode_actions)
2800 (trace_dump_actions, tdump_command): Update.
2801 * remote.c (remote_download_command_source): Update.
2802 * python/python.c (gdbpy_eval_from_control_command)
2803 (python_command, python_interactive_command): Update.
2804 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2805 * guile/guile.c (guile_command)
2806 (gdbscm_eval_from_control_command, guile_command): Update.
2807 * compile/compile.c (compile_code_command)
2808 (compile_print_command, compile_to_object): Update.
2809 * cli/cli-script.h (struct command_lines_deleter): New.
2810 (counted_command_line): New typedef.
2811 (struct command_line): Add constructor, destructor.
2812 <body_list>: Remove.
2813 <body_list_0, body_list_1>: New members.
2814 (command_line_up): Remove typedef.
2815 (read_command_lines, read_command_lines_1, get_command_line):
2817 (copy_command_lines): Don't declare.
2818 * cli/cli-script.c (build_command_line): Use "new".
2819 (get_command_line): Return counted_command_line.
2820 (print_command_lines, execute_user_command)
2821 (execute_control_command_1, while_command, if_command): Update.
2822 (realloc_body_list): Remove.
2823 (process_next_line, recurse_read_control_structure): Update.
2824 (read_command_lines, read_command_lines_1): Return counted_command_line.
2825 (free_command_lines): Use "delete".
2826 (copy_command_lines): Remove.
2827 (define_command, document_command, show_user_1): Update.
2828 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2829 a counted_command_line.
2830 * breakpoint.h (counted_command_line): Remove typedef.
2831 (breakpoint_set_commands): Update.
2832 * breakpoint.c (check_no_tracepoint_commands)
2833 (validate_commands_for_breakpoint): Update.
2834 (breakpoint_set_commands): Change commands to be a
2835 counted_command_line.
2836 (commands_command_1, update_dprintf_command_list)
2837 (create_tracepoint_from_upload): Update.
2839 2018-05-04 Tom Tromey <tom@tromey.com>
2841 * cli/cli-decode.h (cmd_list_element): New constructor.
2842 (~cmd_list_element): New destructor.
2843 (struct cmd_list_element): Add initializers.
2844 * cli/cli-decode.c (do_add_cmd): Use "new".
2845 (delete_cmd): Use "delete".
2847 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2848 Pedro Alves <palves@redhat.com>
2850 PR breakpoints/19806 and support for PR external/20207.
2851 * NEWS: Mention Aarch64 watchpoint improvements.
2852 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2853 watchpoints and PR external/20207 watchpoints.
2854 * nat/aarch64-linux-hw-point.c
2855 (kernel_supports_any_contiguous_range): New.
2856 (aarch64_watchpoint_offset): New.
2857 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2858 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2859 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2860 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2861 next_addr_orig_p. Support PR external/20207 watchpoints.
2862 (aarch64_downgrade_regs): New.
2863 (aarch64_dr_state_insert_one_point): New parameters offset and
2865 (aarch64_dr_state_remove_one_point): Likewise.
2866 (aarch64_handle_breakpoint): Update caller.
2867 (aarch64_handle_aligned_watchpoint): Likewise.
2868 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2870 (aarch64_linux_set_debug_regs): Remove const from state. Call
2871 aarch64_downgrade_regs.
2872 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2873 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2874 (DR_CONTROL_MASK): ... this.
2875 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2876 (unsigned int aarch64_watchpoint_offset): New prototype.
2877 (aarch64_linux_set_debug_regs): Remove const from state.
2878 * utils.c (align_up, align_down): Move to ...
2879 * common/common-utils.c (align_up, align_down): ... here.
2880 * utils.h (align_up, align_down): Move to ...
2881 * common/common-utils.h (align_up, align_down): ... here.
2883 2018-05-04 Joel Brobecker <brobecker@adacore.com>
2885 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
2886 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
2887 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
2888 Re-implement to match the ABI as summarized in GCC's
2889 gcc/config/sparc/sparc.c. All callers updated.
2890 (sparc32_store_arguments): Remove assertion.
2892 2018-05-04 Tom Tromey <tom@tromey.com>
2894 * printcmd.c: Don't include tui.h.
2895 (decode_format): Use skip_spaces.
2897 2018-05-04 Tom Tromey <tom@tromey.com>
2900 * printcmd.c (last_count): New global.
2901 (x_command): Use saved count when repeating.
2903 2018-05-04 Tom Tromey <tom@tromey.com>
2905 * nto-procfs.c (do_closedir_cleanup): Remove.
2906 (procfs_pidlist): Use gdb_dir_up.
2907 * procfs.c (do_closedir_cleanup): Remove.
2908 (proc_update_threads): Use gdb_dir_up.
2909 * common/filestuff.h (struct gdb_dir_deleter): New.
2910 (gdb_dir_up): New typedef.
2912 2018-05-04 Tom Tromey <tom@tromey.com>
2914 * ada-lang.c (print_mention_exception): Use std::string.
2916 2018-05-04 Tom Tromey <tom@tromey.com>
2918 * ada-lang.c (create_excep_cond_exprs): Update.
2919 (ada_exception_catchpoint_cond_string): Use std::string.
2921 2018-05-04 Tom Tromey <tom@tromey.com>
2923 * ada-lang.c (xget_renaming_scope): Return std::string.
2924 (old_renaming_is_invisible): Update.
2926 2018-05-04 Tom Tromey <tom@tromey.com>
2928 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2929 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2931 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
2933 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2935 2018-05-04 Tom Tromey <tom@tromey.com>
2937 * remote.c (remote_query_supported_append): Change type.
2938 (remote_check_symbols): Update.
2940 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
2943 * configure.ac: Prepend libpython.
2944 * python/python-config.py: Likewise.
2945 * configure: Regenerate.
2947 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
2949 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2951 2018-05-03 Pedro Alves <palves@redhat.com>
2954 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2955 override. Write 'true' instead of '1'.
2956 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2959 2018-05-02 Pedro Alves <palves@redhat.com>
2961 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2962 add_inf_child_target.
2963 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2964 add_inf_child_target.
2965 * aix-thread.c (aix_thread_target_info): New.
2966 (aix_thread_target) <shortname, longname, doc>: Delete.
2968 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2969 add_inf_child_target.
2970 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2971 add_inf_child_target.
2972 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2973 add_inf_child_target.
2974 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2975 add_inf_child_target.
2976 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2977 add_inf_child_target.
2978 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2979 add_inf_child_target.
2980 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2981 add_inf_child_target.
2982 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2983 add_inf_child_target.
2984 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2985 add_inf_child_target.
2986 * bfd-target.c (target_bfd_target_info): New.
2987 (target_bfd) <shortname, longname, doc>: Delete.
2989 * bsd-kvm.c (bsd_kvm_target_info): New.
2990 (bsd_kvm_target) <shortname, longname, doc>: Delete.
2992 (bsd_kvm_target::open): Rename to ...
2993 (bsd_kvm_target_open): ... this. Adjust.
2994 * bsd-uthread.c (bsd_uthread_target_info): New.
2995 (bsd_uthread_target) <shortname, longname, doc>: Delete.
2997 * corefile.c (core_file_command): Adjust.
2998 * corelow.c (core_target_info): New.
2999 (core_target) <shortname, longname, doc>: Delete.
3001 (core_target::open): Rename to ...
3002 (core_target_open): ... this. Adjust.
3003 * ctf.c (ctf_target_info): New.
3004 (ctf_target) <shortname, longname, doc>: Delete.
3006 (ctf_target::open): Rename to ...
3007 (ctf_target_open): ... this.
3008 (_initialize_ctf): Adjust.
3009 * exec.c (exec_target_info): New.
3010 (exec_target) <shortname, longname, doc>: Delete.
3012 (exec_target::open): Rename to ...
3013 (exec_target_open): ... this.
3014 * gdbcore.h (core_target_open): Declare.
3015 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3016 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3017 add_inf_child_target.
3018 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3019 add_inf_child_target.
3020 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3021 add_inf_child_target.
3022 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3023 add_inf_child_target.
3024 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3025 add_inf_child_target.
3026 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3027 add_inf_child_target.
3028 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3029 add_inf_child_target.
3030 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3031 add_inf_child_target.
3032 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3033 add_inf_child_target.
3034 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3035 add_inf_child_target.
3036 * inf-child.c (inf_child_target_info): New.
3037 (inf_child_target::info): New.
3038 (inf_child_open_target): Remove 'target' parameter. Use
3039 get_native_target instead.
3040 (inf_child_target::open): Delete.
3041 (add_inf_child_target): New.
3042 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3045 (add_inf_child_target): Declare.
3046 (inf_child_open_target): Declare.
3047 * linux-thread-db.c (thread_db_target_info): New.
3048 (thread_db_target) <shortname, longname, doc>: Delete.
3050 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3051 add_inf_child_target.
3052 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3053 add_inf_child_target.
3054 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3055 add_inf_child_target.
3056 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3057 add_inf_child_target.
3058 * make-target-delegates (print_class): Adjust.
3059 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3060 add_inf_child_target.
3061 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3062 add_inf_child_target.
3063 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3064 add_inf_child_target.
3065 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3066 add_inf_child_target.
3067 * nto-procfs.c (nto_native_target_info): New.
3068 (nto_procfs_target_native) <shortname, longname, doc>:
3071 (nto_procfs_target_info): New.
3072 (nto_procfs_target_procfs) <shortname, longname, doc>:
3075 (init_procfs_targets): Adjust.
3076 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3077 add_inf_child_target.
3078 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3079 add_inf_child_target.
3080 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3081 add_inf_child_target.
3082 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3083 add_inf_child_target.
3084 * ravenscar-thread.c (ravenscar_target_info): New.
3085 (ravenscar_thread_target) <shortname, longname, doc>:
3088 * record-btrace.c (record_btrace_target_info):
3089 (record_btrace_target) <shortname, longname, doc>: Delete.
3091 (record_btrace_target::open): Rename to ...
3092 (record_btrace_target_open): ... this. Adjust.
3093 * record-full.c (record_longname, record_doc): New.
3094 (record_full_base_target) <shortname, longname, doc>: Delete.
3096 (record_full_target_info): New.
3097 (record_full_target): <shortname>: Delete.
3099 (record_full_core_open_1, record_full_open_1): Update comments.
3100 (record_full_base_target::open): Rename to ...
3101 (record_full_open): ... this.
3102 (cmd_record_full_restore): Update.
3103 (_initialize_record_full): Update.
3104 * remote-sim.c (remote_sim_target_info): New.
3105 (gdbsim_target) <shortname, longname, doc>: Delete.
3107 (gdbsim_target::open): Rename to ...
3108 (gdbsim_target_open): ... this.
3109 (_initialize_remote_sim): Adjust.
3110 * remote.c (remote_doc): New.
3111 (remote_target_info): New.
3112 (remote_target) <shortname, longname, doc>: Delete.
3114 (extended_remote_target_info): New.
3115 (extended_remote_target) <shortname, longname, doc>: Delete.
3117 (remote_target::open_1): Make static. Adjust.
3118 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3119 * s390-linux-nat.c (_initialize_s390_nat): Use
3120 add_inf_child_target.
3121 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3122 add_inf_child_target.
3123 * sol-thread.c (thread_db_target_info): New.
3124 (sol_thread_target) <shortname, longname, doc>: Delete.
3126 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3127 add_inf_child_target.
3128 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3129 add_inf_child_target.
3130 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3131 add_inf_child_target.
3132 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3133 add_inf_child_target.
3134 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3135 add_inf_child_target.
3136 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3137 add_inf_child_target.
3138 * spu-linux-nat.c (_initialize_spu_nat): Use
3139 add_inf_child_target.
3140 * spu-multiarch.c (spu_multiarch_target_info): New.
3141 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3143 * target-delegates.c: Regenerate.
3144 * target.c: Include <unordered_map>.
3145 (target_ops_p): Delete.
3146 (DEF_VEC_P(target_ops_p)): Delete.
3147 (target_factories): New.
3148 (test_target_info): New.
3149 (test_target_ops::info): New.
3150 (open_target): Adjust to use target_factories.
3151 (add_target_with_completer): Rename to ...
3152 (add_target): ... this. Change prototype. Register target_info
3153 and open callback in target_factories. Register target_info in
3154 command context instead of target_ops.
3155 (add_target): Delete old implementation.
3156 (add_deprecated_target_alias): Change prototype. Adjust.
3157 (the_native_target): New.
3158 (set_native_target, get_native_target): New.
3159 (find_default_run_target): Use the_native_target.
3160 (find_attach_target, find_run_target): Simplify.
3161 (target_ops::open): Delete.
3162 (dummy_target_info): New.
3163 (dummy_target::shortname, dummy_target::longname)
3164 (dummy_target::doc): Delete.
3165 (dummy_target::info): New.
3166 (debug_target::shortname, debug_target::longname)
3167 (debug_target::doc): Delete.
3168 (debug_target::info): New.
3169 * target.h (struct target_info): New.
3170 (target_ops::~target_ops): Add comment.
3171 (target_ops::info): New.
3172 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3173 longer virtual. Implement in terms of target_info.
3174 (set_native_target, get_native_target): Declare.
3175 (target_open_ftype): New.
3176 (add_target, add_target_with_completer)
3177 (add_deprecated_target_alias): Change prototype.
3178 (test_target) <shortname, longname, doc>: Delete.
3180 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3181 add_inf_child_target.
3182 * tracefile-tfile.c (tfile_target_info): New.
3183 (tfile_target) <shortname, longname, doc>: Delete.
3185 (tfile_target::open): Rename to ...
3186 (tfile_target_open): ... this.
3187 (_initialize_tracefile_tfile): Adjust.
3188 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3189 add_inf_child_target.
3190 * windows-nat.c (_initialize_windows_nat): Use
3191 add_inf_child_target.
3192 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3193 add_inf_child_target.
3195 2018-05-02 Pedro Alves <palves@redhat.com>
3197 * linux-nat.h (linux_nat_target) <low_new_thread,
3198 low_delete_thread, low_new_fork, low_forget_process,
3199 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3200 New virtual methods.
3201 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3202 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3203 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3204 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3205 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3207 * linux-fork.c (delete_fork): Adjust to call low method.
3208 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3209 (linux_nat_new_fork, linux_nat_forget_process_hook)
3210 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3211 (linux_nat_status_is_event):
3212 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3213 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3215 (sigtrap_is_event): Rename to ...
3216 (linux_nat_target::low_status_is_event): ... this.
3217 (linux_nat_set_status_is_event): Delete.
3218 (save_stop_reason, linux_nat_wait_1)
3219 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3221 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3222 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3223 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3224 (linux_nat_set_prepare_to_resume): Delete.
3225 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3226 low virtual methods.
3227 * amd64-linux-nat.c: Likewise.
3228 * arm-linux-nat.c: Likewise.
3229 * i386-linux-nat.c: Likewise.
3230 * ia64-linux-nat.c: Likewise.
3231 * mips-linux-nat.c: Likewise.
3232 * ppc-linux-nat.c: Likewise.
3233 * s390-linux-nat.c: Likewise.
3234 * sparc64-linux-nat.c: Likewise.
3235 * x86-linux-nat.c: Likewise.
3236 * x86-linux-nat.h: Include "nat/x86-linux.h".
3237 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3238 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3241 2018-05-02 Pedro Alves <palves@redhat.com>
3243 * target.h (target_ops)
3244 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3245 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3246 stopped_by_watchpoint, have_continuable_watchpoint,
3247 stopped_data_address, watchpoint_addr_within_range,
3248 can_accel_watchpoint_condition, can_run, thread_alive,
3249 has_all_memory, has_memory, has_stack, has_registers,
3250 has_execution, can_async_p, is_async_p, supports_non_stop,
3251 always_non_stop_p, can_execute_reverse, supports_multi_process,
3252 supports_enable_disable_tracepoint,
3253 supports_disable_randomization, supports_string_tracing,
3254 supports_evaluation_of_breakpoint_conditions,
3255 can_run_breakpoint_commands, filesystem_is_local,
3256 can_download_tracepoint, get_trace_state_variable_value,
3257 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3258 record_is_replaying, record_will_replay,
3259 augmented_libraries_svr4_read>: Adjust to return bool.
3260 * aarch64-linux-nat.c: All implementations adjusted.
3261 * aix-thread.c: All implementations adjusted.
3262 * arm-linux-nat.c: All implementations adjusted.
3263 * breakpoint.c: All implementations adjusted.
3264 * bsd-kvm.c: All implementations adjusted.
3265 * bsd-uthread.c: All implementations adjusted.
3266 * corelow.c: All implementations adjusted.
3267 * ctf.c: All implementations adjusted.
3268 * darwin-nat.c: All implementations adjusted.
3269 * darwin-nat.h: All implementations adjusted.
3270 * exec.c: All implementations adjusted.
3271 * fbsd-nat.c: All implementations adjusted.
3272 * fbsd-nat.h: All implementations adjusted.
3273 * gnu-nat.c: All implementations adjusted.
3274 * gnu-nat.h: All implementations adjusted.
3275 * go32-nat.c: All implementations adjusted.
3276 * ia64-linux-nat.c: All implementations adjusted.
3277 * inf-child.c: All implementations adjusted.
3278 * inf-child.h: All implementations adjusted.
3279 * inf-ptrace.c: All implementations adjusted.
3280 * inf-ptrace.h: All implementations adjusted.
3281 * linux-nat.c: All implementations adjusted.
3282 * linux-nat.h: All implementations adjusted.
3283 * mips-linux-nat.c: All implementations adjusted.
3284 * nto-procfs.c: All implementations adjusted.
3285 * ppc-linux-nat.c: All implementations adjusted.
3286 * procfs.c: All implementations adjusted.
3287 * ravenscar-thread.c: All implementations adjusted.
3288 * record-btrace.c: All implementations adjusted.
3289 * record-full.c: All implementations adjusted.
3290 * remote-sim.c: All implementations adjusted.
3291 * remote.c: All implementations adjusted.
3292 * s390-linux-nat.c: All implementations adjusted.
3293 * sol-thread.c: All implementations adjusted.
3294 * spu-multiarch.c: All implementations adjusted.
3295 * target-delegates.c: All implementations adjusted.
3296 * target.c: All implementations adjusted.
3297 * target.h: All implementations adjusted.
3298 * tracefile-tfile.c: All implementations adjusted.
3299 * tracefile.c: All implementations adjusted.
3300 * tracefile.h: All implementations adjusted.
3301 * windows-nat.c: All implementations adjusted.
3302 * x86-linux-nat.h: All implementations adjusted.
3303 * x86-nat.h: All implementations adjusted.
3305 2018-05-02 Pedro Alves <palves@redhat.com>
3307 * make-target-delegates (scan_target_h): Don't trim lines here.
3308 Replace sequences of tabs and/or whitespace with a single
3310 (top level, parsing methods): Trim each line before processing it
3313 2018-05-02 Pedro Alves <palves@redhat.com>
3314 John Baldwin <jhb@freebsd.org>
3316 * target.h (enum strata) <debug_stratum>: New.
3317 (struct target_ops) <all delegation methods>: Replace by C++
3318 virtual methods, and drop "to_" prefix. All references updated
3320 <to_shortname, to_longname, to_doc, to_data,
3321 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3322 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3323 virtual methods. All references updated throughout.
3324 <can_attach, supports_terminal_ours, can_create_inferior,
3325 get_thread_control_capabilities, attach_no_wait>: New
3327 <insert_breakpoint, remove_breakpoint>: Now
3328 TARGET_DEFAULT_NORETURN methods.
3329 <info_proc>: Now returns bool.
3331 (OPS_MAGIC): Delete.
3332 (current_target): Delete. All references replaced by references
3334 (target_stack): ... this. New.
3335 (target_shortname, target_longname): Adjust.
3336 (target_can_run): Now a function declaration.
3337 (default_child_has_all_memory, default_child_has_memory)
3338 (default_child_has_stack, default_child_has_registers)
3339 (default_child_has_execution): Remove target_ops parameter.
3340 (complete_target_initialization): Delete.
3341 (memory_breakpoint_target): New template class.
3342 (test_target_ops): Refactor as a C++ class with virtual methods.
3343 * make-target-delegates (NAME_PART): Tighten.
3344 (POINTER_PART, CP_SYMBOL): New.
3345 (SIMPLE_RETURN_PART): Reimplement.
3346 (VEC_RETURN_PART): Expect less.
3347 (RETURN_PART, VIRTUAL_PART): New.
3348 (METHOD): Adjust to C++ virtual methods.
3349 (scan_target_h): Remove reference to C99.
3350 (dname): Output "target_ops::" prefix.
3351 (write_function_header): Adjust to output a C++ class method.
3352 (write_declaration): New.
3353 (write_delegator): Adjust to output a C++ class method.
3354 (tdname): Output "dummy_target::" prefix.
3355 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3357 (tdefault_names, debug_names): Delete.
3358 (return_types, tdefaults, styles, argtypes_array): New.
3359 (top level): All methods are delegators.
3361 (top level): Print dummy_target and debug_target classes.
3362 * target-delegates.c: Regenerate.
3363 * target-debug.h (target_debug_print_enum_info_proc_what)
3364 (target_debug_print_thread_control_capabilities)
3365 (target_debug_print_thread_info_p): New.
3366 * target.c (dummy_target): Delete.
3367 (the_dummy_target, the_debug_target): New.
3368 (target_stack): Now extern.
3369 (set_targetdebug): Push/unpush debug target.
3370 (default_child_has_all_memory, default_child_has_memory)
3371 (default_child_has_stack, default_child_has_registers)
3372 (default_child_has_execution): Remove target_ops parameter.
3373 (complete_target_initialization): Delete.
3374 (add_target_with_completer): No longer call
3375 complete_target_initialization.
3376 (target_supports_terminal_ours): Use regular delegation.
3377 (update_current_target): Delete.
3378 (push_target): No longer check magic number. Don't call
3379 update_current_target.
3380 (unpush_target): Don't call update_current_target.
3381 (target_is_pushed): No longer check magic number.
3382 (target_require_runnable): Skip for all stratums over
3384 (target_ops::info_proc): New.
3385 (target_info_proc): Use find_target_at and
3386 find_default_run_target.
3387 (target_supports_disable_randomization): Use regular delegation.
3388 (target_get_osdata): Use find_target_at.
3389 (target_ops::open, target_ops::close, target_ops::can_attach)
3390 (target_ops::attach, target_ops::can_create_inferior)
3391 (target_ops::create_inferior, target_ops::can_run)
3392 (target_can_run): New.
3393 (default_fileio_target): Use regular delegation.
3394 (target_ops::fileio_open, target_ops::fileio_pwrite)
3395 (target_ops::fileio_pread, target_ops::fileio_fstat)
3396 (target_ops::fileio_close, target_ops::fileio_unlink)
3397 (target_ops::fileio_readlink): New.
3398 (target_fileio_open_1, target_fileio_unlink)
3399 (target_fileio_readlink): Always call the target method. Handle
3401 (return_zero, return_zero_has_execution): Delete.
3402 (init_dummy_target): Delete.
3403 (dummy_target::dummy_target, dummy_target::shortname)
3404 (dummy_target::longname, dummy_target::doc)
3405 (debug_target::debug_target, debug_target::shortname)
3406 (debug_target::longname, debug_target::doc): New.
3407 (target_supports_delete_record): Use regular delegation.
3408 (setup_target_debug): Delete.
3409 (maintenance_print_target_stack): Skip debug_stratum.
3410 (initialize_targets): Instantiate the_dummy_target and
3412 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3414 (target_auxv_search, fprint_target_auxv): Adjust.
3415 (info_auxv_command): Adjust to use target_stack.
3416 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3417 * exceptions.c (print_flush): Handle a NULL target_stack.
3418 * regcache.c (target_ops_no_register): Refactor as class with
3421 * exec.c (exec_target): New class.
3422 (exec_ops): Now an exec_target.
3423 (exec_open, exec_close_1, exec_get_section_table)
3424 (exec_xfer_partial, exec_files_info, exec_has_memory)
3425 (exec_make_note_section): Refactor as exec_target methods.
3426 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3428 (exec_target::find_memory_regions): New.
3429 (_initialize_exec): Don't call init_exec_ops.
3430 * gdbcore.h (exec_file_clear): Delete.
3432 * corefile.c (core_target): Delete.
3433 (core_file_command): Adjust.
3434 * corelow.c (core_target): New class.
3435 (the_core_target): New.
3436 (core_close): Remove target_ops parameter.
3437 (core_close_cleanup): Adjust.
3438 (core_target::close): New.
3439 (core_open, core_detach, get_core_registers, core_files_info)
3440 (core_xfer_partial, core_thread_alive, core_read_description)
3441 (core_pid_to_str, core_thread_name, core_has_memory)
3442 (core_has_stack, core_has_registers, core_info_proc): Rework as
3443 core_target methods.
3444 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3445 (_initialize_corelow): Initialize the_core_target.
3446 * gdbcore.h (core_target): Delete.
3447 (the_core_target): New.
3449 * ctf.c: (ctf_target): New class.
3450 (ctf_ops): Now a ctf_target.
3451 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3452 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3453 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3455 (init_ctf_ops): Delete.
3456 (_initialize_ctf): Don't call it.
3457 * tracefile-tfile.c (tfile_target): New class.
3458 (tfile_ops): Now a tfile_target.
3459 (tfile_open, tfile_close, tfile_files_info)
3460 (tfile_get_tracepoint_status, tfile_trace_find)
3461 (tfile_fetch_registers, tfile_xfer_partial)
3462 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3463 Refactor as tfile_target methods.
3464 (tfile_xfer_partial_features): Remove target_ops parameter.
3465 (init_tfile_ops): Delete.
3466 (_initialize_tracefile_tfile): Don't call it.
3467 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3468 (tracefile_has_stack, tracefile_has_registers)
3469 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3470 tracefile_target methods.
3471 (init_tracefile_ops): Delete.
3472 (tracefile_target::tracefile_target): New.
3473 * tracefile.h: Include "target.h".
3474 (tracefile_target): New class.
3475 (init_tracefile_ops): Delete.
3477 * spu-multiarch.c (spu_multiarch_target): New class.
3478 (spu_ops): Now a spu_multiarch_target.
3479 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3480 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3481 (spu_search_memory, spu_mourn_inferior): Refactor as
3482 spu_multiarch_target methods.
3483 (init_spu_ops): Delete.
3484 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3485 complete_target_initialization.
3487 * ravenscar-thread.c (ravenscar_thread_target): New class.
3488 (ravenscar_ops): Now a ravenscar_thread_target.
3489 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3490 (ravenscar_thread_alive, ravenscar_pid_to_str)
3491 (ravenscar_fetch_registers, ravenscar_store_registers)
3492 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3493 (ravenscar_stopped_by_hw_breakpoint)
3494 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3495 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3496 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3498 (init_ravenscar_thread_ops): Delete.
3499 (_initialize_ravenscar): Remove references to
3500 init_ravenscar_thread_ops and complete_target_initialization.
3502 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3503 (bsd_uthread_target): New class.
3504 (bsd_uthread_ops): Now a bsd_uthread_target.
3505 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3506 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3507 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3508 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3509 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3510 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3511 (bsd_uthread_target): Delete function.
3512 (_initialize_bsd_uthread): Remove reference to
3513 complete_target_initialization.
3515 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3516 (target_bfd): ... this new class.
3517 (target_bfd_xfer_partial, target_bfd_get_section_table)
3518 (target_bfd_close): Refactor as target_bfd methods.
3519 (target_bfd::~target_bfd): New.
3520 (target_bfd_reopen): Adjust.
3521 (target_bfd::close): New.
3523 * record-btrace.c (record_btrace_target): New class.
3524 (record_btrace_ops): Now a record_btrace_target.
3525 (record_btrace_open, record_btrace_stop_recording)
3526 (record_btrace_disconnect, record_btrace_close)
3527 (record_btrace_async, record_btrace_info)
3528 (record_btrace_insn_history, record_btrace_insn_history_range)
3529 (record_btrace_insn_history_from, record_btrace_call_history)
3530 (record_btrace_call_history_range)
3531 (record_btrace_call_history_from, record_btrace_record_method)
3532 (record_btrace_is_replaying, record_btrace_will_replay)
3533 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3534 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3535 (record_btrace_store_registers, record_btrace_prepare_to_store)
3536 (record_btrace_to_get_unwinder)
3537 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3538 (record_btrace_commit_resume, record_btrace_wait)
3539 (record_btrace_stop, record_btrace_can_execute_reverse)
3540 (record_btrace_stopped_by_sw_breakpoint)
3541 (record_btrace_supports_stopped_by_sw_breakpoint)
3542 (record_btrace_stopped_by_hw_breakpoint)
3543 (record_btrace_supports_stopped_by_hw_breakpoint)
3544 (record_btrace_update_thread_list, record_btrace_thread_alive)
3545 (record_btrace_goto_begin, record_btrace_goto_end)
3546 (record_btrace_goto, record_btrace_stop_replaying_all)
3547 (record_btrace_execution_direction)
3548 (record_btrace_prepare_to_generate_core)
3549 (record_btrace_done_generating_core): Refactor as
3550 record_btrace_target methods.
3551 (init_record_btrace_ops): Delete.
3552 (_initialize_record_btrace): Remove reference to
3553 init_record_btrace_ops.
3554 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3555 the execution_direction global.
3556 (record_full_base_target, record_full_target)
3557 (record_full_core_target): New classes.
3558 (record_full_ops): Now a record_full_target.
3559 (record_full_core_ops): Now a record_full_core_target.
3560 (record_full_target::detach, record_full_target::disconnect)
3561 (record_full_core_target::disconnect)
3562 (record_full_target::mourn_inferior, record_full_target::kill):
3564 (record_full_open, record_full_close, record_full_async): Refactor
3565 as methods of the record_full_base_target class.
3566 (record_full_resume, record_full_commit_resume): Refactor
3567 as methods of the record_full_target class.
3568 (record_full_wait, record_full_stopped_by_watchpoint)
3569 (record_full_stopped_data_address)
3570 (record_full_stopped_by_sw_breakpoint)
3571 (record_full_supports_stopped_by_sw_breakpoint)
3572 (record_full_stopped_by_hw_breakpoint)
3573 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3574 methods of the record_full_base_target class.
3575 (record_full_store_registers, record_full_xfer_partial)
3576 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3577 Refactor as methods of the record_full_target class.
3578 (record_full_can_execute_reverse, record_full_get_bookmark)
3579 (record_full_goto_bookmark, record_full_execution_direction)
3580 (record_full_record_method, record_full_info, record_full_delete)
3581 (record_full_is_replaying, record_full_will_replay)
3582 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3583 (record_full_stop_replaying): Refactor as methods of the
3584 record_full_base_target class.
3585 (record_full_core_resume, record_full_core_kill)
3586 (record_full_core_fetch_registers)
3587 (record_full_core_prepare_to_store)
3588 (record_full_core_store_registers, record_full_core_xfer_partial)
3589 (record_full_core_insert_breakpoint)
3590 (record_full_core_remove_breakpoint)
3591 (record_full_core_has_execution): Refactor
3592 as methods of the record_full_core_target class.
3593 (record_full_base_target::supports_delete_record): New.
3594 (init_record_full_ops): Delete.
3595 (init_record_full_core_ops): Delete.
3596 (record_full_save): Refactor as method of the
3597 record_full_base_target class.
3598 (_initialize_record_full): Remove references to
3599 init_record_full_ops and init_record_full_core_ops.
3601 * remote.c (remote_target, extended_remote_target): New classes.
3602 (remote_ops): Now a remote_target.
3603 (extended_remote_ops): Now an extended_remote_target.
3604 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3605 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3606 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3607 (remote_pass_signals, remote_set_syscall_catchpoint)
3608 (remote_program_signals, )
3609 (remote_thread_always_alive): Remove target_ops parameter.
3610 (remote_thread_alive, remote_thread_name)
3611 (remote_update_thread_list, remote_threads_extra_info)
3612 (remote_static_tracepoint_marker_at)
3613 (remote_static_tracepoint_markers_by_strid)
3614 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3615 (remote_open): Refactor as methods of remote_target.
3616 (extended_remote_open, extended_remote_detach)
3617 (extended_remote_attach, extended_remote_post_attach):
3618 (extended_remote_supports_disable_randomization)
3619 (extended_remote_create_inferior): : Refactor as method of
3620 extended_remote_target.
3621 (remote_set_permissions, remote_open_1, remote_detach)
3622 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3623 (remote_resume, remote_commit_resume, remote_stop)
3624 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3625 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3626 (remote_prepare_to_store, remote_store_registers)
3627 (remote_flash_erase, remote_flash_done, remote_files_info)
3628 (remote_kill, remote_mourn, remote_insert_breakpoint)
3629 (remote_remove_breakpoint, remote_insert_watchpoint)
3630 (remote_watchpoint_addr_within_range)
3631 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3632 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3633 (remote_supports_stopped_by_sw_breakpoint)
3634 (remote_stopped_by_hw_breakpoint)
3635 (remote_supports_stopped_by_hw_breakpoint)
3636 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3637 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3638 (remote_verify_memory): Refactor as methods of remote_target.
3639 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3641 (remote_xfer_partial, remote_get_memory_xfer_limit)
3642 (remote_search_memory, remote_rcmd, remote_memory_map)
3643 (remote_pid_to_str, remote_get_thread_local_address)
3644 (remote_get_tib_address, remote_read_description): Refactor as
3645 methods of remote_target.
3646 (remote_target::fileio_open, remote_target::fileio_pwrite)
3647 (remote_target::fileio_pread, remote_target::fileio_close): New.
3648 (remote_hostio_readlink, remote_hostio_fstat)
3649 (remote_filesystem_is_local, remote_can_execute_reverse)
3650 (remote_supports_non_stop, remote_supports_disable_randomization)
3651 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3652 (remote_supports_enable_disable_tracepoint)
3653 (remote_supports_string_tracing)
3654 (remote_can_run_breakpoint_commands, remote_trace_init)
3655 (remote_download_tracepoint, remote_can_download_tracepoint)
3656 (remote_download_trace_state_variable, remote_enable_tracepoint)
3657 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3658 (remote_trace_start, remote_get_trace_status)
3659 (remote_get_tracepoint_status, remote_trace_stop)
3660 (remote_trace_find, remote_get_trace_state_variable_value)
3661 (remote_save_trace_data, remote_get_raw_trace_data)
3662 (remote_set_disconnected_tracing, remote_core_of_thread)
3663 (remote_set_circular_trace_buffer, remote_traceframe_info)
3664 (remote_get_min_fast_tracepoint_insn_len)
3665 (remote_set_trace_buffer_size, remote_set_trace_notes)
3666 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3667 (remote_disable_btrace, remote_teardown_btrace)
3668 (remote_read_btrace, remote_btrace_conf)
3669 (remote_augmented_libraries_svr4_read, remote_load)
3670 (remote_pid_to_exec_file, remote_can_do_single_step)
3671 (remote_execution_direction, remote_thread_handle_to_thread_info):
3672 Refactor as methods of remote_target.
3673 (init_remote_ops, init_extended_remote_ops): Delete.
3674 (remote_can_async_p, remote_is_async_p, remote_async)
3675 (remote_thread_events, remote_upload_tracepoints)
3676 (remote_upload_trace_state_variables): Refactor as methods of
3678 (_initialize_remote): Remove references to init_remote_ops and
3679 init_extended_remote_ops.
3681 * remote-sim.c (gdbsim_target): New class.
3682 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3683 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3684 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3685 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3686 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3687 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3688 Refactor as methods of gdbsim_target.
3689 (gdbsim_ops): Now a gdbsim_target.
3690 (init_gdbsim_ops): Delete.
3691 (gdbsim_cntrl_c): Adjust.
3692 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3694 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3695 (the_amd64_linux_nat_target): New.
3696 (amd64_linux_fetch_inferior_registers)
3697 (amd64_linux_store_inferior_registers): Refactor as methods of
3698 amd64_linux_nat_target.
3699 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3700 * i386-linux-nat.c: Don't include "linux-nat.h".
3701 (i386_linux_nat_target): New class.
3702 (the_i386_linux_nat_target): New.
3703 (i386_linux_fetch_inferior_registers)
3704 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3705 as methods of i386_linux_nat_target.
3706 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3707 * inf-child.c (inf_child_ops): Delete.
3708 (inf_child_fetch_inferior_registers)
3709 (inf_child_store_inferior_registers): Delete.
3710 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3711 methods of inf_child_target.
3712 (inf_child_target::supports_terminal_ours)
3713 (inf_child_target::terminal_init)
3714 (inf_child_target::terminal_inferior)
3715 (inf_child_target::terminal_ours_for_output)
3716 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3717 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3719 (inf_child_open, inf_child_disconnect, inf_child_close)
3720 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3721 (inf_child_post_startup_inferior, inf_child_can_run)
3722 (inf_child_pid_to_exec_file): Refactor as methods of
3724 (inf_child_follow_fork): Delete.
3725 (inf_child_target::can_create_inferior)
3726 (inf_child_target::can_attach): New.
3727 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3728 (inf_child_target::has_stack, inf_child_target::has_registers)
3729 (inf_child_target::has_execution): New.
3730 (inf_child_fileio_open, inf_child_fileio_pwrite)
3731 (inf_child_fileio_pread, inf_child_fileio_fstat)
3732 (inf_child_fileio_close, inf_child_fileio_unlink)
3733 (inf_child_fileio_readlink, inf_child_use_agent)
3734 (inf_child_can_use_agent): Refactor as methods of
3736 (return_zero, inf_child_target): Delete.
3737 (inf_child_target::inf_child_target): New.
3738 * inf-child.h: Include "target.h".
3739 (inf_child_target): Delete function prototype.
3740 (inf_child_target): New class.
3741 (inf_child_open_target, inf_child_mourn_inferior)
3742 (inf_child_maybe_unpush_target): Delete.
3743 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3744 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3745 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3746 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3747 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3748 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3749 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3750 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3751 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3752 methods of inf_ptrace_target.
3753 (inf_ptrace_target): Delete function.
3754 * inf-ptrace.h: Include "inf-child.h".
3755 (inf_ptrace_target): Delete function declaration.
3756 (inf_ptrace_target): New class.
3757 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3758 * linux-nat.c (linux_target): New.
3759 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3760 (linux_nat_target::~linux_nat_target): New.
3761 (linux_child_post_attach, linux_child_post_startup_inferior)
3762 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3763 (linux_child_remove_fork_catchpoint)
3764 (linux_child_insert_vfork_catchpoint)
3765 (linux_child_remove_vfork_catchpoint)
3766 (linux_child_insert_exec_catchpoint)
3767 (linux_child_remove_exec_catchpoint)
3768 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3769 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3770 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3771 (linux_nat_stopped_data_address)
3772 (linux_nat_stopped_by_sw_breakpoint)
3773 (linux_nat_supports_stopped_by_sw_breakpoint)
3774 (linux_nat_stopped_by_hw_breakpoint)
3775 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3776 (linux_nat_kill, linux_nat_mourn_inferior)
3777 (linux_nat_xfer_partial, linux_nat_thread_alive)
3778 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3779 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3780 (linux_child_static_tracepoint_markers_by_strid)
3781 (linux_nat_is_async_p, linux_nat_can_async_p)
3782 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3783 (linux_nat_supports_multi_process)
3784 (linux_nat_supports_disable_randomization, linux_nat_async)
3785 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3786 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3787 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3788 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3789 methods of linux_nat_target.
3790 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3791 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3793 (check_stopped_by_watchpoint): Adjust.
3794 (linux_xfer_partial): Delete.
3795 (linux_target_install_ops, linux_target, linux_nat_add_target):
3797 (linux_nat_target::linux_nat_target): New.
3798 * linux-nat.h: Include "inf-ptrace.h".
3799 (linux_nat_target): New.
3800 (linux_target, linux_target_install_ops, linux_nat_add_target):
3801 Delete function declarations.
3802 (linux_target): Declare global.
3803 * linux-thread-db.c (thread_db_target): New.
3804 (thread_db_target::thread_db_target): New.
3805 (thread_db_ops): Delete.
3806 (the_thread_db_target): New.
3807 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3808 (thread_db_update_thread_list, thread_db_pid_to_str)
3809 (thread_db_extra_thread_info)
3810 (thread_db_thread_handle_to_thread_info)
3811 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3812 (thread_db_resume): Refactor as methods of thread_db_target.
3813 (init_thread_db_ops): Delete.
3814 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3815 * x86-linux-nat.c: Don't include "linux-nat.h".
3816 (super_post_startup_inferior): Delete.
3817 (x86_linux_nat_target::~x86_linux_nat_target): New.
3818 (x86_linux_child_post_startup_inferior)
3819 (x86_linux_read_description, x86_linux_enable_btrace)
3820 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3821 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3822 methods of x86_linux_nat_target.
3823 (x86_linux_create_target): Delete. Bits folded ...
3824 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3826 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3827 (x86_linux_nat_target): New class.
3828 (x86_linux_create_target): Delete.
3829 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3830 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3831 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3832 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3833 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3834 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3836 (x86_use_watchpoints): Delete.
3837 * x86-nat.h: Include "breakpoint.h" and "target.h".
3838 (x86_use_watchpoints): Delete.
3839 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3840 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3841 (x86_insert_watchpoint, x86_remove_watchpoint)
3842 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3843 (x86_stopped_by_hw_breakpoint): New declarations.
3844 (x86_nat_target): New template class.
3846 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3847 (the_ppc_linux_nat_target): New.
3848 (ppc_linux_fetch_inferior_registers)
3849 (ppc_linux_can_use_hw_breakpoint)
3850 (ppc_linux_region_ok_for_hw_watchpoint)
3851 (ppc_linux_ranged_break_num_registers)
3852 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3853 (ppc_linux_insert_mask_watchpoint)
3854 (ppc_linux_remove_mask_watchpoint)
3855 (ppc_linux_can_accel_watchpoint_condition)
3856 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3857 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3858 (ppc_linux_watchpoint_addr_within_range)
3859 (ppc_linux_masked_watch_num_registers)
3860 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3861 (ppc_linux_read_description): Refactor as methods of
3862 ppc_linux_nat_target.
3863 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3865 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3866 (procfs_target): New class.
3867 (the_procfs_target): New.
3868 (procfs_target): Delete function.
3869 (procfs_auxv_parse, procfs_attach, procfs_detach)
3870 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3871 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3872 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3873 (procfs_create_inferior, procfs_update_thread_list)
3874 (procfs_thread_alive, procfs_pid_to_str)
3875 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3876 (procfs_stopped_data_address, procfs_insert_watchpoint)
3877 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3878 (proc_find_memory_regions, procfs_info_proc)
3879 (procfs_make_note_section): Refactor as methods of procfs_target.
3880 (_initialize_procfs): Adjust.
3881 * sol-thread.c (sol_thread_target): New class.
3882 (sol_thread_ops): Now a sol_thread_target.
3883 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
3884 (sol_thread_fetch_registers, sol_thread_store_registers)
3885 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
3886 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
3887 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
3888 (init_sol_thread_ops): Delete.
3889 (_initialize_sol_thread): Adjust. Remove references to
3890 init_sol_thread_ops and complete_target_initialization.
3892 * windows-nat.c (windows_nat_target): New class.
3893 (windows_fetch_inferior_registers)
3894 (windows_store_inferior_registers, windows_resume, windows_wait)
3895 (windows_attach, windows_detach, windows_pid_to_exec_file)
3896 (windows_files_info, windows_create_inferior)
3897 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
3898 (windows_close, windows_pid_to_str, windows_xfer_partial)
3899 (windows_get_tib_address, windows_get_ada_task_ptid)
3900 (windows_thread_name, windows_thread_alive): Refactor as
3901 windows_nat_target methods.
3902 (do_initial_windows_stuff): Adjust.
3903 (windows_target): Delete function.
3904 (_initialize_windows_nat): Adjust.
3906 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
3907 (darwin_mourn_inferior, darwin_kill_inferior)
3908 (darwin_create_inferior, darwin_attach, darwin_detach)
3909 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
3910 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
3911 (darwin_supports_multi_process): Refactor as darwin_nat_target
3913 (darwin_resume_to, darwin_files_info): Delete.
3914 (_initialize_darwin_inferior): Rename to ...
3915 (_initialize_darwin_nat): ... this. Adjust to C++ification.
3916 * darwin-nat.h: Include "inf-child.h".
3917 (darwin_nat_target): New class.
3918 (darwin_complete_target): Delete.
3919 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3920 (darwin_target): New.
3921 (i386_darwin_fetch_inferior_registers)
3922 (i386_darwin_store_inferior_registers): Refactor as methods of
3924 (darwin_complete_target): Delete, with ...
3925 (_initialize_i386_darwin_nat): ... bits factored out here.
3927 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3928 (the_alpha_linux_nat_target): New.
3929 (alpha_linux_register_u_offset): Refactor as
3930 alpha_linux_nat_target method.
3931 (_initialize_alpha_linux_nat): Adjust.
3932 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3933 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3934 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3935 methods of linux_nat_trad_target.
3936 (linux_trad_target): Delete.
3937 * linux-nat-trad.h (linux_trad_target): Delete function.
3938 (linux_nat_trad_target): New class.
3939 * mips-linux-nat.c (mips_linux_nat_target): New class.
3940 (super_fetch_registers, super_store_registers, super_close):
3942 (the_mips_linux_nat_target): New.
3943 (mips64_linux_regsets_fetch_registers)
3944 (mips64_linux_regsets_store_registers)
3945 (mips64_linux_fetch_registers, mips64_linux_store_registers)
3946 (mips_linux_register_u_offset, mips_linux_read_description)
3947 (mips_linux_can_use_hw_breakpoint)
3948 (mips_linux_stopped_by_watchpoint)
3949 (mips_linux_stopped_data_address)
3950 (mips_linux_region_ok_for_hw_watchpoint)
3951 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3952 (mips_linux_close): Refactor as methods of mips_linux_nat.
3953 (_initialize_mips_linux_nat): Adjust to C++ification.
3955 * aix-thread.c (aix_thread_target): New class.
3956 (aix_thread_ops): Now an aix_thread_target.
3957 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3958 (aix_thread_fetch_registers, aix_thread_store_registers)
3959 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3960 (aix_thread_thread_alive, aix_thread_pid_to_str)
3961 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3962 Refactor as methods of aix_thread_target.
3963 (init_aix_thread_ops): Delete.
3964 (_initialize_aix_thread): Remove references to init_aix_thread_ops
3965 and complete_target_initialization.
3966 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3967 (rs6000_nat_target): New class.
3968 (the_rs6000_nat_target): New.
3969 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3970 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3971 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3972 (super_create_inferior): Delete.
3973 (_initialize_rs6000_nat): Adjust to C++ification.
3975 * arm-linux-nat.c (arm_linux_nat_target): New class.
3976 (the_arm_linux_nat_target): New.
3977 (arm_linux_fetch_inferior_registers)
3978 (arm_linux_store_inferior_registers, arm_linux_read_description)
3979 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3980 (arm_linux_remove_hw_breakpoint)
3981 (arm_linux_region_ok_for_hw_watchpoint)
3982 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3983 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3984 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3985 arm_linux_nat_target.
3986 (_initialize_arm_linux_nat): Adjust to C++ification.
3988 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3989 (the_aarch64_linux_nat_target): New.
3990 (aarch64_linux_fetch_inferior_registers)
3991 (aarch64_linux_store_inferior_registers)
3992 (aarch64_linux_child_post_startup_inferior)
3993 (aarch64_linux_read_description)
3994 (aarch64_linux_can_use_hw_breakpoint)
3995 (aarch64_linux_insert_hw_breakpoint)
3996 (aarch64_linux_remove_hw_breakpoint)
3997 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3998 (aarch64_linux_region_ok_for_hw_watchpoint)
3999 (aarch64_linux_stopped_data_address)
4000 (aarch64_linux_stopped_by_watchpoint)
4001 (aarch64_linux_watchpoint_addr_within_range)
4002 (aarch64_linux_can_do_single_step): Refactor as methods of
4003 aarch64_linux_nat_target.
4004 (super_post_startup_inferior): Delete.
4005 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4007 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4008 (the_hppa_linux_nat_target): New.
4009 (hppa_linux_fetch_inferior_registers)
4010 (hppa_linux_store_inferior_registers): Refactor as methods of
4011 hppa_linux_nat_target.
4012 (_initialize_hppa_linux_nat): Adjust to C++ification.
4014 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4015 (the_ia64_linux_nat_target): New.
4016 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4017 (ia64_linux_stopped_data_address)
4018 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4019 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4020 ia64_linux_nat_target methods.
4021 (super_xfer_partial): Delete.
4022 (_initialize_ia64_linux_nat): Adjust to C++ification.
4024 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4025 (the_m32r_linux_nat_target): New.
4026 (m32r_linux_fetch_inferior_registers)
4027 (m32r_linux_store_inferior_registers): Refactor as
4028 m32r_linux_nat_target methods.
4029 (_initialize_m32r_linux_nat): Adjust to C++ification.
4031 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4032 (the_m68k_linux_nat_target): New.
4033 (m68k_linux_fetch_inferior_registers)
4034 (m68k_linux_store_inferior_registers): Refactor as
4035 m68k_linux_nat_target methods.
4036 (_initialize_m68k_linux_nat): Adjust to C++ification.
4038 * s390-linux-nat.c (s390_linux_nat_target): New class.
4039 (the_s390_linux_nat_target): New.
4040 (s390_linux_fetch_inferior_registers)
4041 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4042 (s390_insert_watchpoint, s390_remove_watchpoint)
4043 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4044 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4045 (s390_auxv_parse, s390_read_description): Refactor as methods of
4046 s390_linux_nat_target.
4047 (_initialize_s390_nat): Adjust to C++ification.
4049 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4050 (the_sparc_linux_nat_target): New.
4051 (_initialize_sparc_linux_nat): Adjust to C++ification.
4052 * sparc-nat.c (sparc_fetch_inferior_registers)
4053 (sparc_store_inferior_registers): Remove target_ops parameter.
4054 * sparc-nat.h (sparc_fetch_inferior_registers)
4055 (sparc_store_inferior_registers): Remove target_ops parameter.
4056 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4057 (the_sparc64_linux_nat_target): New.
4058 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4060 * spu-linux-nat.c (spu_linux_nat_target): New class.
4061 (the_spu_linux_nat_target): New.
4062 (spu_child_post_startup_inferior, spu_child_post_attach)
4063 (spu_child_wait, spu_fetch_inferior_registers)
4064 (spu_store_inferior_registers, spu_xfer_partial)
4065 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4067 (_initialize_spu_nat): Adjust to C++ification.
4069 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4070 (the_tilegx_linux_nat_target): New.
4071 (fetch_inferior_registers, store_inferior_registers):
4072 Refactor as methods.
4073 (_initialize_tile_linux_nat): Adjust to C++ification.
4075 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4076 (the_xtensa_linux_nat_target): New.
4077 (xtensa_linux_fetch_inferior_registers)
4078 (xtensa_linux_store_inferior_registers): Refactor as
4079 xtensa_linux_nat_target methods.
4080 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4082 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4083 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4084 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4085 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4086 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4087 (fbsd_stopped_by_sw_breakpoint)
4088 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4089 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4090 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4091 (fbsd_post_startup_inferior, fbsd_post_attach)
4092 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4093 (fbsd_set_syscall_catchpoint)
4094 (super_xfer_partial, super_resume, super_wait)
4095 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4096 (fbsd_handle_debug_trap): Remove target_ops parameter.
4097 (fbsd_nat_add_target): Delete.
4098 * fbsd-nat.h: Include "inf-ptrace.h".
4099 (fbsd_nat_add_target): Delete.
4100 (USE_SIGTRAP_SIGINFO): Define.
4101 (fbsd_nat_target): New class.
4103 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4104 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4105 (amd64bsd_target): Delete.
4106 * amd64-bsd-nat.h: New file.
4107 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4109 (amd64_fbsd_nat_target): New class.
4110 (the_amd64_fbsd_nat_target): New.
4111 (amd64fbsd_read_description): Refactor as method of
4112 amd64_fbsd_nat_target.
4113 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4114 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4115 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4116 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4117 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4118 (i386bsd_target): Delete.
4119 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4120 (i386bsd_fetch_inferior_registers)
4121 (i386bsd_store_inferior_registers): Declare.
4122 (i386_bsd_nat_target): New class.
4123 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4124 (the_i386_fbsd_nat_target): New.
4125 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4126 i386_fbsd_nat_target methods.
4127 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4128 (_initialize_i386fbsd_nat): Adjust to C++ification.
4129 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4130 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4131 (_initialize_x86_bsd_nat): Adjust to C++ification.
4132 * x86-bsd-nat.h: Include "x86-nat.h".
4133 (x86bsd_target): Delete declaration.
4134 (x86bsd_nat_target): New class.
4136 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4137 (the_aarch64_fbsd_nat_target): New.
4138 (aarch64_fbsd_fetch_inferior_registers)
4139 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4140 aarch64_fbsd_nat_target.
4141 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4142 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4143 (the_alpha_bsd_nat_target): New.
4144 (alphabsd_fetch_inferior_registers)
4145 (alphabsd_store_inferior_registers): Refactor as
4146 alpha_bsd_nat_target methods.
4147 (_initialize_alphabsd_nat): Refactor as methods of
4148 alpha_bsd_nat_target.
4149 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4150 (the_amd64_nbsd_nat_target): New.
4151 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4152 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4153 (the_amd64_obsd_nat_target): New.
4154 (_initialize_amd64obsd_nat): Adjust to C++ification.
4155 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4156 (the_arm_fbsd_nat_target): New.
4157 (arm_fbsd_fetch_inferior_registers)
4158 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4159 (_initialize_arm_fbsd_nat): Refactor as methods of
4160 arm_fbsd_nat_target.
4161 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4162 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4163 (the_arm_netbsd_nat_target): New.
4164 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4165 arm_netbsd_nat_target.
4166 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4167 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4168 (the_hppa_nbsd_nat_target): New.
4169 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4170 hppa_nbsd_nat_target methods.
4171 (_initialize_hppanbsd_nat): Adjust to C++ification.
4172 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4173 (the_hppa_obsd_nat_target): New.
4174 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4175 methods of hppa_obsd_nat_target.
4176 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4178 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4179 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4181 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4182 (_initialize_i386obsd_nat): Use add_target.
4183 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4184 (the_m68k_bsd_nat_target): New.
4185 (m68kbsd_fetch_inferior_registers)
4186 (m68kbsd_store_inferior_registers): Refactor as methods of
4187 m68k_bsd_nat_target.
4188 (_initialize_m68kbsd_nat): Adjust to C++ification.
4189 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4190 (the_mips_fbsd_nat_target): New.
4191 (mips_fbsd_fetch_inferior_registers)
4192 (mips_fbsd_store_inferior_registers): Refactor as methods of
4193 mips_fbsd_nat_target.
4194 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4196 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4197 (the_mips_nbsd_nat_target): New.
4198 (mipsnbsd_fetch_inferior_registers)
4199 (mipsnbsd_store_inferior_registers): Refactor as methods of
4200 mips_nbsd_nat_target.
4201 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4202 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4203 (the_mips64_obsd_nat_target): New.
4204 (mips64obsd_fetch_inferior_registers)
4205 (mips64obsd_store_inferior_registers): Refactor as methods of
4206 mips64_obsd_nat_target.
4207 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4209 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4211 * nbsd-nat.h: Include "inf-ptrace.h".
4212 (nbsd_nat_target): New class.
4213 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4214 (obsd_wait): Refactor as methods of obsd_nat_target.
4215 (obsd_add_target): Delete.
4216 * obsd-nat.h: Include "inf-ptrace.h".
4217 (obsd_nat_target): New class.
4218 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4219 (the_ppc_fbsd_nat_target): New.
4220 (ppcfbsd_fetch_inferior_registers)
4221 (ppcfbsd_store_inferior_registers): Refactor as methods of
4222 ppc_fbsd_nat_target.
4223 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4225 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4226 (the_ppc_nbsd_nat_target): New.
4227 (ppcnbsd_fetch_inferior_registers)
4228 (ppcnbsd_store_inferior_registers): Refactor as methods of
4229 ppc_nbsd_nat_target.
4230 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4231 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4232 (the_ppc_obsd_nat_target): New.
4233 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4234 methods of ppc_obsd_nat_target.
4235 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4237 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4238 (the_sh_nbsd_nat_target): New.
4239 (shnbsd_fetch_inferior_registers)
4240 (shnbsd_store_inferior_registers): Refactor as methods of
4242 (_initialize_shnbsd_nat): Adjust to C++ification.
4243 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4244 (inf_ptrace_xfer_partial): Delete.
4245 (sparc_xfer_partial, sparc_target): Delete.
4246 * sparc-nat.h (sparc_fetch_inferior_registers)
4247 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4248 (sparc_target): Delete function declaration.
4249 (sparc_target): New template class.
4250 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4251 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4252 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4253 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4255 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4256 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4257 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4258 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4260 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4261 (the_vax_bsd_nat_target): New.
4262 (vaxbsd_fetch_inferior_registers)
4263 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4265 (_initialize_vaxbsd_nat): Adjust to C++ification.
4267 * bsd-kvm.c (bsd_kvm_target): New class.
4268 (bsd_kvm_ops): Now a bsd_kvm_target.
4269 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4270 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4271 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4273 (bsd_kvm_return_one): Delete.
4274 (bsd_kvm_add_target): Adjust to C++ification.
4276 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4277 (nto_procfs_target_procfs): New classes.
4278 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4279 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4280 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4281 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4282 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4283 (procfs_remove_hw_breakpoint, procfs_resume)
4284 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4285 (procfs_kill_inferior, procfs_store_registers)
4286 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4287 as methods of nto_procfs_target.
4288 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4289 (nto_native_ops): Delete.
4290 (procfs_open, procfs_native_open): Delete.
4291 (nto_native_ops): Now an nto_procfs_target_native.
4292 (init_procfs_targets): Adjust to C++ification.
4293 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4294 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4295 Refactor as methods of nto_procfs_target.
4297 * go32-nat.c (go32_nat_target): New class.
4298 (the_go32_nat_target): New.
4299 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4300 (go32_store_registers, go32_xfer_partial, go32_files_info)
4301 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4302 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4303 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4304 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4305 (go32_target): Delete.
4306 (_initialize_go32_nat): Adjust to C++ification.
4308 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4309 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4310 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4311 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4313 (gnu_target): Delete.
4314 * gnu-nat.h (gnu_target): Delete.
4315 (gnu_nat_target): New class.
4316 * i386-gnu-nat.c (gnu_base_target): New.
4317 (i386_gnu_nat_target): New class.
4318 (the_i386_gnu_nat_target): New.
4319 (_initialize_i386gnu_nat): Adjust to C++ification.
4321 2018-05-02 Pedro Alves <palves@redhat.com>
4323 * bfd-target.c (target_bfd_xclose): Rename to ...
4324 (target_bfd_close): ... this.
4325 (target_bfd_reopen): Adjust.
4326 * target.c (target_close): Remove references to to_xclose.
4327 * target.h (target_ops::to_xclose): Delete.
4328 (target_ops::to_close): Update comments.
4330 2018-05-02 Pedro Alves <palves@redhat.com>
4332 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4334 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4335 * inf-ptrace.c (inf_ptrace_register_u_offset)
4336 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4337 (inf_ptrace_store_register, inf_ptrace_store_registers)
4338 (inf_ptrace_trad_target): Move to ...
4339 * linux-nat-trad.c: ... this new file.
4340 * linux-nat-trad.h: New file.
4341 * linux-nat.c (linux_target_install_ops): Make extern.
4342 (linux_trad_target): Delete.
4343 * linux-nat.h (linux_trad_target): Delete declaration.
4344 (linux_target_install_ops): Declare.
4345 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4348 2018-05-02 Pedro Alves <palves@redhat.com>
4350 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4351 procfs_target/add_target here.
4352 * procfs.c (procfs_target): Make static.
4353 (_initialize_procfs): Call add_target here.
4354 * procfs.h (struct target_ops): Remove forward declaration.
4355 (procfs_target): Remove declaration.
4356 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4358 2018-05-02 Pedro Alves <palves@redhat.com>
4360 * procfs.c (procfs_stopped_by_watchpoint)
4361 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4362 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4364 (procfs_use_watchpoints): Delete, move contents...
4365 (procfs_target): ... here.
4366 * procfs.h (procfs_use_watchpoints): Delete declaration.
4367 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4368 procfs_use_watchpoints.
4369 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4370 procfs_use_watchpoints.
4372 2018-05-02 Tom Tromey <tom@tromey.com>
4375 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4376 and var_zuinteger_unlimited.
4377 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4378 and PARAM_ZUINTEGER_UNLIMITED.
4379 (set_parameter_value): Handle var_zuinteger and
4380 var_zuinteger_unlimited.
4381 (add_setshow_generic): Likewise.
4382 (parmpy_init): Likewise.
4384 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4387 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4388 pointer is not null before dereferencing it.
4390 2018-04-30 Tom Tromey <tom@tromey.com>
4392 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4395 2018-04-30 Tom Tromey <tom@tromey.com>
4397 * breakpoint.c (mention): Remove use of is_mi_like_p.
4398 (print_mention_ranged_breakpoint): Likewise.
4399 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4402 2018-04-30 Tom Tromey <tom@tromey.com>
4404 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4406 2018-04-30 Tom Tromey <tom@tromey.com>
4408 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4409 (info_spu_event_command): Remove some uses of is_mi_like_p.
4411 2018-04-30 Tom Tromey <tom@tromey.com>
4413 * python/py-framefilter.c (py_print_single_arg)
4414 (enumerate_locals, py_print_args, py_print_frame): Remove some
4415 uses of is_mi_like_p.
4417 2018-04-30 Tom Tromey <tom@tromey.com>
4420 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4421 * ui-out.h (ui_out::is_mi_like_p): Now const.
4422 (ui_out::do_is_mi_like_p): Now const.
4423 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4425 2018-04-30 Tom Tromey <tom@tromey.com>
4427 * varobj.c (varobj_set_visualizer): Use new_reference.
4428 * python/python.c (gdbpy_decode_line): Use new_reference.
4429 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4432 2018-04-30 Tom Tromey <tom@tromey.com>
4434 * varobj.c (install_new_value): Use new_reference.
4435 * value.h (value_incref): Return void. Swap intro comment with
4437 * value.c (set_value_parent): Use new_reference.
4438 (value_incref): Return void. Update intro comment.
4439 (release_value): Use new_reference.
4440 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4442 2018-04-30 Tom Tromey <tom@tromey.com>
4444 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4445 * gdb_bfd.h (new_bfd_ref): Remove.
4446 (gdb_bfd_open): Update comment.
4447 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4448 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4449 (gdb_bfd_fdopenr): Use new_reference.
4450 * exec.c (exec_file_attach): Use new_reference.
4452 2018-04-30 Tom Tromey <tom@tromey.com>
4454 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4457 2018-04-30 Tom Tromey <tom@tromey.com>
4459 * jit.c (jit_read_code_entry): Use type_align.
4460 * i386-tdep.c (i386_gdbarch_init): Don't call
4461 set_gdbarch_long_long_align_bit.
4462 * gdbarch.sh: Remove long_long_align_bit.
4463 * gdbarch.c, gdbarch.h: Rebuild.
4464 * arc-tdep.c (arc_type_align): New function.
4465 (arc_gdbarch_init): Use arc_type_align. Don't call
4466 set_gdbarch_long_long_align_bit.
4468 2018-04-30 Tom Tromey <tom@tromey.com>
4470 * rust-lang.c (rust_type_alignment): Remove.
4471 (rust_composite_type): Use type_align.
4473 2018-04-30 Tom Tromey <tom@tromey.com>
4475 * NEWS: Mention Type.align.
4476 * python/py-type.c (typy_get_alignof): New function.
4477 (type_object_getset): Add "alignof".
4479 2018-04-30 Tom Tromey <tom@tromey.com>
4483 * std-operator.def (UNOP_ALIGNOF): New operator.
4484 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4486 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4487 * c-lang.c (c_op_print_tab): Add alignof.
4488 * c-exp.y (ALIGNOF): New token.
4489 (exp): Add "ALIGNOF" production.
4490 (ident_tokens): Add _Alignof and alignof.
4492 2018-04-30 Tom Tromey <tom@tromey.com>
4494 * i386-tdep.c (i386_type_align): New function.
4495 (i386_gdbarch_init): Update.
4496 * gdbarch.sh (type_align): New method.
4497 * gdbarch.c, gdbarch.h: Rebuild.
4498 * arch-utils.h (default_type_align): Declare.
4499 * arch-utils.c (default_type_align): New function.
4500 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4501 (struct type) <align_log2>: New field.
4502 <instance_flags>: Now a bitfield.
4503 (TYPE_RAW_ALIGN): New macro.
4504 (type_align, type_raw_align, set_type_align): Declare.
4505 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4507 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4508 (get_alignment, maybe_set_alignment): New functions.
4509 (read_structure_type, read_enumeration_type, read_array_type)
4510 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4511 (read_subrange_type, read_base_type): Set type alignment.
4513 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4515 * dwarf2read.c (read_index_from_section): Use bool.
4517 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4520 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4523 2018-04-29 John Reiser <jreiser@BitWagon.com>
4526 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4527 last step, and do it atomically.
4529 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4531 * compile/compile-c-types.c (convert_int, convert_float):
4534 2018-04-27 Tom Tromey <tom@tromey.com>
4537 * rust-lang.c (rust_inclusive_range_type_p): New function.
4538 (rust_range): Handle inclusive ranges.
4539 (rust_compute_range): Likewise.
4540 * rust-exp.y (struct rust_op) <inclusive>: New field.
4541 (DOTDOTEQ): New constant.
4542 (range_expr): Add "..=" productions.
4543 (operator_tokens): Add "..=" token.
4544 (ast_range): Add "inclusive" parameter.
4545 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4547 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4549 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4550 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4552 * expprint.c (print_subexp_standard): Handle new bounds values.
4553 (dump_subexp_body_standard): Likewise.
4555 2018-04-27 Tom Tromey <tom@tromey.com>
4557 * configure: Rebuild.
4558 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4559 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4561 (class symbol_needs_eval_context): Likewise.
4562 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4563 (mock_mapped_index::symbol_name_at): Use "override". Remove
4565 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4567 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4568 * aarch64-tdep.c (instruction_reader::read): Use "override".
4569 (instruction_reader_test::read): Likewise.
4570 * arm-tdep.c (instruction_reader::read): Use "override".
4571 (instruction_reader_thumb::read): Likewise.
4573 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4576 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4577 instead of remote_send.
4578 (remote_send): Remove.
4580 2018-04-26 Pedro Alves <palves@redhat.com>
4582 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4583 find_function_start_sal instead of find_pc_line.
4585 2018-04-26 Pedro Alves <palves@redhat.com>
4587 * breakpoint.c (set_breakpoint_location_function): Handle
4589 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4590 * elfread.c (elf_symtab_read): Give data symbols with
4591 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4592 (elf_rel_plt_read): Update comment.
4593 * linespec.c (convert_linespec_to_sals): Handle
4595 (minsym_found): Handle mst_data_gnu_ifunc.
4596 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4597 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4598 * parse.c (find_minsym_type_and_address): Handle
4600 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4601 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4602 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4604 <mst_data_gnu_ifunc>: New enumerator.
4606 2018-04-26 Pedro Alves <palves@redhat.com>
4608 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4609 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4610 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4612 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4613 (lookup_minimal_symbol_by_pc): Adjust.
4614 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4615 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4616 * minsyms.h (lookup_msym_prefer): New enum.
4617 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4618 parameter by a lookup_msym_prefer parameter.
4620 2018-04-26 Pedro Alves <palves@redhat.com>
4622 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4623 ends in "@plt" instead of looking at the symbol's section.
4625 2018-04-26 Pedro Alves <palves@redhat.com>
4627 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4629 (find_pc_partial_function_gnu_ifunc): Rename to ...
4630 (find_pc_partial_function): ... this, and remove references to
4632 (find_pc_partial_function): Delete old implementation.
4633 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4635 2018-04-26 Pedro Alves <palves@redhat.com>
4637 * linespec.c (struct bound_minimal_symbol_search_key): New.
4638 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4639 skip first line if we found a GNU ifunc minimal symbol by name.
4640 (compare_msymbols): Change parameters to work with a destructured
4642 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4645 2018-04-26 Pedro Alves <palves@redhat.com>
4647 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4648 ifunc targets here. Instead, if we have an ifunc minsym, use its
4650 (add_location_to_breakpoint): Store the minsym and the objfile in
4651 the breakpoint location.
4652 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4653 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4654 Record the minsym in the sal.
4655 * symtab.h (symtab_and_line) <msymbol>: New field.
4657 2018-04-26 Pedro Alves <palves@redhat.com>
4659 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4660 unless we actually resolved the ifunc.
4662 2018-04-26 Pedro Alves <palves@redhat.com>
4664 * c-exp.y (variable production): Prefer ifunc minsyms over
4665 regular function symbols.
4666 * symtab.c (find_gnu_ifunc): New function.
4667 * minsyms.h (lookup_msym_prefer): New enum.
4668 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4669 parameter by a lookup_msym_prefer parameter.
4670 * symtab.h (find_gnu_ifunc): New declaration.
4672 2018-04-26 Pedro Alves <palves@redhat.com>
4674 * blockframe.c (find_gnu_ifunc_target_type): New function.
4675 (find_function_type): New.
4676 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4677 return a value with a memory address.
4678 (eval_call): For calls to GNU ifunc functions, try to find the
4679 type of the target function from the type that the resolver
4681 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4683 * infcall.c (find_function_return_type): Delete.
4684 (find_function_addr): Add 'function_type' parameter. For calls to
4685 GNU ifunc functions, try to find the type of the target function
4686 from the type that the resolver returns, and return it via
4688 (call_function_by_hand_dummy): Adjust to use the function type
4689 returned by find_function_addr.
4690 (find_function_addr): Add 'function_type' parameter and move
4692 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4695 2018-04-26 Pedro Alves <palves@redhat.com>
4697 * c-exp.y (variable production): Skip finding an alias for ifunc
4700 2018-04-26 Pedro Alves <palves@redhat.com>
4702 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4704 2018-04-25 Pedro Alves <palves@redhat.com>
4706 * infcmd.c (kill_command): Print the pid as string, not the whole
4707 thread's ptid. Add comment. s/has been killed/killed/ in output
4709 * remote.c (remote_detach_1): Print the pid as string, not the
4710 whole thread's ptid.
4712 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4713 Sergio Durigan Junior <sergiodj@redhat.com>
4714 Pedro Alves <palves@redhat.com>
4716 * infcmd.c (kill_command): Print message when inferior has
4718 * inferior.c (print_inferior_events): Remove 'static'. Set as
4720 (add_inferior): Improve message printed when
4721 'print_inferior_events' is on.
4722 (exit_inferior): Remove message printed when
4723 'print_inferior_events' is on.
4724 (detach_inferior): Improve message printed when
4725 'print_inferior_events' is on.
4726 (initialize_inferiors): Use 'add_inferior_silent' to set
4727 'current_inferior_'.
4728 * inferior.h (print_inferior_events): Declare here as
4730 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4731 '[Detaching...]' messages when 'print_inferior_events' is on.
4732 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4733 as prefix/suffix for messages. Remove periods. Fix erroneous
4734 'Detaching after fork from child...', replace it by '... from
4736 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4737 prefix/suffix when printing 'Detaching...' messages. Print
4738 them when 'print_inferior_events' is on.
4739 * remote.c (remote_detach_1): Print message when detaching
4740 from inferior and '!is_fork_parent'.
4742 2018-04-24 Tom Tromey <tom@tromey.com>
4744 * cli-out.h: Reindent.
4746 2018-04-24 Tom Tromey <tom@tromey.com>
4748 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4749 (cli_ui_out::do_field_string): Use fputs_filtered.
4750 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4752 2018-04-23 Tom Tromey <tom@tromey.com>
4754 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4755 gdb::unique_xmalloc_ptr.
4757 2018-04-23 Tom Tromey <tom@tromey.com>
4759 * configure: Rebuild.
4761 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4764 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4765 prepare_for_testing. Set normal_bp to r_debug_state if target
4768 2018-04-21 Pedro Alves <palves@redhat.com>
4769 Rajendra SY <rajendra.sy@gmail.com>
4771 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4772 * remote.c (extended_remote_attach): In all-stop mode, mark the
4773 thread as executing.
4775 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4777 * thread.c (thread_apply_all_command): Fix comment.
4778 (thread_command): Fix comment.
4780 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4782 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4784 * features/aarch64-core.c (create_feature_aarch64_core):
4786 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4788 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4790 * features/i386/32bit-avx512.c
4791 (create_feature_i386_32bit_avx512): Likewise.
4792 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4794 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4796 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4798 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4800 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4802 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4804 * features/i386/64bit-avx512.c
4805 (create_feature_i386_64bit_avx512): Likewise.
4806 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4808 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4810 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4812 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4814 * features/i386/64bit-segments.c
4815 (create_feature_i386_64bit_segments): Likewise.
4816 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4818 * features/i386/x32-core.c
4819 (create_feature_i386_x32_core): Likewise.
4820 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4821 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4822 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4823 * target-descriptions.c: In generated code, don't pass xml
4826 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4828 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4829 (print_xml_feature::visit_post): Likewise.
4830 (print_xml_feature::visit): Likewise.
4831 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4832 (print_xml_feature): Add new class.
4833 * regformats/regdat.sh: Null xmltarget on feature targets.
4834 * target-descriptions.c (struct target_desc): Add xmltarget.
4835 (maintenance_check_tdesc_xml_convert): Add unittest function.
4836 (tdesc_get_features_xml): Add function to get xml.
4837 (maintenance_check_xml_descriptions): Test xml generation.
4838 * xml-tdesc.c (string_read_description_xml): Add function.
4839 * xml-tdesc.h (string_read_description_xml): Add declaration.
4841 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4843 * features/Makefile: Add feature marker to targets with new style
4844 target descriptions.
4845 * regformats/aarch64.dat: Regenerate.
4846 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4847 * regformats/i386/amd64-avx-linux.dat: Likewise.
4848 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4849 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4850 * regformats/i386/amd64-linux.dat: Likewise.
4851 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4852 * regformats/i386/amd64.dat: Likewise.
4853 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4854 * regformats/i386/i386-avx-linux.dat: Likewise.
4855 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4856 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4857 * regformats/i386/i386-linux.dat: Likewise.
4858 * regformats/i386/i386-mmx-linux.dat: Likewise.
4859 * regformats/i386/i386-mpx-linux.dat: Likewise.
4860 * regformats/i386/i386.dat: Likewise.
4861 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4862 * regformats/i386/x32-avx-linux.dat: Likewise.
4863 * regformats/i386/x32-linux.dat: Likewise.
4864 * regformats/tic6x-c62x-linux.dat: Likewise.
4865 * regformats/tic6x-c64x-linux.dat: Likewise.
4866 * regformats/tic6x-c64xp-linux.dat: Likewise.
4867 * regformats/regdat.sh: Parse feature marker.
4869 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4871 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4872 (tdesc_osabi_name): Likewise.
4873 * target-descriptions.c (tdesc_architecture_name): Add new
4875 (tdesc_osabi_name): Likewise.
4877 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4879 * common/tdesc.c (tdesc_predefined_type): Move to here.
4880 (tdesc_named_type): Likewise.
4881 (tdesc_create_vector): Likewise.
4882 (tdesc_create_struct): Likewise.
4883 (tdesc_set_struct_size): Likewise.
4884 (tdesc_create_union): Likewise.
4885 (tdesc_create_flags): Likewise.
4886 (tdesc_create_enum): Likewise.
4887 (tdesc_add_field): Likewise.
4888 (tdesc_add_typed_bitfield): Likewise.
4889 (tdesc_add_bitfield): Likewise.
4890 (tdesc_add_flag): Likewise.
4891 (tdesc_add_enum_value): Likewise.
4892 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
4893 (struct tdesc_type_vector): Likewise.
4894 (struct tdesc_type_field): Likewise.
4895 (struct tdesc_type_with_fields): Likewise.
4896 (tdesc_create_enum): Add declaration.
4897 (tdesc_add_typed_bitfield): Likewise.
4898 (tdesc_add_enum_value): Likewise.
4899 * target-descriptions.c (tdesc_type_field): Move from here.
4900 (tdesc_type_builtin): Likewise.
4901 (tdesc_type_vector): Likewise.
4902 (tdesc_type_with_fields): Likewise.
4903 (tdesc_predefined_types): Likewise.
4904 (tdesc_named_type): Likewise.
4905 (tdesc_create_vector): Likewise.
4906 (tdesc_create_struct): Likewise.
4907 (tdesc_set_struct_size): Likewise.
4908 (tdesc_create_union): Likewise.
4909 (tdesc_create_flags): Likewise.
4910 (tdesc_create_enum): Likewise.
4911 (tdesc_add_field): Likewise.
4912 (tdesc_add_typed_bitfield): Likewise.
4913 (tdesc_add_bitfield): Likewise.
4914 (tdesc_add_flag): Likewise.
4915 (tdesc_add_enum_value): Likewise.
4916 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4917 (tdesc_add_typed_bitfield): Likewise.
4918 (tdesc_add_enum_value): Likewise.
4920 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4922 * common/tdesc.c (tdesc_feature::accept): Move to here.
4923 (tdesc_feature::operator==): Likewise.
4924 (tdesc_create_reg): Likewise.
4925 * common/tdesc.h (tdesc_type_kind): Likewise.
4926 (struct tdesc_type): Likewise.
4927 (struct tdesc_feature): Likewise.
4928 * regformats/regdat.sh: Create a feature.
4929 * target-descriptions.c (tdesc_type_kind): Move from here.
4930 (tdesc_type): Likewise.
4931 (tdesc_type_up): Likewise.
4932 (tdesc_feature): Likewise.
4933 (tdesc_create_reg): Likewise.
4935 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4937 * Makefile.in: Add arch/tdesc.c
4938 * common/tdesc.c: New file.
4939 * common/tdesc.h (tdesc_element_visitor): Move to here.
4940 (tdesc_element): Likewise.
4941 (tdesc_reg): Likewise.
4942 (tdesc_reg_up): Likewise.
4943 * regformats/regdef.h (reg): Add offset to constructors.
4944 * target-descriptions.c (tdesc_element_visitor): Move from here.
4945 (tdesc_element): Likewise.
4946 (tdesc_reg): Likewise.
4947 (tdesc_reg_up): Likewise.
4949 2018-04-17 Tom Tromey <tom@tromey.com>
4951 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4954 2018-04-17 Tom Tromey <tom@tromey.com>
4956 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4958 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
4960 * symtab.c (print_symbol_info): Skip printing filename and line
4961 number when `last' is NULL.
4962 (symtab_symbol_info): Use empty string instead of NULL for first
4963 invocation of print_symbol_info.
4964 (rbreak_command): Pass NULL to `last' parameter of
4967 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
4969 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4972 2018-04-16 Pedro Alves <palves@redhat.com>
4974 * MAINTAINERS (sh): Remove.
4975 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4976 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4977 (ALLDEPFILES): Remove sh64-tdep.c.
4978 * NEWS: Mentions that support for SH-5/SH64 is removed.
4979 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4980 (sh*-*-openbsd*): Ditto.
4981 (sh64-*-elf*): Remove.
4983 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4984 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4985 * sh-tdep.c: No longer include "sh64-tdep.h".
4986 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4987 * sh64-tdep.c, sh64-tdep.h: Remove files.
4989 2018-04-16 Pedro Alves <palves@redhat.com>
4991 * MAINTAINERS: Remove m88k.
4992 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4993 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4994 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4995 * NEWS: Mention that support for m88k was removed.
4996 * configure.host (m88*-*-*): Remove support.
4997 * configure.nat (m88k-*-*): Remove support.
4998 * configure.tgt (m88*-*-openbsd*): Remove.
4999 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5001 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5003 * configure.tgt (x86_tobjs): New variable.
5004 (amd64_tobjs, i386_tobjs): Use it.
5006 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5008 * symtab.c (print_symbol_info): Precede the symbol definition by
5009 the line number when available.
5010 * NEWS: Advertise this enhancement.
5012 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5014 * NEWS (New options): announce set/show record btrace cpu.
5015 * btrace.c: Include record-btrace.h.
5016 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5017 the vendor is unknown.
5018 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5019 Maybe overwrite the btrace configuration's cpu.
5020 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5021 (btrace_fetch): Add cpu parameter. Update callers.
5022 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5023 Maybe overwrite the btrace configuration's cpu. Skip enabling
5024 errata workarounds if the vendor is unknown.
5025 * python/py-record-btrace.c: Include record-btrace.h.
5026 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5027 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5028 * record-btrace.c (record_btrace_cpu_state_kind): New.
5029 (record_btrace_cpu): New.
5030 (set_record_btrace_cpu_cmdlist): New.
5031 (record_btrace_get_cpu): New.
5032 (require_btrace_thread, record_btrace_info)
5033 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5034 (cmd_set_record_btrace_cpu_none): New.
5035 (cmd_set_record_btrace_cpu_auto): New.
5036 (cmd_set_record_btrace_cpu): New.
5037 (cmd_show_record_btrace_cpu): New.
5038 (_initialize_record_btrace): Initialize set/show record btrace cpu
5040 * record-btrace.h (record_btrace_get_cpu): New.
5042 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5044 * record.c (set_record_command): Fix typo in message.
5046 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5048 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5050 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5052 * infrun.c (process_event_stop_test): Call
5053 gdbarch_in_indirect_branch_thunk.
5054 * gdbarch.sh (in_indirect_branch_thunk): New.
5055 * gdbarch.c: Regenerated.
5056 * gdbarch.h: Regenerated.
5059 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5060 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5061 (ALLDEPFILES): Add x86-tdep.c.
5062 * arch-utils.h (default_in_indirect_branch_thunk): New.
5063 * arch-utils.c (default_in_indirect_branch_thunk): New.
5064 * i386-tdep: Include x86-tdep.h.
5065 (i386_in_indirect_branch_thunk): New.
5066 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5068 * amd64-tdep: Include x86-tdep.h.
5069 (amd64_in_indirect_branch_thunk): New.
5070 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5072 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5075 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5076 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5077 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5080 2018-04-12 Tom Tromey <tom@tromey.com>
5082 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5083 (rust_evaluate_subexp): Likewise.
5085 2018-04-12 Pedro Alves <palves@redhat.com>
5087 * procfs.c (procfs_detach): Make forward declaration's prototype
5088 match definition's protototype.
5089 (proc_get_LDT_entry): Remove stale do_cleanups call.
5091 2018-04-12 Pedro Alves <palves@redhat.com>
5093 * target.h (target_ops::to_has_exited): Delete.
5094 (target_has_exited): Delete.
5095 * target-delegates.c: Regenerate.
5097 2018-04-11 Pedro Alves <palves@redhat.com>
5099 * target.c (fileio_fh_t::t): Add comment.
5100 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5101 (target_fileio_close): Handle a NULL target.
5102 (invalidate_fileio_fh): New.
5103 (target_close): Call it.
5104 * remote.c (remote_hostio_send_command): No longer check whether
5105 remote_desc is open.
5107 2018-04-11 Pedro Alves <palves@redhat.com>
5109 * target.c (fileio_fh_t): Make it a named struct instead of a
5111 (fileio_fh_t::is_closed): New method.
5112 (DEF_VEC_O (fileio_fh_t)): Remove.
5113 (fileio_fhandles): Now a std::vector.
5114 (is_closed_fileio_fh): Delete.
5115 (acquire_fileio_fd): Adjust. Rename parameters.
5116 (release_fileio_fd): Adjust.
5117 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5118 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5119 (target_fileio_close): Adjust.
5121 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5123 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5126 2018-04-10 Pedro Alves <palves@redhat.com>
5128 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5129 (scoped_finish_thread_state): New class.
5130 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5132 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5133 (fetch_inferior_event, normal_stop): Likewise.
5134 * thread.c (finish_thread_state_cleanup): Delete.
5136 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5137 Pedro Alves <palves@redhat.com>
5139 * value.c: Include "selftest.h" and "common/array-view.h".
5140 (struct range) <operator ==>: New.
5141 (test_ranges_contain): New.
5142 (check_ranges_vector): New.
5143 (test_insert_into_bit_range_vector): New.
5144 (_initialize_values): Register selftests.
5145 * common/array-view.h (operator==, operator!=): New.
5147 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5149 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5151 * inline-frame.c: Include <algorithm>.
5152 (struct inline_state): Add constructor.
5153 (inline_state_s): Remove.
5154 (DEF_VEC_O(inline_state_s)): Remove.
5155 (inline_states): Change type to std::vector.
5156 (find_inline_frame_state): Adjust to std::vector.
5157 (allocate_inline_frame_state): Remove.
5158 (clear_inline_frame_state): Adjust to std::vector.
5159 (skip_inline_frames): Adjust to std::vector.
5161 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5163 * tracepoint.h (struct trace_state_variable): Add constructor.
5164 <name>: Change type to std::string.
5165 * tracepoint.c (tsv_s): Remove.
5166 (DEF_VEC_O(tsv_s)): Remove.
5167 (tvariables): Change to std::vector.
5168 (create_trace_state_variable): Adjust to std::vector.
5169 (find_trace_state_variable): Likewise.
5170 (find_trace_state_variable_by_number): Likewise.
5171 (delete_trace_state_variable): Likewise.
5172 (trace_variable_command): Adjust to std::string.
5173 (delete_trace_variable_command): Likewise.
5174 (tvariables_info_1): Adjust to std::vector.
5175 (save_trace_state_variables): Likewise.
5176 (start_tracing): Likewise.
5177 (merge_uploaded_trace_state_variables): Adjust to std::vector
5179 * target.h (struct target_ops)
5180 <to_download_trace_state_variable>: Pass reference to
5181 trace_state_variable.
5182 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5183 * target-delegates.c: Re-generate.
5184 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5185 (mi_tsv_deleted): Likewise.
5186 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5187 * remote.c (remote_download_trace_state_variable): Change
5188 pointer to reference and adjust.
5189 * make-target-delegates (parse_argtypes): Handle references.
5190 (write_function_header): Likewise.
5191 (munge_type): Likewise.
5193 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5195 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5196 string_view-selftests.c.
5197 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5199 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5200 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5201 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5202 * unittests/basic_string_view/element_access/char/1.cc:
5204 * unittests/basic_string_view/element_access/char/empty.cc:
5206 * unittests/basic_string_view/element_access/char/front_back.cc:
5208 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5209 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5211 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5213 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5215 * unittests/basic_string_view/operations/compare/char/1.cc:
5217 * unittests/basic_string_view/operations/compare/char/13650.cc:
5219 * unittests/basic_string_view/operations/copy/char/1.cc:
5221 * unittests/basic_string_view/operations/data/char/1.cc:
5223 * unittests/basic_string_view/operations/find/char/1.cc:
5225 * unittests/basic_string_view/operations/find/char/2.cc:
5227 * unittests/basic_string_view/operations/find/char/3.cc:
5229 * unittests/basic_string_view/operations/find/char/4.cc:
5231 * unittests/basic_string_view/operations/rfind/char/1.cc:
5233 * unittests/basic_string_view/operations/rfind/char/2.cc:
5235 * unittests/basic_string_view/operations/rfind/char/3.cc:
5237 * unittests/basic_string_view/operations/substr/char/1.cc:
5239 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5240 * unittests/string_view-selftests.c: New file.
5242 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5244 * unittests/basic_string_view/capacity/1.cc: New file.
5245 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5246 * unittests/basic_string_view/cons/char/1.cc: New file.
5247 * unittests/basic_string_view/cons/char/2.cc: New file.
5248 * unittests/basic_string_view/cons/char/3.cc: New file.
5249 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5250 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5251 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5252 * unittests/basic_string_view/element_access/char/1.cc: New file.
5253 * unittests/basic_string_view/element_access/char/2.cc: New file.
5254 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5255 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5256 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5257 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5258 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5259 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5260 * unittests/basic_string_view/include.cc: New file.
5261 * unittests/basic_string_view/inserters/char/1.cc: New file.
5262 * unittests/basic_string_view/inserters/char/2.cc: New file.
5263 * unittests/basic_string_view/inserters/char/3.cc: New file.
5264 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5265 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5266 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5267 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5268 * unittests/basic_string_view/literals/types.cc: New file.
5269 * unittests/basic_string_view/literals/values.cc: New file.
5270 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5271 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5272 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5273 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5274 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5275 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5276 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5277 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5278 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5279 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5280 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5281 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5282 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5283 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5284 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5285 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5286 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5287 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5288 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5289 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5290 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5291 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5292 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5293 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5294 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5295 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5296 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5297 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5298 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5299 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5300 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5301 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5302 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5303 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5304 * unittests/basic_string_view/operators/char/2.cc: New file.
5305 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5306 * unittests/basic_string_view/range_access/char/1.cc: New file.
5307 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5308 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5309 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5310 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5311 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5312 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5313 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5314 * unittests/basic_string_view/typedefs.cc: New file.
5315 * unittests/basic_string_view/types/1.cc: New file.
5317 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5319 * common/gdb_string_view.h: Remove libstdc++ implementation
5320 details, adjust to gdb reality.
5321 * common/gdb_string_view.tcc: Likewise.
5322 * cli/cli-script.c (struct string_view): Remove.
5323 (user_args) <m_args>: Change element type to gdb::string_view.
5324 (user_args::insert_args): Adjust.
5326 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5328 * common/gdb_string_view.h: New file.
5329 * common/gdb_string_view.tcc: New file.
5331 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5333 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5334 * configure: Re-generate.
5336 2018-04-09 Pedro Alves <palves@redhat.com>
5338 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5339 (set_target_gdbarch): Call
5340 gdb::observers::architecture_changed.notify instead of
5341 observer_notify_architecture_changed.
5343 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5345 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5346 (do_restore_current_traceframe_cleanup): Remove.
5347 (restore_current_traceframe_cleanup_dtor): Remove.
5348 (make_cleanup_restore_current_traceframe): Remove.
5349 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5351 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5352 * infrun.c (fetch_inferior_event): Use
5353 scoped_restore_current_traceframe.
5355 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5357 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5359 <n_allocated_type_units>: Remove.
5360 <all_type_units>: Change to std::vector.
5361 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5362 to std::vector change.
5363 (dwarf2_per_objfile::get_cutu): Likewise.
5364 (dwarf2_per_objfile::get_tu): Likewise.
5365 (create_signatured_type_table_from_index): Likewise.
5366 (create_signatured_type_table_from_debug_names): Likewise.
5367 (dw2_symtab_iter_next): Likewise.
5368 (dw2_print_stats): Likewise.
5369 (dw2_expand_all_symtabs): Likewise.
5370 (dw2_expand_marked_cus): Likewise.
5371 (dw2_debug_names_iterator::next): Likewise.
5372 (dwarf2_initialize_objfile): Likewise.
5373 (add_signatured_type_cu_to_table): Likewise.
5374 (create_all_type_units): Likewise.
5375 (add_type_unit): Likewise.
5376 (struct tu_abbrev_offset): Add constructor.
5377 (build_type_psymtabs_1): Adjust to std::vector change.
5378 (print_tu_stats): Likewise.
5379 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5380 (write_debug_names): Likewise.
5382 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5384 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5385 Make an std::vector.
5386 <n_comp_units>: Remove.
5387 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5388 to std::vector change.
5389 (dwarf2_per_objfile::get_cutu): Likewise.
5390 (dwarf2_per_objfile::get_cu): Likewise.
5391 (create_cus_from_index): Likewise.
5392 (create_addrmap_from_index): Likewise.
5393 (create_addrmap_from_aranges): Likewise.
5394 (dwarf2_read_index): Likewise.
5395 (dw2_find_last_source_symtab): Likewise.
5396 (dw2_map_symtabs_matching_filename): Likewise.
5397 (dw2_symtab_iter_next): Likewise.
5398 (dw2_print_stats): Likewise.
5399 (dw2_expand_all_symtabs): Likewise.
5400 (dw2_expand_symtabs_with_fullname): Likewise.
5401 (dw2_expand_marked_cus): Likewise.
5402 (dw2_map_symbol_filenames): Likewise.
5403 (create_cus_from_debug_names): Likewise.
5404 (dwarf2_read_debug_names): Likewise.
5405 (dw2_debug_names_iterator::next): Likewise.
5406 (dwarf2_initialize_objfile): Likewise.
5407 (set_partial_user): Likewise.
5408 (dwarf2_build_psymtabs_hard): Likewise.
5409 (read_comp_units_from_section): Remove arguments, adjust to
5411 (create_all_comp_units): Adjust to std::vector and
5412 read_comp_units_from_section changes.
5413 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5415 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5416 (psyms_seen_size): Likewise.
5417 (write_gdbindex): Likewise.
5418 (write_debug_names): Likewise.
5420 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5422 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5423 with dwarf2_per_objfile.
5424 (create_cus_from_index): Likewise.
5425 (create_signatured_type_table_from_index): Likewise.
5426 (dwarf2_read_index): Likewise.
5427 (dwarf2_initialize_objfile): Likewise.
5428 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5429 per_cu rather than get_dwarf2_per_objfile.
5431 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5433 * dwarf2read.h (struct signatured_type): Forward declare.
5434 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5436 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5437 (dw2_get_cutu): ...this.
5438 (dwarf2_per_objfile::get_cu): Rename from...
5439 (dw2_get_cu): ...this.
5440 (dwarf2_per_objfile::get_tu): New.
5441 (create_addrmap_from_index): Adjust.
5442 (create_addrmap_from_aranges): Adjust.
5443 (dw2_find_last_source_symtab): Adjust.
5444 (dw2_map_symtabs_matching_filename): Adjust.
5445 (dw2_symtab_iter_next): Adjust.
5446 (dw2_print_stats): Adjust.
5447 (dw2_expand_all_symtabs): Adjust.
5448 (dw2_expand_symtabs_with_fullname): Adjust.
5449 (dw2_expand_marked_cus): Adjust.
5450 (dw_expand_symtabs_matching_file_matcher): Adjust.
5451 (dw2_map_symbol_filenames): Adjust.
5452 (dw2_debug_names_iterator::next): Adjust.
5453 (dwarf2_initialize_objfile): Adjust.
5454 (set_partial_user): Adjust.
5455 (dwarf2_build_psymtabs_hard): Adjust.
5457 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5459 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5460 Remove unused variables.
5461 (dw2_map_symtabs_matching_filename): Likewise.
5462 (dwarf2_record_block_ranges): Likewise.
5463 (dwarf2_read_addr_index): Likewise.
5464 (follow_die_offset): Likewise.
5466 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5468 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5469 to symbol_file_add_main.
5471 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5474 * mi/mi-console.c (do_fputc_async_safe): New.
5475 (mi_console_file::write_async_safe): New.
5476 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5477 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5479 * ui-file.c (ui_file::putstrn): Adjust call to
5480 fputstrn_unfiltered.
5481 * utils.c (printchar): Replace do_fputs and do_fprintf
5482 parameters by do_fputc.
5483 (fputstr_filtered): Adjust call to printchar.
5484 (fputstr_unfiltered): Likewise.
5485 (fputstrn_filtered): Likewise.
5486 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5488 * utils.h (do_fputc_ftype): New typedef.
5489 (fputstrn_unfiltered): Add do_fputc parameter.
5491 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5493 * regformats/i386/i386-avx.dat: Remove.
5495 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5498 * amd64-tdep.c (amd64_none_init_abi): New function.
5499 (amd64_x32_none_init_abi): New function.
5500 (_initialize_amd64_tdep): Register handlers for x86-64 and
5501 x64_32 with GDB_OSABI_NONE.
5502 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5503 GDB_OSABI_NONE osabi.
5505 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5508 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5510 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5511 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5513 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5515 * common/byte-vector.h (char_vector): New type.
5516 * target.h (target_read_alloc): Return
5517 gdb::optional<byte_vector>.
5518 (target_read_stralloc): Return gdb::optional<char_vector>.
5519 (target_get_osdata): Return gdb::optional<char_vector>.
5520 * target.c (target_read_alloc_1): Templatize. Replacement
5521 manual memory management with vector.
5522 (target_read_alloc): Change return type, adjust.
5523 (target_read_stralloc): Change return type, adjust.
5524 (target_get_osdata): Change return type, adjust.
5525 * auxv.c (struct auxv_info) <length>: Remove.
5526 <data>: Change type to gdb::optional<byte_vector>.
5527 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5528 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5529 (target_auxv_search): Adjust.
5530 (fprint_target_auxv): Adjust.
5531 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5532 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5533 (linux_make_corefile_notes): Adjust.
5534 * osdata.c (get_osdata): Adjust.
5535 * remote.c (remote_get_threads_with_qxfer): Adjust.
5536 (remote_memory_map): Adjust.
5537 (remote_traceframe_info): Adjust.
5538 (btrace_read_config): Adjust.
5539 (remote_read_btrace): Adjust.
5540 (remote_pid_to_exec_file): Adjust.
5541 * solib-aix.c (solib_aix_get_library_list): Adjust.
5542 * solib-dsbt.c (decode_loadmap): Don't free buf.
5543 (dsbt_get_initial_loadmaps): Adjust.
5544 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5545 * solib-target.c (solib_target_current_sos): Adjust.
5546 * tracepoint.c (sdata_make_value): Adjust.
5547 * xml-support.c (xinclude_start_include): Adjust.
5548 (xml_fetch_content_from_file): Adjust.
5549 * xml-support.h (xml_fetch_another): Change return type.
5550 (xml_fetch_content_from_file): Change return type.
5551 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5552 * xml-tdesc.c (file_read_description_xml): Adjust.
5553 (fetch_available_features_from_target): Change return type.
5554 (target_fetch_description_xml): Adjust.
5555 (target_read_description_xml): Adjust.
5557 2018-04-06 Tom Tromey <tom@tromey.com>
5559 * value.c (~value): Update.
5560 (struct value) <contents>: Now unique_xmalloc_ptr.
5561 (value_contents_bits_eq, allocate_value_contents)
5562 (value_contents_raw, value_contents_all_raw)
5563 (value_contents_for_printing, value_contents_for_printing_const)
5564 (set_value_enclosing_type): Update.
5566 2018-04-06 Tom Tromey <tom@tromey.com>
5568 * value.c (range_s): Remove typedef, VEC.
5569 (struct range): Add operator<.
5570 (range_lessthan): Remove.
5571 (ranges_contain): Change type.
5573 (struct value) <unavailable, optimized_out>: Now std::vector.
5574 (value_entirely_available)
5575 (value_entirely_covered_by_range_vector)
5576 (value_entirely_unavailable, value_entirely_optimized_out):
5578 (insert_into_bit_range_vector): Change argument type.
5579 (find_first_range_overlap): Likewise.
5580 (struct ranges_and_idx, value_contents_bits_eq)
5581 (require_not_optimized_out, require_available): Update.
5582 (ranges_copy_adjusted): Change argument types.
5583 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5585 2018-04-06 Tom Tromey <tom@tromey.com>
5587 * value.c (~value): Update.
5588 (struct value) <parent>: Now a value_ref_ptr.
5589 (value_parent, set_value_parent, value_address, value_copy):
5592 2018-04-06 Tom Tromey <tom@tromey.com>
5594 * value.c (struct value): Add constructor, destructor, and member
5596 (allocate_value_lazy, value_decref): Update.
5598 2018-04-06 Tom Tromey <tom@tromey.com>
5600 * value.c (struct value) <released, next>: Remove.
5601 (all_values): Now a std::vector.
5602 (allocate_value_lazy): Update.
5603 (value_next): Remove.
5604 (value_mark, value_free_to_mark, release_value)
5605 (value_release_to_mark): Update.
5607 2018-04-06 Tom Tromey <tom@tromey.com>
5609 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5610 (free_value_chain): Remove.
5611 * value.c (free_value_chain): Remove.
5612 (value_release_to_mark): Return a std::vector.
5613 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5615 (check_condition): Update.
5616 * eval.c (fetch_subexp_value): Change "val_chain" to a
5618 * breakpoint.c (update_watchpoint): Update.
5619 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5621 2018-04-06 Tom Tromey <tom@tromey.com>
5623 * value.h (free_all_values): Remove.
5624 * value.c (free_all_values): Remove.
5626 2018-04-06 Tom Tromey <tom@tromey.com>
5628 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5629 (value_history_chain, value_history_count): Remove.
5630 (value_history): New global.
5631 (record_latest_value, access_value_history, show_values)
5632 (preserve_values): Update.
5634 2018-04-06 Tom Tromey <tom@tromey.com>
5636 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5637 * varobj.c (varobj_set_display_format, varobj_set_value)
5638 (install_default_visualizer, construct_visualizer)
5639 (install_new_value, ~varobj, varobj_get_value_type)
5640 (my_value_of_variable, varobj_editable_p): Update.
5641 * c-varobj.c (c_describe_child, c_value_of_variable)
5642 (cplus_number_of_children, cplus_describe_child): Update.
5643 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5644 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5645 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5647 2018-04-06 Tom Tromey <tom@tromey.com>
5649 * printcmd.c (last_examine_address): Change type to
5651 (do_examine, x_command): Update.
5653 2018-04-06 Tom Tromey <tom@tromey.com>
5655 * value.c (release_value): Update.
5656 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5657 (struct bpstats) <val>: Now a value_ref_ptr.
5658 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5659 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5660 (~watchpoint, print_it_watchpoint, watch_command_1)
5661 (invalidate_bp_value_on_memory_change): Update.
5663 2018-04-06 Tom Tromey <tom@tromey.com>
5665 * varobj.c (varobj_clear_saved_item)
5666 (update_dynamic_varobj_children, install_new_value, ~varobj):
5668 * value.h (value_incref): Move declaration earlier.
5669 (value_decref): Rename from value_free.
5670 (struct value_ref_policy): New.
5671 (value_ref_ptr): New typedef.
5672 (struct value_deleter): Remove.
5673 (gdb_value_up): Remove typedef.
5674 (release_value): Change return type.
5675 (release_value_or_incref): Remove.
5676 * value.c (set_value_parent): Update.
5677 (value_incref): Change return type.
5678 (value_decref): Rename from value_free.
5679 (value_free_to_mark, free_all_values, free_value_chain): Update.
5680 (release_value): Return value_ref_ptr.
5681 (release_value_or_incref): Remove.
5682 (record_latest_value, set_internalvar, clear_internalvar):
5684 * stack.c (info_frame_command): Don't call value_free.
5685 * python/py-value.c (valpy_dealloc, valpy_new)
5686 (value_to_value_object): Update.
5687 * printcmd.c (do_examine): Update.
5688 * opencl-lang.c (lval_func_free_closure): Update.
5689 * mi/mi-main.c (register_changed_p): Don't call value_free.
5690 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5691 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5692 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5694 * guile/scm-value.c (vlscm_free_value_smob)
5695 (vlscm_scm_from_value): Update.
5696 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5697 (frame_unwind_register_unsigned, get_frame_register_bytes)
5698 (put_frame_register_bytes): Don't call value_free.
5699 * findvar.c (address_from_register): Don't call value_free.
5700 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5701 * dwarf2loc.c (entry_data_value_free_closure)
5702 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5703 (dwarf2_evaluate_loc_desc_full): Update.
5704 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5705 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5706 (~watchpoint, watch_command_1)
5707 (invalidate_bp_value_on_memory_change): Update.
5708 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5710 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5713 * warning.m4: Add -Wno-error=deprecated-register.
5714 * configure: Re-generate.
5716 2018-04-05 Tom Tromey <tom@tromey.com>
5718 * linespec.h: Remove include of "vec.h".
5720 2018-04-05 Tom Tromey <tom@tromey.com>
5722 * linespec.c (typep): Remove typedef.
5723 (find_methods, find_superclass_methods): Take a std::vector.
5724 (find_method): Use std::vector.
5726 2018-04-05 Tom Tromey <tom@tromey.com>
5728 * utils.c (compare_strings): Remove.
5729 * utils.h (compare_strings): Remove.
5730 * objc-lang.h (find_imps): Update.
5731 * objc-lang.c (find_methods): Take a std::vector.
5732 (uniquify_strings, find_imps): Likewise.
5733 * linespec.c (find_methods): Take a std::vector.
5734 (decode_objc): Use std::vector.
5735 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5737 (find_method, find_function_symbols): Use std::vector.
5739 2018-04-05 Tom Tromey <tom@tromey.com>
5741 * completer.c (completion_tracker::completion_tracker): Remove
5743 (completion_tracker::discard_completions): Likewise.
5744 * breakpoint.c (ambiguous_names_p): Remove cast.
5745 * ada-lang.c (_initialize_ada_language): Remove cast.
5746 * utils.h (streq): Update.
5747 (streq_hash): Add new declaration.
5748 * utils.c (streq): Return bool.
5749 (streq_hash): New function.
5751 2018-04-05 Tom Tromey <tom@tromey.com>
5753 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5754 Remove a string copy.
5756 2018-04-05 Tom Tromey <tom@tromey.com>
5758 * linespec.c (filter_results): Use std::vector.
5759 (decode_line_2, decode_line_full): Update.
5761 2018-04-05 Tom Tromey <tom@tromey.com>
5763 * linespec.c (canonical_to_fullform): Return std::string.
5764 (filter_results): Update.
5765 (struct decode_line_2_item): Add constructor.
5766 <fullform, displayform>: Now std::string.
5767 (decode_line_2_compare_items): Now a std::sort comparator.
5768 (decode_line_2): Update.
5770 2018-04-05 Tom Tromey <tom@tromey.com>
5772 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5773 (unexpected_linespec_error): Update.
5774 (linespec_parse_basic, parse_linespec): Update.
5776 2018-04-05 Tom Tromey <tom@tromey.com>
5778 * linespec.c (linespec_parse_basic): Reindent.
5780 2018-04-05 Tom Tromey <tom@tromey.com>
5782 * minsyms.h (iterate_over_minimal_symbols): Update.
5783 * minsyms.c (iterate_over_minimal_symbols): Take a
5785 * linespec.c (struct collect_minsyms): Remove.
5786 (compare_msyms): Now a std::sort comparator.
5787 (add_minsym): Add parameters.
5788 (search_minsyms_for_name): Update. Use std::vector.
5790 2018-04-03 Tom Tromey <tom@tromey.com>
5792 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5795 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5797 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5799 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5802 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5803 printing static type.
5805 2018-04-01 Tom Tromey <tom@tromey.com>
5807 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5808 (rs6000_xfer_shared_libraries): Update.
5810 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5812 * common/gdb_vecs.h (char_ptr): Remove.
5813 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5815 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5817 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5819 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5821 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5823 * tracepoint.h (struct uploaded_tp): Initialize fields.
5824 <actions, step_actions, cmd_strings>: Change type to
5825 std::vector<char *>.
5826 * tracepoint.c (get_uploaded_tp): Allocate with new.
5827 (free_uploaded_tps): Free with delete.
5828 (parse_tracepoint_definition): Adjust to std::vector change.
5829 * breakpoint.c (read_uploaded_action): Likewise.
5830 (create_tracepoint_from_upload): Likewise.
5831 * ctf.c (ctf_write_uploaded_tp): Likewise.
5832 (SET_ARRAY_FIELD): Likewise.
5833 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5835 2018-03-30 Tom Tromey <tom@tromey.com>
5837 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5839 (svr4_keep_data_in_core): Update.
5840 (svr4_read_so_list): Update.
5842 2018-03-30 Tom Tromey <tom@tromey.com>
5844 * windows-nat.c (handle_output_debug_string, handle_exception):
5846 * target.h (target_read_string): Update.
5847 * target.c (target_read_string): Change "string" to
5849 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5851 * solib-frv.c (frv_current_sos): Update.
5852 * solib-dsbt.c (dsbt_current_sos): Update.
5853 * solib-darwin.c (darwin_current_sos): Update.
5854 * linux-thread-db.c (inferior_has_bug): Update.
5855 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5856 Update. Remove alloca.
5857 * ada-lang.c (ada_main_name): Update.
5859 2018-03-30 Tom Tromey <tom@tromey.com>
5861 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5862 (struct dwo_file_deleter): New.
5863 (dwo_file_up): New typedef.
5864 (open_and_init_dwo_file): Use dwo_file_up.
5865 (free_dwo_file_cleanup): Remove.
5867 2018-03-30 Tom Tromey <tom@tromey.com>
5869 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5870 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5872 2018-03-30 Tom Tromey <tom@tromey.com>
5874 * dwarf2read.c (class free_cached_comp_units): New class.
5875 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5876 (free_cached_comp_units): Remove function.
5878 2018-03-30 Tom Tromey <tom@tromey.com>
5880 * utils.h (make_cleanup_unpush_target): Remove.
5881 * inf-ptrace.c (struct target_unpusher): New.
5882 (target_unpush_up) New typedef.
5883 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
5885 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
5887 2018-03-27 Tom Tromey <tom@tromey.com>
5889 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
5891 2018-03-27 Pedro Alves <palves@redhat.com>
5892 Tom Tromey <tom@tromey.com>
5894 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
5895 destructor. Now a class.
5896 (gdb_readline_wrapper_cleanup): Remove function.
5897 (gdb_readline_wrapper): Remove cleanups.
5899 2018-03-27 Tom Tromey <tom@tromey.com>
5901 * typeprint.h (struct type_print_options) <local_typedefs,
5902 global_typedefs>: Remove "struct" keyword.
5903 (class typedef_hash_table): New class.
5904 (recursively_update_typedef_hash, add_template_parameters)
5905 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
5906 (find_typedef_in_hash): Don't declare.
5907 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
5908 (typedef_hash_table::recursively_update): Rename from
5909 recursively_update_typedef_hash. Now a member.
5910 (typedef_hash_table::add_template_parameters): Rename from
5911 add_template_parameters. Now a member.
5912 (typedef_hash_table::typedef_hash_table): Now a constructor;
5913 rename from create_typedef_hash.
5914 (typedef_hash_table::~typedef_hash_table): Now a destructor;
5915 rename from free_typedef_hash.
5916 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5917 (do_free_global_table): Remove.
5918 (typedef_hash_table::typedef_hash_table): New constructor; renamed
5919 from copy_type_recursive.
5920 (create_global_typedef_table): Remove.
5921 (typedef_hash_table::find_global_typedef): Now a member of
5923 (typedef_hash_table::find_typedef): Rename from
5924 find_typedef_in_hash; now a member.
5925 (whatis_exp): Update.
5926 * extension.h (struct ext_lang_type_printers): Add constructor and
5928 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5930 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5931 Now a constructor; rename from start_ext_lang_type_printers.
5932 (ext_lang_type_printers): Now a destructor; rename from
5933 free_ext_lang_type_printers.
5934 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5936 (c_type_print_base_struct_union): Update. Remove cleanups.
5938 2018-03-27 Tom Tromey <tom@tromey.com>
5940 * dwarf-index-write.c: Include <cmath>.
5942 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5944 * NEWS: Add entry describing new "set|show varsize-limit" command.
5945 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5947 * printcmd.c (_initialize_printcmd): Add "set var" alias of
5950 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
5952 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5954 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5955 * dwarf-index-common.c: New file.
5956 * dwarf-index-common.h: New file.
5957 * dwarf-index-write.c: New file.
5958 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5959 (struct dwarf2_section_info): Move from here.
5960 (dwarf2_section_info_def): Likewise.
5961 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5962 (offset_type): Likewise.
5963 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5964 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5965 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5966 (byte_swap): Likewise.
5967 (MAYBE_SWAP): Likewise.
5968 (dwarf2_per_cu_ptr): Likewise.
5969 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5970 (struct tu_stats): Likewise.
5971 (struct dwarf2_per_objfile): Likewise.
5972 (struct dwarf2_per_cu_data): Likewise.
5973 (struct signatured_type): Likewise.
5974 (sig_type_ptr): Likewise.
5975 (DEF_VEC_P (sig_type_ptr)): Likewise.
5976 (INDEX4_SUFFIX): Likewise.
5977 (INDEX5_SUFFIX): Likewise.
5978 (DEBUG_STR_SUFFIX): Likewise.
5979 (dwarf2_read_section): Make non-static.
5980 (mapped_index_string_hash): Move from here.
5981 (dwarf5_djb_hash): Likewise.
5982 (file_write): Likewise.
5983 (class data_buf): Likewise.
5984 (struct symtab_index_entry): Likewise.
5985 (struct mapped_symtab): Likewise.
5986 (find_slot): Likewise.
5987 (hash_expand): Likewise.
5988 (add_index_entry): Likewise.
5989 (uniquify_cu_indices): Likewise.
5990 (class c_str_view): Likewise.
5991 (class c_str_view_hasher): Likewise.
5992 (class vector_hasher): Likewise.
5993 (write_hash_table): Likewise.
5994 (psym_index_map): Likewise.
5995 (struct addrmap_index_data): Likewise.
5996 (add_address_entry): Likewise.
5997 (add_address_entry_worker): Likewise.
5998 (write_address_map): Likewise.
5999 (symbol_kind): Likewise.
6000 (write_psymbols): Likewise.
6001 (struct signatured_type_index_data): Likewise.
6002 (write_one_signatured_type): Likewise.
6003 (recursively_count_psymbols): Likewise.
6004 (recursively_write_psymbols): Likewise.
6005 (class debug_names): Likewise.
6006 (check_dwarf64_offsets): Likewise.
6007 (psyms_seen_size): Likewise.
6008 (write_gdbindex): Likewise.
6009 (write_debug_names): Likewise.
6010 (assert_file_size): Likewise.
6011 (write_psymtabs_to_index): Likewise.
6012 (save_gdb_index_command): Likewise.
6013 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6015 * dwarf2read.h: New file.
6017 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6020 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6021 symbol name if the CU's language stores symbol names in linkage
6023 * language.h (struct language_defn)
6024 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6025 all instances of this struct.
6027 2018-03-26 Tom Tromey <tom@tromey.com>
6029 * stack.c (backtrace_command_1): Remove verbose code.
6031 2018-03-26 Tom Tromey <tom@tromey.com>
6033 * python/py-framefilter.c (py_print_type): Don't catch
6034 exceptions. Return void.
6035 (py_print_value): Likewise.
6036 (py_print_single_arg): Likewise.
6037 (enumerate_args): Don't catch exceptions.
6038 (py_print_args): Likewise.
6039 (py_print_frame): Likewise.
6040 (gdbpy_apply_frame_filter): Catch exceptions here.
6042 2018-03-26 Tom Tromey <tom@tromey.com>
6044 * stack.c (_initialize_stack): Remove trailing newlines from help
6045 text. Add "Usage" line to "backtrace" help.
6047 2018-03-26 Tom Tromey <tom@tromey.com>
6050 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6052 2018-03-26 Tom Tromey <tom@tromey.com>
6054 * python/py-framefilter.c (py_print_single_arg): Return
6055 EXT_LANG_BT_ERROR from catch.
6057 2018-03-26 Tom Tromey <tom@tromey.com>
6060 * stack.c (backtrace_command_1): Move some code into no-filters
6063 2018-03-26 Tom Tromey <tom@tromey.com>
6065 * python/py-framefilter.c (throw_quit_or_print_exception): New
6067 (gdbpy_apply_frame_filter): Use it.
6069 2018-03-26 Tom Tromey <tom@tromey.com>
6072 * python/py-framefilter.c (py_print_type, py_print_value)
6073 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6076 2018-03-26 Tom Tromey <tom@tromey.com>
6078 * python/py-framefilter.c (enumerate_args): Use
6079 gdb::unique_xmalloc_ptr.
6081 2018-03-26 Tom Tromey <tom@tromey.com>
6083 * python/py-framefilter.c (py_print_frame): Return
6085 (gdbpy_apply_frame_filter): Update comment.
6086 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6088 <EXT_LANG_BT_NO_FILTERS>: Change value.
6090 2018-03-26 Tom Tromey <tom@tromey.com>
6093 * stack.c (backtrace_command): Parse "hide" argument.
6094 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6095 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6098 2018-03-26 Tom Tromey <tom@tromey.com>
6100 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6102 (backtrace_command): Remove "fulltrace", add "flags".
6104 2018-03-26 Tom Tromey <tom@tromey.com>
6106 * stack.c (backtrace_command): Rewrite command line parsing.
6108 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6110 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6112 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6114 * filename-seen-cache.h: Add include guard.
6116 2018-03-26 Keith Seitz <keiths@redhat.com>
6118 * symfile.c (place_section): Remove "struct" from section_addr_info
6120 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6121 "struct" keyword from section_addr_info.
6123 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6125 * regformats/regdef.h (reg): Add constructors.
6127 2018-03-25 Pedro Alves <palves@redhat.com>
6129 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6130 if then/else bodies in var_func_name extraction.
6132 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6134 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6135 lookup_minimal_symbol() to find symbol entry.
6136 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6138 2018-03-23 Keith Seitz <keiths@redhat.com>
6141 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6142 nested type definitions for C++, too.
6144 2018-03-23 Tom Tromey <tom@tromey.com>
6146 * machoread.c (struct oso_el): Add a constructor. Don't define as
6148 (macho_register_oso): Remove.
6149 (macho_symtab_read): Take a std::vector.
6150 (oso_el_compare_name): Now a std::sort comparator.
6151 (macho_symfile_read_all_oso): Take a std::vector.
6152 (macho_symfile_read): Use std::vector. Remove cleanups.
6154 2018-03-22 Tom Tromey <tom@tromey.com>
6156 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6157 (record_full_goto_bookmark): Use std::string.
6159 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6162 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6165 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6167 * rs6000-tdep.c (store_insn_p): New function.
6168 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6169 and cr_reg to their unshifted values. Use store_insn_p to
6170 match LR saves using either R1 or fdata->alloca_reg. Use
6171 store_insn_p to match CR saves. Set alloca_reg_offset
6172 when alloca_reg and framep are set. Remove lr_reg shift
6173 when assigning to fdata->lr_register.
6175 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6177 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6178 command line args instead of emitting a warning.
6180 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6182 * tracepoint.h (struct static_tracepoint_marker): Initialize
6183 fields, define default constructor, move constructor and move
6184 assignment, disable the rest.
6185 <str_id, extra>: Make std::string.
6186 (release_static_tracepoint_marker): Remove.
6187 (free_current_marker): Remove.
6188 * tracepoint.c (free_current_marker): Remove.
6189 (parse_static_tracepoint_marker_definition): Adjust to
6190 std::string, use new hex2str overload.
6191 (release_static_tracepoint_marker): Remove.
6192 (print_one_static_tracepoint_marker): Get marker by reference
6193 and adjust to std::string.
6194 (info_static_tracepoint_markers_command): Adjust to std::vector
6196 * target.h (static_tracepoint_marker_p): Remove typedef.
6197 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6198 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6200 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6202 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6203 (target_debug_print_std_vector_static_tracepoint_marker): New.
6204 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6206 (target_debug_print_static_tracepoint_marker_p): ... this.
6207 * target-delegates.c: Re-generate.
6208 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6210 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6211 (decode_static_tracepoint_spec): Adjust to std::vector.
6212 (tracepoint_print_one_detail): Adjust to std::string.
6213 (strace_marker_decode_location): Adjust to std::string.
6214 (update_static_tracepoint): Adjust to std::string, remove call
6215 to release_static_tracepoint_marker.
6216 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6217 Adjust to std::vector.
6218 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6219 (remote_static_tracepoint_markers_by_strid): Adjust to
6221 * common/rsp-low.h (hex2str): New overload with explicit count
6223 * common/rsp-low.c (hex2str): New overload with explicit count
6225 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6226 (_initialize_rsp_low_selftests): Add test_hex2str test.
6227 * unittests/tracepoint-selftests.c
6228 (test_parse_static_tracepoint_marker_definition): Adjust to
6231 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6233 * tracepoint.c (parse_static_tracepoint_marker_definition):
6234 Consider case where the definition is followed by more
6236 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6237 tracepoint-selftests.c.
6238 * unittests/tracepoint-selftests.c: New.
6240 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6242 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6245 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6247 * symtab.c (find_pc_sect_line): fixed indentation.
6249 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6251 * symtab.c (find_pc_sect_line): now uses binary search.
6253 2018-03-19 Tom Tromey <tom@tromey.com>
6255 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6258 2018-03-19 Pedro Alves <palves@redhat.com>
6259 Tom Tromey <tom@tromey.com>
6261 * unittests/observable-selftests.c: New file.
6262 * common/observable.h: New file.
6263 * observable.h: New file.
6264 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6265 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6266 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6267 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6268 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6269 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6270 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6271 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6272 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6273 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6274 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6275 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6276 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6277 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6278 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6279 tui/tui-interp.c, valops.c: Update all users.
6280 * tui/tui-hooks.c (tui_bp_created_observer)
6281 (tui_bp_deleted_observer, tui_bp_modified_observer)
6282 (tui_inferior_exit_observer, tui_before_prompt_observer)
6283 (tui_normal_stop_observer, tui_register_changed_observer):
6285 (tui_observers_token): New global.
6286 (attach_or_detach, tui_attach_detach_observers): New functions.
6287 (tui_install_hooks, tui_remove_hooks): Use
6288 tui_attach_detach_observers.
6289 * record-btrace.c (record_btrace_thread_observer): Remove.
6290 (record_btrace_thread_observer_token): New global.
6291 * observer.sh: Remove.
6292 * observer.c: Rename to observable.c.
6293 * observable.c (namespace gdb_observers): Define new objects.
6294 (observer_debug): Move into gdb_observers namespace.
6295 (struct observer, struct observer_list, xalloc_observer_list_node)
6296 (xfree_observer_list_node, generic_observer_attach)
6297 (generic_observer_detach, generic_observer_notify): Remove.
6298 (_initialize_observer): Update.
6299 Don't include observer.inc.
6300 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6301 (clean mostlyclean): Likewise.
6302 (observer.h, observer.inc): Remove targets.
6303 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6304 (COMMON_SFILES): Use observable.c, not observer.c.
6305 * .gitignore: Remove observer.h.
6307 2018-03-18 Tom Tromey <tom@tromey.com>
6309 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6311 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6313 2018-03-17 Tom Tromey <tom@tromey.com>
6315 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6317 2018-03-17 Tom Tromey <tom@tromey.com>
6319 * target.c (class scoped_target_fd): New.
6320 (target_fileio_close_cleanup): Remove.
6321 (target_fileio_read_alloc_1): Use scoped_target_fd.
6323 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6325 * silent-rules.mk: New.
6326 * Makefile.in: Include silent-rules.mk
6327 (srcdir, VPATH, top_srcdir): Move up.
6328 (COMPILE): Add ECHO_CXX.
6329 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6330 (init.c): Add ECHO_INIT_C.
6331 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6332 (version.c): Add ECHO_GEN.
6333 (printcmd.o): Add ECHO_CXX.
6334 (target-float.o): Add ECHO_CXX.
6335 (ada-exp.o): Add ECHO_CXX.
6336 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6337 (insight$(EXEEXT)): Add ECHO_CXXLD.
6338 * gnulib/configure.ac: Add AM_SILENT_RULES.
6339 * gnulib/aclocal.m4: Re-generate.
6340 * gnulib/configure: Re-generate.
6341 * gnulib/import/Makefile.in: Re-generate.
6343 2018-03-16 Tom Tromey <tom@tromey.com>
6345 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6346 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6347 * utils.c (do_free_section_addr_info)
6348 (make_cleanup_free_section_addr_info): Remove.
6349 * symfile.h (struct other_sections): Add constructor.
6350 (struct section_addr_info): Remove.
6351 (section_addr_info): New typedef.
6352 (struct sym_fns) <sym_offsets>: Change type of parameter.
6353 (build_section_addr_info_from_objfile)
6354 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6355 (default_symfile_offsets, symbol_file_add)
6356 (symbol_file_add_from_bfd)
6357 (build_section_addr_info_from_section_table): Update.
6358 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6359 * symfile.c (alloc_section_addr_info): Remove.
6360 (build_section_addr_info_from_section_table): Change return type.
6362 (build_section_addr_info_from_bfd)
6363 (build_section_addr_info_from_objfile): Likewise.
6364 (free_section_addr_info): Remove.
6365 (relative_addr_info_to_section_offsets): Change type of "addrs".
6366 (addrs_section_compar): Now a std::sort comparator.
6367 (addrs_section_sort): Change return type.
6368 (addr_info_make_relative): Change type of "addrs". Update.
6369 (default_symfile_offsets, syms_from_objfile_1)
6370 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6371 (symbol_file_add_separate): Update.
6372 (symbol_file_add): Change type of "addrs". Update.
6373 (add_symbol_file_command): Update. Remove cleanups.
6374 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6376 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6377 * solib.c (solib_read_symbols): Update.
6378 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6379 * machoread.c (macho_symfile_offsets): Update.
6380 * jit.c (jit_bfd_try_read_symtab): Update.
6382 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6384 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6385 unittests/utils-selftests.c.
6386 * unittests/utils-selftests.c: New file.
6388 2018-03-14 Tom Tromey <tom@tromey.com>
6391 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6394 2018-03-14 Tom Tromey <tom@tromey.com>
6397 * printcmd.c (printf_pointer): Allow "-" in format.
6399 2018-03-14 Tom Tromey <tom@tromey.com>
6401 * printcmd.c (_initialize_printcmd): Add usage to printf.
6403 2018-03-14 Yao Qi <qiyao@sourceware.org>
6405 * MAINTAINERS: Update my email address.
6407 2018-03-13 Tom Tromey <tom@tromey.com>
6409 * machoread.c (macho_check_dsym): Change filenamep to a
6411 (macho_symfile_read): Update.
6412 * symfile.c (load_command): Use std::string.
6414 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6416 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6417 to error message string.
6418 (riscv_register_name): Use xsnprintf instead of sprintf.
6419 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6421 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6423 (riscv_push_dummy_call): Likewise.
6425 2018-03-12 Tom Tromey <tom@tromey.com>
6427 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6428 Use gdb::byte_vector.
6429 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6431 2018-03-12 Yao Qi <yao.qi@linaro.org>
6433 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6434 parameter type to readable_regcache.
6435 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6438 2018-03-11 Tom Tromey <tom@tromey.com>
6440 * dwarf2read.c (struct nextfield): Add initializers.
6441 (struct nextfnfield): Remove.
6442 (struct fnfieldlist): Add initializers. Remove "length" and
6443 "head", use std::vector.
6444 (struct decl_field_list): Remove.
6445 (struct field_info): Add initializers.
6446 <fields, baseclasses>: Now std::vector.
6447 <nbaseclasses, nfnfields, typedef_field_list_count,
6448 nested_types_list_count>: Remove.
6449 (dwarf2_add_field, dwarf2_add_type_defn)
6450 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6451 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6452 (process_structure_scope): Update.
6454 2018-03-11 Tom Tromey <tom@tromey.com>
6456 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6457 for use by std::sort.
6458 (build_type_psymtabs_1): Use std::vector.
6460 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6462 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6463 and LIBMPFR in the printed configuration.
6465 2018-03-08 Tom Tromey <tom@tromey.com>
6467 * source.c (get_filename_and_charpos): Use scoped_fd.
6468 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6469 (procfs_pidlist): Likewise.
6470 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6471 (iterate_over_mappings): Likewise.
6473 2018-03-08 Tom Tromey <tom@tromey.com>
6475 * infcall.c (struct call_return_meta_info)
6476 <stack_temporaries_enabled>: Remove.
6477 (get_call_return_value, call_function_by_hand_dummy): Update.
6478 * thread.c (disable_thread_stack_temporaries): Remove.
6479 (enable_thread_stack_temporaries): Remove.
6480 (thread_stack_temporaries_enabled_p): Return bool.
6481 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6482 (get_last_thread_stack_temporary): Update.
6483 * eval.c (evaluate_subexp): Update.
6484 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6485 class, not a function.
6486 (value_ptr, value_vec): Remove typedefs.
6487 (class thread_info) <stack_temporaries_enabled>: Now bool.
6488 <stack_temporaries>: Now a std::vector.
6489 (thread_stack_temporaries_enabled_p)
6490 (value_in_thread_stack_temporaries): Return bool.
6492 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6494 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6495 (getpkt_or_notif_sane_1): Likewise.
6497 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6499 * build-id.c (build_id_to_debug_bfd): Use std::string.
6501 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6503 * build-id.c (find_separate_debug_file_by_buildid): Return
6505 * build-id.h (find_separate_debug_file_by_buildid): Return
6507 * coffread.c (coff_symfile_read): Adjust to std::string.
6508 * elfread.c (elf_symfile_read): Adjust to std::string.
6509 * symfile.c (separate_debug_file_exists): Change parameter to
6511 (find_separate_debug_file): Return std::string.
6512 (find_separate_debug_file_by_debuglink): Return std::string.
6513 * symfile.h (find_separate_debug_file_by_debuglink): Return
6516 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6518 * common/xml-utils.c (xml_escape_text): Move code to...
6519 (xml_escape_text_append): ... this new function.
6520 * common/xml-utils.h (xml_escape_text_append): New declaration.
6521 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6523 (_initialize_xml_utils): register test_xml_escape_text_append as
6526 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6528 * defs.h: Remove MAX_REGISTER_SIZE.
6529 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6531 * python/py-unwind.c (pyuw_sniffer): Likewise.
6533 2018-03-07 Tom Tromey <tom@tromey.com>
6535 * linux-tdep.c (linux_info_proc): Update.
6536 * target.h (struct target_ops) <to_fileio_readlink>: Return
6538 (target_fileio_readlink): Return optional<string>.
6539 * remote.c (remote_hostio_readlink): Return optional<string>.
6540 * inf-child.c (inf_child_fileio_readlink): Return
6542 * target.c (target_fileio_readlink): Return optional<string>.
6544 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6546 * regcache.c (cooked_read_test): Add riscv to the list of
6547 architectures that have a save_reggroup.
6549 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6551 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6552 value is not a dynamic class object.
6554 2018-03-06 Tom Tromey <tom@tromey.com>
6556 * rust-exp.y: Formatting fixes.
6558 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6560 * riscv-tdep.c (riscv_register_name): Remove target description
6562 (riscv_gdbarch_init): Remove target description check.
6564 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6566 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6568 * riscv-tdep.h: Likewise.
6570 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6572 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6573 (riscv_pseudo_register_write): Delete.
6574 (riscv_gdbarch_init): Remove all use of pseudo registers.
6576 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6578 * record-btrace.c (btrace_print_lines): Replace cleanup
6579 parameter with RAII equivalents.
6580 (btrace_insn_history): Replace cleanup with RAII equivalents.
6581 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6582 make_cleanup_ui_out_tuple_begin_end): Remove.
6583 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6584 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6585 make_cleanup_ui_out_list_begin_end): Remove.
6587 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6589 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6590 parameter types to std::vector. Use bool.
6591 (record_btrace_wait): Replace VEC(tp_t) with
6592 std::vector<thread_info *>.
6593 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6595 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6597 * record-btrace.c (record_btrace_disable_callback): Remove.
6598 (struct scoped_btrace_disable): New.
6599 (record_btrace_open): Use scoped_btrace_disable.
6601 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6603 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6604 reading values from registers.
6606 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6608 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6611 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6613 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6614 change parameter type. Use GDB's print functions, and use
6615 core_addr_to_string where appropriate.
6616 (riscv_push_dummy_call): Use core_addr_to_string where
6617 appropriate, update call to riscv_print_arg_location, and reindent
6619 (riscv_return_value): Update call to riscv_print_arg_location.
6621 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6622 Tim Newsome <tim@sifive.com>
6623 Albert Ou <a0u@eecs.berkeley.edu>
6624 Darius Rad <darius@bluespec.com>
6626 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6627 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6628 (ALLDEPFILES): Add riscv-tdep.c
6629 * configure.tgt: Add riscv support.
6630 * riscv-tdep.c: New file.
6631 * riscv-tdep.h: New file.
6632 * NEWS: Mention new target.
6633 * MAINTAINERS: Add entry for riscv.
6635 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6637 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6638 fields within aggregates.
6640 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6642 * record-btrace.c (btrace_print_lines): Change type of flags to
6643 gdb_disassembly_flags.
6645 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6647 * fbsd-nat.c: Include "inf-ptrace.h".
6648 (USE_SIGTRAP_SIGINFO): Conditionally define.
6649 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6650 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6651 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6653 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6655 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6657 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6658 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6659 "supports_stopped_by_hw_breakpoint" target methods.
6661 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6663 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6664 * fbsd-nat.c (debug_fbsd_nat): New variable.
6665 (show_fbsd_nat_debug): New function.
6666 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6667 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6669 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6671 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6672 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6674 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6675 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6678 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6680 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6681 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6683 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6685 * charset.c (struct charset_vector): New.
6686 (charsets): Change type to charset_vector.
6687 (find_charset_names): Adjust.
6689 (_initialize_charset): Adjust.
6691 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6693 * progspace.h (struct program_space) <deleted_solibs>: Change
6694 type to std::vector<std::string>.
6695 * progspace.c (clear_program_space_solib_cache): Adjust.
6696 * breakpoint.c (print_solib_event): Adjust.
6697 (check_status_catch_solib): Adjust.
6698 * solib.c (update_solib_list): Adjust.
6699 * ui-out.h (class ui_out) <field_string>: New overload.
6700 * ui-out.c (ui_out::field_string): New overload.
6702 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6704 * progspace.h (struct program_space): Add constructor and
6705 destructor, initialize fields.
6706 (add_program_space): Remove.
6707 * progspace.c (add_program_space): Rename to...
6708 (program_space::program_space): ... this.
6709 (release_program_space): Rename to...
6710 (program_space::~program_space): ... this.
6711 (delete_program_space): Use delete to delete program_space.
6712 (initialize_progspace): Use new to allocate program_space.
6713 * inferior.c (add_inferior_with_spaces): Likewise.
6714 (clone_inferior_command): Likewise.
6715 * infrun.c (follow_fork_inferior): Likewise.
6716 (handle_vfork_child_exec_or_exit): Likewise.
6718 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6720 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6721 (delim_string_to_char_ptr_vec): Return std::vector of
6722 gdb::unique_xmalloc_ptr.
6723 (dirnames_to_char_ptr_vec_append): Take std::vector of
6724 gdb::unique_xmalloc_ptr.
6725 (dirnames_to_char_ptr_vec): Return std::vector of
6726 gdb::unique_xmalloc_ptr.
6727 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6728 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6729 (delim_string_to_char_ptr_vec): Return an std::vector of
6730 gdb::unique_xmalloc_ptr, adjust the code.
6731 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6732 gdb::unique_xmalloc_ptr, adjust the code.
6733 (dirnames_to_char_ptr_vec): Return an std::vector of
6734 gdb::unique_xmalloc_ptr, adjust the code.
6735 * auto-load.c (auto_load_safe_path_vec): Change type to
6736 std::vector of gdb::unique_xmalloc_ptr.
6737 (auto_load_expand_dir_vars): Return an std::vector of
6738 gdb::unique_xmalloc_ptr, adjust the code.
6739 (auto_load_safe_path_vec_update): Adjust.
6740 (filename_is_in_auto_load_safe_path_vec): Adjust.
6741 (auto_load_objfile_script_1): Adjust.
6742 * build-id.c (build_id_to_debug_bfd): Adjust.
6743 * linux-thread-db.c (thread_db_load_search): Adjust.
6744 * source.c (add_path): Adjust.
6746 * symfile.c (find_separate_debug_file): Adjust.
6747 * utils.c (do_free_char_ptr_vec): Remove.
6748 (make_cleanup_free_char_ptr_vec): Remove.
6750 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6753 * common/pathstuff.c: Conditionally include "<windows.h>".
6755 2018-03-01 Georg Sauthoff <mail@georg.so>
6758 * gcore.in: Quote variables and switch interpreter to bash.
6760 2018-03-01 Tom Tromey <tom@tromey.com>
6762 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6763 assertion. Add assertion for discriminant_index.
6764 (quirk_rust_enum): Use correct base type name in univariant case.
6766 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6768 * record.c (get_call_history_modifiers): Return a
6770 (cmd_record_call_history): Adjust.
6771 * record-btrace.c (record_btrace_call_history): Adjust.
6772 (record_btrace_call_history_range): Adjust.
6773 (record_btrace_call_history_from): Adjust.
6774 * target-debug.h (target_debug_print_record_print_flags): New.
6775 * target-delegates.c: Re-generate.
6776 * target.c (target_call_history): Change flags type.
6777 (target_call_history_from): Likewise.
6778 (target_call_history_range): Likewise.
6779 * target.h (struct target_ops) <target_call_history>: Likewise.
6780 (target_call_history_from): Likewise.
6781 (target_call_history_range): Likewise.
6783 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6784 Simon Marchi <simon.marchi@polymtl.ca>
6786 * common/common-utils.c: Include "sys/stat.h".
6787 (is_regular_file): Move here from "source.c"; change return
6789 * common/common-utils.h (is_regular_file): New prototype.
6790 * common/pathstuff.c (contains_dir_separator): New function.
6791 * common/pathstuff.h (contains_dir_separator): New prototype.
6792 * source.c: Don't include "sys/stat.h".
6793 (is_regular_file): Move to "common/common-utils.c".
6795 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6797 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6798 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6799 * auto-load.c: Include "common/pathstuff.h".
6800 * common/common-def.h (current_directory): Move here.
6801 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6803 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6805 * common/pathstuff.c: New file.
6806 * common/pathstuff.h: New file.
6807 * compile/compile.c: Include "common/pathstuff.h".
6808 * defs.h (current_directory): Move to "common/common-defs.h".
6809 * dwarf2read.c: Include "common/pathstuff.h".
6811 * guile/scm-safe-call.c: Likewise.
6812 * linux-thread-db.c: Likewise.
6814 * nto-tdep.c: Likewise.
6815 * objfiles.c: Likewise.
6816 * source.c: Likewise.
6817 * symtab.c: Likewise.
6818 * utils.c: Include "common/pathstuff.h".
6819 (gdb_realpath): Move to "common/pathstuff.c".
6820 (gdb_realpath_keepfile): Likewise.
6821 (gdb_abspath): Likewise.
6822 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6823 (gdb_realpath_keepfile): Likewise.
6824 (gdb_abspath): Likewise.
6826 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6828 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6829 wildcard process pid for super_resume for kernels with a
6832 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6834 * compile/compile.c (get_args): Add additional comments
6835 explaining function.
6837 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6838 Tom Tromey <tom@tromey.com>
6840 * target.h (memory_write_request_s): Remove typedef. Don't define
6842 (target_write_memory_blocks): Change argument to std::vector.
6843 (struct memory_write_request): Add constructor.
6844 * target-memory.c (compare_block_starting_address): Return bool.
6845 Change argument types.
6846 (claim_memory): Change arguments to use std::vector.
6847 (split_regular_and_flash_blocks, blocks_to_erase)
6848 (compute_garbled_blocks): Likewise.
6849 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6850 (target_write_memory_blocks): Change argument to std::vector.
6851 * symfile.c (struct load_section_data): Add constructor and
6852 destructor. Use std::vector for "requests".
6853 (struct load_progress_data): Add initializers.
6854 (load_section_callback): Update. Use "new".
6855 (clear_memory_write_data): Remove.
6856 (generic_load): Update.
6858 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6860 * arch/aarch64.h: Use common/tdesc.h.
6862 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6864 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6865 architecture with a 64-bit ABI.
6867 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6869 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6870 ahead of target description loading.
6872 2018-02-26 Tom Tromey <tom@tromey.com>
6874 * stack.c (backtrace_command_1): Update.
6875 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6877 * python/py-framefilter.c (py_print_frame)
6878 (gdbpy_apply_frame_filter): Change type of "flags".
6879 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
6881 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
6882 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
6883 * extension.h (enum frame_filter_flag): Rename from
6885 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
6886 (apply_ext_lang_frame_filter): Change type of "flags".
6887 * extension.c (apply_ext_lang_frame_filter): Change type of
6889 * extension-priv.h (struct extension_language_ops)
6890 <apply_frame_filter>: Change type of "flags".
6892 2018-02-26 Tom Tromey <tom@tromey.com>
6895 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
6896 off-by-one in py_end computation.
6897 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
6899 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
6902 2018-02-26 Tom Tromey <tom@tromey.com>
6904 * dwarf2read.c (struct variant_field): New.
6905 (struct nextfield) <variant>: New field.
6906 (dwarf2_add_field): Handle DW_TAG_variant_part.
6907 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
6908 discriminated union.
6909 (read_structure_type): Handle DW_TAG_variant_part.
6910 (handle_struct_member_die): New function, extracted from
6911 process_structure_scope. Handle DW_TAG_variant.
6912 (process_structure_scope): Handle discriminated unions. Call
6913 handle_struct_member_die.
6915 2018-02-26 Tom Tromey <tom@tromey.com>
6917 * rust-lang.h (rust_last_path_segment): Declare.
6918 * rust-lang.c (rust_last_path_segment): Now public. Change
6920 (struct disr_info): Remove.
6921 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6922 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6923 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6924 (rust_enum_p, rust_enum_variant): New function.
6925 (rust_underscore_fields): Remove "offset" parameter.
6926 (rust_print_enum): New function.
6927 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6928 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6929 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
6931 (rust_internal_print_type): New function, from rust_print_type.
6933 (rust_print_type): Call rust_internal_print_type.
6934 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6935 Update enum handling.
6936 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6937 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6938 (rust_union_quirks): New functions.
6939 (process_full_comp_unit, process_full_type_unit): Call
6941 (process_structure_scope): Update rust_unions if necessary.
6943 2018-02-26 Tom Tromey <tom@tromey.com>
6945 * value.h (value_union_variant): Declare.
6946 * valops.c (value_union_variant): New function.
6947 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6948 (struct discriminant_info): New.
6949 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6951 (struct main_type) <flag_discriminated_union>: New field.
6953 2018-02-26 Tom Tromey <tom@tromey.com>
6955 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6956 unittests/unpack-selftests.c.
6957 * unittests/unpack-selftests.c: New file.
6958 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6960 2018-02-26 Yao Qi <yao.qi@linaro.org>
6962 * dwarf2read.c (struct partial_die_info) <read>: New method.
6963 (read_partial_die): Remove the declaration.
6964 (load_partial_dies): Update.
6965 (partial_die_info::partial_die_info):
6966 (read_partial_die): Change it to partial_die_info::read.
6968 2018-02-26 Yao Qi <yao.qi@linaro.org>
6970 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6971 (fixup_partial_die): Remove declaration.
6972 (scan_partial_symbols): Update.
6973 (partial_die_parent_scope): Likewise.
6974 (partial_die_full_name): Likewise.
6975 (fixup_partial_die): Change it to partial_die_info::fixup.
6977 2018-02-26 Yao Qi <yao.qi@linaro.org>
6979 * dwarf2read.c (read_partial_die): Update the declaration.
6980 (load_partial_dies): Caller update.
6981 (read_partial_die): Remove one argument abbrev_len.
6983 2018-02-26 Yao Qi <yao.qi@linaro.org>
6985 * dwarf2read.c (struct partial_die_info): Add ctor, delete
6986 assignment operator.
6987 (load_partial_dies): Use ctor and copy ctor.
6988 (read_partial_die): Update.
6989 (dwarf2_cu::find_partial_die): Use ctor.
6991 2018-02-26 Yao Qi <yao.qi@linaro.org>
6993 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6994 (find_partial_die_in_comp_unit): Change it to
6995 dwarf2_cu::find_partial_die.
6996 (find_partial_die): Update.
6998 2018-02-26 Yao Qi <yao.qi@linaro.org>
7000 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7003 2018-02-26 Yao Qi <yao.qi@linaro.org>
7005 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7007 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7009 * arch/amd64.h: Use common/tdesc.h.
7010 * arch/i386.c: Likewise.
7011 * arch/i386.h: Likewise.
7012 * arch/tic6x.c: Likewise.
7013 * arch/tdesc.h: Move file from here...
7014 * common/tdesc.h: ...to here.
7015 * features/aarch64-core.c: Regenerate.
7016 * features/aarch64-fpu.c: Regenerate.
7017 * features/i386/32bit-avx.c: Regenerate.
7018 * features/i386/32bit-avx512.c: Regenerate.
7019 * features/i386/32bit-core.c: Regenerate.
7020 * features/i386/32bit-linux.c: Regenerate.
7021 * features/i386/32bit-mpx.c: Regenerate.
7022 * features/i386/32bit-pkeys.c: Regenerate.
7023 * features/i386/32bit-sse.c: Regenerate.
7024 * features/i386/64bit-avx.c: Regenerate.
7025 * features/i386/64bit-avx512.c: Regenerate.
7026 * features/i386/64bit-core.c: Regenerate.
7027 * features/i386/64bit-linux.c: Regenerate.
7028 * features/i386/64bit-mpx.c: Regenerate.
7029 * features/i386/64bit-pkeys.c: Regenerate.
7030 * features/i386/64bit-segments.c: Regenerate.
7031 * features/i386/64bit-sse.c: Regenerate.
7032 * features/i386/x32-core.c: Regenerate.
7033 * features/tic6x-c6xp.c: Regenerate.
7034 * features/tic6x-core.c: Regenerate.
7035 * features/tic6x-gp.c: Regenerate.
7036 * target-descriptions.c: Use common/tdesc.h.
7037 * target-descriptions.h: Likewise.
7039 2018-02-24 Tom Tromey <tom@tromey.com>
7041 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7042 (try_thread_db_load_from_dir, thread_db_load_search): Use
7044 (info_auto_load_libthread_db_compare): Return bool. Change
7046 (info_auto_load_libthread_db): Use std::vector, std::string.
7049 2018-02-24 Tom Tromey <tom@tromey.com>
7051 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7053 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7055 * gdbarch.c: Rebuild.
7056 * gdbarch.h: Rebuild.
7057 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7058 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7059 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7062 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7064 * gdbtypes.h (sect_offset): Change type to uint64_t.
7065 (sect_offset_str): New function.
7066 * dwarf2read.c (create_addrmap_from_aranges): Use
7068 (error_check_comp_unit_head): Likewise.
7069 (create_debug_type_hash_table): Likewise.
7070 (read_cutu_die_from_dwo): Likewise.
7071 (init_cutu_and_read_dies): Likewise.
7072 (init_cutu_and_read_dies_no_follow): Likewise.
7073 (process_psymtab_comp_unit_reader): Likewise.
7074 (partial_die_parent_scope): Likewise.
7075 (peek_die_abbrev): Likewise.
7076 (process_queue): Likewise.
7077 (dwarf2_physname): Likewise.
7078 (read_namespace_alias): Likewise.
7079 (read_import_statement): Likewise.
7080 (create_dwo_cu_reader): Likewise.
7081 (create_cus_hash_table): Likewise.
7082 (lookup_dwo_cutu): Likewise.
7083 (inherit_abstract_dies): Likewise.
7084 (read_func_scope): Likewise.
7085 (read_call_site_scope): Likewise.
7086 (dwarf2_add_member_fn): Likewise.
7087 (read_common_block): Likewise.
7088 (read_module_type): Likewise.
7089 (read_typedef): Likewise.
7090 (read_subrange_type): Likewise.
7091 (load_partial_dies): Likewise.
7092 (read_partial_die): Likewise.
7093 (find_partial_die): Likewise.
7094 (read_str_index): Likewise.
7095 (dwarf2_string_attr): Likewise.
7096 (build_error_marker_type): Likewise.
7097 (lookup_die_type): Likewise.
7098 (dump_die_shallow): Likewise.
7099 (follow_die_ref): Likewise.
7100 (dwarf2_fetch_die_loc_sect_off): Likewise.
7101 (dwarf2_fetch_constant_bytes): Likewise.
7102 (follow_die_sig): Likewise.
7103 (get_signatured_type): Likewise.
7104 (get_DW_AT_signature_type): Likewise.
7105 (dwarf2_find_containing_comp_unit): Likewise.
7106 (set_die_type): Likewise.
7108 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7110 * arch/aarch64.c: Include "common-defs.h".
7111 * arch/amd64.c: Likewise.
7112 * arch/i386.c: Likewise.
7114 2018-02-21 Tom Tromey <tom@tromey.com>
7116 * value.h: (extract_field_op): Update.
7117 * eval.c (extract_field_op): Return a const char *.
7118 * expression.h (parse_expression_for_completion): Update.
7119 * completer.c (complete_expression): Update.
7120 (add_struct_fields): Make fieldname const.
7121 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7122 (mark_completion_tag, parse_exp_in_context_1): Update.
7123 (parse_expression_for_completion): Change "name" to
7124 unique_xmalloc_ptr*.
7126 2018-02-21 Tom Tromey <tom@tromey.com>
7128 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7130 2018-02-21 Yao Qi <yao.qi@linaro.org>
7132 * avr-tdep.c (avr_read_pc): Change parameter type to
7134 * gdbarch.sh (read_pc): Likewise.
7135 * gdbarch.c: Re-generated.
7136 * gdbarch.h: Re-generated.
7137 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7139 * ia64-tdep.c (ia64_read_pc): Likewise.
7140 * mips-tdep.c (mips_read_pc): Likewise.
7141 * spu-tdep.c (spu_read_pc): Likewise.
7143 2018-02-21 Yao Qi <yao.qi@linaro.org>
7145 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7146 * regcache-dump.c: New file.
7147 * regcache.c: Move register_dump to regcache-dump.c.
7148 (maintenance_print_registers): Likewise.
7149 (maintenance_print_raw_registers): Likewise.
7150 (maintenance_print_cooked_registers): Likewise.
7151 (maintenance_print_register_groups): Likewise.
7152 (maintenance_print_remote_registers): Likewise.
7153 (_initialize_regcache): Likewise.
7154 * regcache.h (register_dump): Moved from regcache.c.
7156 2018-02-21 Yao Qi <yao.qi@linaro.org>
7158 * regcache.c (regcache::regcache): Update.
7159 (regcache::invalidate): Move it to detached_regcache::invalidate.
7160 (get_thread_arch_aspace_regcache): Update.
7161 (regcache::raw_update): Update.
7162 (regcache::cooked_read): Remove some code.
7163 (regcache::cooked_read_value): Likewise.
7164 (regcache::raw_write): Remove assert on m_readonly_p.
7165 (regcache::raw_supply_integer): Move it to
7166 detached_regcache::raw_supply_integer.
7167 (regcache::raw_supply_zeroed): Likewise.
7168 * regcache.h (detached_regcache) <raw_supply_integer>: New
7170 <raw_supply_zeroed, invalidate>: Likewise.
7171 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7172 <invalidate>: Likewise.
7173 <m_readonly_p>: Removed.
7175 2018-02-21 Yao Qi <yao.qi@linaro.org>
7177 * infcmd.c (get_return_value): Let stop_regs point to
7178 get_current_regcache.
7179 * regcache.c (regcache::regcache): Remove.
7180 (register_dump_reg_buffer): New class.
7181 (regcache_print): Adjust.
7182 * regcache.h (regcache): Remove constructors.
7184 2018-02-21 Yao Qi <yao.qi@linaro.org>
7186 * regcache.c (class register_dump): New class.
7187 (register_dump_regcache, register_dump_none): New class.
7188 (register_dump_remote, register_dump_groups): New class.
7189 (regcache_print): Update.
7190 * regcache.h (regcache_dump_what): Move it to regcache.c.
7191 (regcache) <dump>: Remove.
7193 2018-02-21 Yao Qi <yao.qi@linaro.org>
7195 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7197 (jit_unwind_reg_set_impl): Call raw_supply.
7198 (jit_frame_sniffer): Use reg_buffer_rw.
7199 * record-full.c (record_full_core_regbuf): Change its type.
7200 (record_full_core_open_1): Use reg_buffer_rw.
7201 (record_full_close): Likewise.
7202 (record_full_core_fetch_registers): Use regcache->raw_supply.
7203 (record_full_core_store_registers): Likewise.
7204 * regcache.c (regcache::get_register_status): Move it to
7206 (regcache_raw_set_cached_value): Remove.
7207 (regcache::raw_set_cached_value): Remove.
7208 (regcache::raw_write): Call raw_supply.
7209 (regcache::raw_supply): Move it to reg_buffer_rw.
7210 * regcache.h (regcache_raw_set_cached_value): Remove.
7211 (reg_buffer_rw): New class.
7213 2018-02-21 Yao Qi <yao.qi@linaro.org>
7215 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7216 readonly_detached_regcache.
7217 (dummy_frame_prev_register): Use regcache->cooked_read.
7218 * frame.c (frame_save_as_regcache): Change return type.
7219 (frame_pop): Update.
7220 * frame.h (frame_save_as_regcache): Update declaration.
7221 * inferior.h (get_infcall_suspend_state_regcache): Update
7223 * infrun.c (infcall_suspend_state) <registers>: use
7224 readonly_detached_regcache.
7225 (save_infcall_suspend_state): Don't use regcache_dup.
7226 (get_infcall_suspend_state_regcache): Change return type.
7227 * linux-fork.c (struct fork_info) <savedregs>: Change to
7228 readonly_detached_regcache.
7230 (fork_save_infrun_state): Don't use regcache_dup.
7231 (info_checkpoints_command): Adjust.
7232 * mi/mi-main.c (register_changed_p): Update declaration.
7233 (mi_cmd_data_list_changed_registers): Use
7234 readonly_detached_regcache.
7235 (register_changed_p): Change parameter type to
7236 readonly_detached_regcache.
7237 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7238 readonly_detached_regcache.
7239 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7240 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7242 (regcache::save): Move it to reg_buffer.
7243 (regcache::restore): Change parameter type.
7244 (regcache_dup): Remove.
7245 * regcache.h (reg_buffer) <save>: New method.
7246 (readonly_detached_regcache): New class.
7247 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7248 readonly_detached_regcache.
7249 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7251 2018-02-21 Yao Qi <yao.qi@linaro.org>
7253 * frame.c (frame_save_as_regcache): Use regcache method save.
7254 (frame_pop): Use regcache method restore.
7255 * infrun.c (restore_infcall_suspend_state): Likewise.
7256 * linux-fork.c (fork_load_infrun_state): Likewise.
7257 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7259 * regcache.c (regcache_save): Remove.
7260 (regcache::restore): More asserts.
7261 (regcache_cpy): Remove.
7262 * regcache.h (regcache_save): Remove the declaration.
7263 (regcache::restore): Move from private to public.
7264 Remove the friend declaration of regcache_cpy.
7265 (regcache_cpy): Remove declaration.
7267 2018-02-21 Yao Qi <yao.qi@linaro.org>
7269 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7270 parameter type to 'readable_regcache *'.
7271 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7272 * arm-tdep.c (arm_neon_quad_read): Likewise.
7273 (arm_pseudo_read): Likewise.
7274 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7275 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7276 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7277 * gdbarch.c: Re-generated.
7278 * gdbarch.h: Re-generated.
7279 * gdbarch.sh (pseudo_register_read): Change parameter type to
7280 'readable_regcache *'.
7281 (pseudo_register_read_value): Likewise.
7282 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7283 (h8300_pseudo_register_read): Likewise.
7284 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7285 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7286 (i386_pseudo_register_read_into_value): Likewise.
7287 (i386_pseudo_register_read_value): Likewise.
7288 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7290 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7291 * m32c-tdep.c (m32c_raw_read): Likewise.
7292 (m32c_read_flg): Likewise.
7293 (m32c_banked_register): Likewise.
7294 (m32c_banked_read): Likewise.
7295 (m32c_sb_read): Likewise.
7296 (m32c_part_read): Likewise.
7297 (m32c_cat_read): Likewise.
7298 (m32c_r3r2r1r0_read): Likewise.
7299 (m32c_pseudo_register_read): Likewise.
7300 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7301 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7302 (mep_pseudo_cr64_read): Likewise.
7303 (mep_pseudo_register_read): Likewise.
7304 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7305 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7306 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7307 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7308 (regcache::cooked_read): Likewise.
7309 (regcache::cooked_read_value): Likewise.
7310 (regcache_cooked_read_signed):
7311 (regcache::cooked_read): Likewise.
7312 * regcache.h (readable_regcache): New class.
7313 (regcache): Inherit readable_regcache. Move some methods to
7315 * rl78-tdep.c (rl78_pseudo_register_read): Change
7316 parameter type to 'readable_regcache *'.
7317 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7318 (e500_pseudo_register_read): Change parameter type to
7319 'readable_regcache *'.
7320 (dfp_pseudo_register_read): Likewise.
7321 (vsx_pseudo_register_read): Likewise.
7322 (efpr_pseudo_register_read): Likewise.
7323 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7324 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7325 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7326 (sh64_pseudo_register_read): Likewise.
7327 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7328 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7329 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7330 (spu_pseudo_register_read): Likewise.
7331 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7332 (xtensa_pseudo_register_read): Likewise.
7334 2018-02-21 Yao Qi <yao.qi@linaro.org>
7336 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7337 (regcache::arch): Move it to reg_buffer::arch.
7338 (regcache::register_buffer): Likewise.
7339 (regcache::assert_regnum): Likewise.
7340 (regcache::num_raw_registers): Likewise.
7341 * regcache.h (reg_buffer): New class.
7342 (regcache): Inherit reg_buffer.
7344 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7346 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7347 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7349 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7351 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7353 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7355 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7356 (SFILES): Remove common/*.c files.
7357 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7358 * common/common.host: Add common reference.
7359 * configure.ac: Likewise.
7360 * configure: Regenerate.
7362 2018-02-16 Yao Qi <yao.qi@linaro.org>
7364 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7365 (block_initialize_namespace): Use new.
7366 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7367 (dwarf2_free_objfile): Use delete.
7368 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7369 (copy_type_recursive): Use new.
7370 * gdb_obstack.h (allocate_on_obstack): New.
7372 2018-02-15 Yao Qi <yao.qi@linaro.org>
7375 * inferior.c (exit_inferior_1): Reset inf->control.
7377 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7379 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7382 2018-02-14 Pedro Alves <palves@redhat.com>
7384 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7385 frame_cleanup_after_sniffer on exception.
7387 2018-02-14 Tom Tromey <tom@tromey.com>
7389 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7391 (solib_bfd_open): Make pathname const.
7392 * solib.c (solib_bfd_open): Make pathname const.
7393 * solib-spu.c (spu_bfd_fopen): Make name const.
7394 (spu_bfd_open): Make pathname const.
7395 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7396 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7398 2018-02-14 Tom Tromey <tom@tromey.com>
7400 * symfile.c (symfile_bfd_open): Update.
7401 * source.h (openp, source_full_path_of, find_and_open_source):
7402 Change argument type to unique_xmalloc_ptr.
7403 * source.c (openp): Take a unique_xmalloc_ptr.
7404 (source_full_path_of, find_and_open_source): Likewise.
7405 (open_source_file, symtab_to_fullname): Update.
7406 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7408 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7409 (exec_file_find): Update.
7410 * psymtab.c (psymtab_to_fullname): Update.
7411 * nto-tdep.h (nto_find_and_open_solib): Update.
7412 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7414 * exec.c (exec_file_attach): Update.
7415 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7416 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7418 2018-02-14 Tom Tromey <tom@tromey.com>
7420 * solib.c: Include source.h.
7421 * nto-tdep.c: Include source.h.
7422 * mi/mi-cmd-env.c: Include source.h.
7423 * infcmd.c: Include source.h.
7424 * exec.c: Include source.h.
7425 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7426 (add_path, directory_switch, source_path, init_source_path): Move
7428 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7429 (add_path, directory_switch, source_path, init_source_path):
7432 2018-02-14 Tom Tromey <tom@tromey.com>
7434 * solist.h (exec_file_find, solib_find): Return
7436 (solib_bfd_fopen): Take a const char *.
7437 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7438 (exec_file_find, solib_find): Likewise.
7439 (solib_bfd_fopen): Do not take ownership of "pathname".
7440 (solib_bfd_open): Use unique_xmalloc_ptr.
7441 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7442 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7443 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7444 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7446 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7448 * ada-lang.c (name_match_type_from_name): Remove reference to
7449 ada_name_for_lookup in function's documentation.
7450 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7452 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7454 * defs.h (enum openp_flags): New enum.
7455 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7456 Move to enum openp_flags.
7457 (openp_flags): New enum flags.
7458 (openp): Change parameter type to openp_flags.
7459 * source.c (openp): Change parameter type to openp_flags.
7460 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7461 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7463 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7465 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7468 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7470 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7472 (class dwarf2_queue_guard): ...the destructor of this new class.
7473 (dw2_do_instantiate_symtab): Create instance of the new class
7474 dwarf2_queue_guard, remove cleanup.
7476 2018-02-09 Tom Tromey <tom@tromey.com>
7478 * source.c (find_source_lines): Don't reference past the end of
7481 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7483 * remote.c (remote_btrace_maybe_reopen): Change error message.
7484 * btrace.c (btrace_enable): Likewise.
7485 (parse_xml_btrace): Likewise.
7486 (parse_xml_btrace_conf): Likewise.
7488 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7490 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7491 (linux_enable_pt, linux_enable_bts): Call
7492 diagnose_perf_event_open_fail.
7494 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7496 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7497 Remove parameter and change return type. Update callers. Move it.
7498 (linux_enable_bts, linux_enable_pt): Improve error message.
7499 (linux_enable_pt): Remove zero buffer size check.
7500 (linux_enable_btrace): Improve error messages. Remove NULL return
7503 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7505 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7506 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7507 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7508 (linux_supports_pt, linux_supports_btrace): Remove.
7509 (linux_enable_bts): Call cpu_supports_bts.
7510 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7511 * remote.c (remote_supports_btrace): Remove.
7512 (init_remote_ops): Remove remote_supports_btrace.
7513 * target-delegates.c: Regenerated.
7514 * target.c (target_supports_btrace): Remove.
7515 * target.h (target_ops) <to_supports_btrace>: Remove
7516 (target_supports_btrace): Remove.
7517 * x86-linux-nat.c (x86_linux_create_target): Remove
7518 linux_supports_btrace.
7520 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7522 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7524 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7525 exception and use message in own exception.
7527 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7529 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7530 (perf_event_pt_event_type): Use gdb_file_up.
7531 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7532 scoped_fd, and scoped_mmap.
7534 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7536 * common/scoped_mmap.h: New.
7537 * unittests/scoped_mmap-selftest.c: New.
7538 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7539 unittests/scoped_mmap-selftest.c.
7541 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7543 * common/scoped_fd.h: New.
7544 * unittests/scoped_fd-selftest.c: New.
7545 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7546 unittests/scoped_fd-selftest.c.
7548 2018-02-09 Tom Tromey <tom@tromey.com>
7550 * auto-load.c (auto_load_section_scripts): Use
7551 gdb::unique_xmalloc_ptr.
7553 2018-02-09 Tom Tromey <tom@tromey.com>
7555 * auto-load.c (execute_script_contents): Use std::string.
7557 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7559 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7560 Python function, rather than a new command.
7562 2018-02-08 Tom Tromey <tom@tromey.com>
7564 * solib.c (solib_find_1): Use std::string.
7565 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7567 2018-02-08 Tom Tromey <tom@tromey.com>
7569 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7571 2018-02-08 Tom Tromey <tom@tromey.com>
7573 * source.c (find_source_lines): Use gdb::def_vector.
7575 2018-02-08 Tom Tromey <tom@tromey.com>
7577 * macrocmd.c (struct temporary_macro_definition): New.
7578 (macro_define_command): Use temporary_macro_definition. Remove
7580 (free_macro_definition_ptr): Remove.
7582 2018-02-08 Tom Tromey <tom@tromey.com>
7584 * macroexp.c (maybe_expand): Use std::string.
7586 2018-02-08 Tom Tromey <tom@tromey.com>
7588 * macroexp.c (struct macro_buffer): Add initializers for some
7590 (init_buffer, init_shared_buffer, free_buffer)
7591 (free_buffer_return_text): Remove.
7592 (macro_buffer): New constructors.
7593 (~macro_buffer): New destructor.
7594 (macro_buffer::set_shared): New method.
7595 (macro_buffer::resize_buffer, macro_buffer::appendc)
7596 (macro_buffer::appendmem): Now methods, not free functions.
7597 (set_token, append_tokens_without_splicing, stringify)
7598 (macro_stringify): Update.
7599 (gather_arguments): Change return type. Remove argc_p argument,
7600 add args_ptr argument. Use std::vector.
7601 (substitute_args): Remove argc argument. Accept std::vector.
7602 (expand): Update. Use std::vector.
7603 (scan, macro_expand, macro_expand_next): Update.
7605 2018-02-08 Tom Tromey <tom@tromey.com>
7607 * symtab.c (default_collect_symbol_completion_matches_break_on):
7608 Use unique_xmalloc_ptr.
7609 * macroscope.h: (sal_macro_scope, user_macro_scope)
7610 (default_macro_scope): Return unique_xmalloc_ptr.
7611 * macroscope.c (sal_macro_scope, user_macro_scope)
7612 (default_macro_scope): Return unique_xmalloc_ptr.
7613 * macroexp.h (macro_expand, macro_expand_once): Return
7615 * macroexp.c (macro_expand, macro_expand_once): Return
7617 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7618 (info_macro_command, info_macros_command): Use
7620 * compile/compile-c-support.c (write_macro_definitions): Use
7622 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7624 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7626 * value.c (value_static_field): Assign field type instead of
7627 containing type when returning an optimized out value.
7629 2018-02-06 Yao Qi <yao.qi@linaro.org>
7631 * ft32-tdep.c (ft32_read_pc): Remove.
7632 (ft32_write_pc): Remove.
7633 (ft32_gdbarch_init): Update.
7634 * m32r-tdep.c (m32r_read_pc): Remove.
7635 (m32r_gdbarch_init): Update.
7636 * mep-tdep.c (mep_read_pc): Remove.
7637 (mep_gdbarch_init): Update.
7638 * microblaze-tdep.c (microblaze_write_pc): Remove.
7639 (microblaze_gdbarch_init): Update.
7640 * mn10300-tdep.c (mn10300_read_pc): Remove.
7641 (mn10300_write_pc): Remove.
7642 (mn10300_gdbarch_init): Update.
7643 * moxie-tdep.c (moxie_read_pc): Remove.
7644 (moxie_write_pc): Remove.
7645 (moxie_gdbarch_init): Update.
7647 2018-02-06 Yao Qi <yao.qi@linaro.org>
7649 * expprint.c (print_subexp_standard): Handle
7650 OP_F77_UNDETERMINED_ARGLIST.
7651 (dump_subexp_body_standard): Likewise.
7653 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7655 * target-descriptions.c (tdesc_element_visitor) Add empty
7657 (tdesc_type): Move make_gdb_type from here.
7658 (tdesc_type_builtin): Likewise.
7659 (tdesc_type_vector): Likewise.
7660 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7661 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7662 (make_gdb_type_union): Likewise.
7663 (make_gdb_type_flags): Likewise.
7664 (make_gdb_type_enum): Likewise.
7665 (make_gdb_type): New function.
7666 (tdesc_register_type): Use static make_gdb_type.
7668 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7670 * infcmd.c (default_print_one_register_info): Align natural-format
7671 column values consistently one under another.
7672 (pad_to_column): New function.
7674 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7676 * dwarf2read.c (dwarf2_physname): Move commment.
7678 2018-02-01 Leszek Swirski <leszeks@google.com>
7680 * varobj.c (varobj_formatted_print_options): Allow recursive
7681 pretty printing if pretty printing is enabled.
7683 2018-02-01 Leszek Swirski <leszeks@google.com>
7685 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7686 names after a structop as a filename.
7688 2018-02-01 Yao Qi <yao.qi@linaro.org>
7690 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7691 (arm_record_coproc_data_proc): Likewise.
7693 2018-02-01 Yao Qi <yao.qi@linaro.org>
7695 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7697 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7699 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7700 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7702 2018-01-31 Pedro Alves <palves@redhat.com>
7704 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7705 * inflow.c (child_terminal_save_inferior): Wrap reference to
7706 tcgetpgrp in HAVE_TERMIOS_H.
7707 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7709 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7710 always iterate over all inferiors.
7711 (gdbsim_cntrl_c): Adjust.
7712 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7714 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7716 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7717 index type is objfile-owned if the element type is as well.
7719 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7723 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7725 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7726 "features/s390x-linux64.c".
7727 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7728 s390_linux32 and s390x_linux64.
7729 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7731 * s390-tdep.c: Include "features/s390-linux32.c" and
7732 "features/s390x-linux64.c".
7733 (s390_tdesc_valid): Add check for tdesc_has_registers.
7734 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7735 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7736 tdesc_s390x_linux64.
7737 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7738 tdesc_s390x_linux64 to...
7739 * s390-tdep.h: ...here.
7741 2018-01-30 Pedro Alves <palves@redhat.com>
7744 * config.in, configure: Regenerate.
7745 * configure.ac: Check for getpgid.
7746 * go32-nat.c (go32_pass_ctrlc): New.
7747 (go32_target): Install it.
7748 * inf-child.c (inf_child_target): Install
7749 child_terminal_save_inferior, child_pass_ctrlc and
7751 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7752 (inf_ptrace_target): No longer install it.
7753 * infcmd.c (interrupt_target_1): Adjust.
7754 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7755 (child_interrupt): Declare.
7756 (inferior::terminal_state): New.
7757 * inflow.c (struct terminal_info): Update comments.
7758 (inferior_process_group): Delete.
7759 (terminal_is_ours): Delete.
7760 (gdb_tty_state): New.
7761 (child_terminal_init): Adjust.
7762 (is_gdb_terminal, sharing_input_terminal_1)
7763 (sharing_input_terminal): New functions.
7764 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7765 Set the process's actual process group in the foreground if
7766 possible. Handle is_ours_for_output/is_ours distinction. Don't
7767 mark terminal as the inferior's if not sharing GDB's terminal.
7768 Don't check attach_flag.
7769 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7770 pass down a target_terminal_state.
7771 (child_terminal_save_inferior): New, factored out from ...
7772 (child_terminal_ours_1): ... this. Handle
7773 target_terminal_state::is_ours_for_output.
7774 (child_interrupt, child_pass_ctrlc): New.
7775 (inflow_inferior_exit): Clear the inferior's terminal_state.
7776 (copy_terminal_info): Copy the inferior's terminal state.
7777 (_initialize_inflow): Remove reference to terminal_is_ours.
7778 * inflow.h (inferior_process_group): Delete.
7779 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7780 * procfs.c (procfs_target): Don't install procfs_interrupt.
7781 (procfs_interrupt): Delete.
7782 * remote.c (remote_serial_quit_handler): Adjust.
7783 (remote_interrupt): Remove ptid parameter. Adjust.
7784 * target-delegates.c: Regenerate.
7785 * target.c: Include "terminal.h".
7786 (target_terminal::terminal_state): Rename to ...
7787 (target_terminal::m_terminal_state): ... this.
7788 (target_terminal::init): Adjust.
7789 (target_terminal::inferior): Adjust to per-inferior
7791 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7792 (target_terminal::ours, target_terminal::ours_for_output): Use
7793 target_terminal_is_ours_kind.
7794 (target_interrupt): Remove ptid parameter. Adjust.
7795 (default_target_pass_ctrlc): Adjust.
7796 * target.h (target_ops::to_terminal_save_inferior): New field.
7797 (target_ops::to_interrupt): Remove ptid_t parameter.
7798 (target_interrupt): Remove ptid_t parameter. Update comment.
7799 (target_pass_ctrlc): Update comment.
7800 * target/target.h (target_terminal_state): New scoped enum,
7802 (target_terminal::terminal_state): ... here.
7803 (target_terminal::inferior): Update comments.
7804 (target_terminal::restore_inferior): New.
7805 (target_terminal::is_inferior, target_terminal::is_ours)
7806 (target_terminal::is_ours_for_output): Adjust.
7807 (target_terminal::scoped_restore_terminal_state): Adjust to
7808 rename, and call restore_inferior() instead of inferior().
7809 (target_terminal::scoped_restore_terminal_state::m_state): Change
7811 (target_terminal::terminal_state): Rename to ...
7812 (target_terminal::m_terminal_state): ... this and change type.
7814 2018-01-30 Pedro Alves <palves@redhat.com>
7816 * linux-nat.c (wait_for_signal): New function.
7817 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7819 (async_terminal_is_ours)
7820 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7821 (linux_nat_add_target): Don't override
7822 to_terminal_inferior/to_terminal_ours.
7824 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7826 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7828 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7830 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7831 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7832 dwarf2_per_objfile_free here.
7833 (dwarf2_per_objfile_free): Remove.
7834 (_initialize_dwarf2_read): Don't register
7835 dwarf2_per_objfile_free as a registry cleanup.
7837 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7839 Avoid compilation errors in MinGW native builds
7841 The error is triggered by including python-internal.h, and the
7844 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7845 from build-gnulib/import/math.h:27,
7846 from d:/usr/Python26/include/pyport.h:235,
7847 from d:/usr/Python26/include/Python.h:58,
7848 from python/python-internal.h:94,
7849 from python/py-arch.c:24:
7850 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7854 This happens because Python headers define 'hypot' to expand t
7855 '_hypot' in the Windows builds.
7856 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7857 'hypoth'. This avoids a compilation error.
7859 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7861 * MAINTAINERS (Write After Approval): Fix ordering.
7863 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7865 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7867 2018-01-26 Alan Modra <amodra@gmail.com>
7869 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7870 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7871 Remove nop. Make const. Comment.
7872 (powerpc32_plt_stub_so_2): New.
7873 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7874 Correct count. Update uses.
7875 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7876 Move common code reading PLT entry word. Correct
7877 powerpc32_plt_stub PLT address calculation.
7878 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7879 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
7880 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
7881 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
7882 (ppc64_standard_linkage8): Likewise.
7883 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
7884 Correct insns description.
7885 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
7887 2018-01-24 Pedro Alves <palves@redhat.com>
7889 GCC PR libstdc++/83906
7890 * gdbtypes.c (operator==(const dynamic_prop &,
7891 const dynamic_prop &)): New.
7892 (operator==(const range_bounds &, const range_bounds &)): New.
7893 (check_types_equal): Use them instead of memcmp.
7894 * gdbtypes.h (operator==(const dynamic_prop &,
7895 const dynamic_prop &)): Declare.
7896 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
7897 (operator==(const range_bounds &, const range_bounds &)): Declare.
7898 (operator!=(const range_bounds &, const range_bounds &)): Declare.
7900 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7902 * s390-linux-tdep.c (s390_record_address_mask)
7903 (s390_record_calc_disp_common, s390_record_calc_disp)
7904 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7905 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7906 (s390_process_record): Move to s390-tdep.c.
7907 (s390_linux_init_abi_any): Adjust.
7908 * s390-tdep.c (s390_record_address_mask)
7909 (s390_record_calc_disp_common, s390_record_calc_disp)
7910 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7911 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7912 (s390_process_record): Moved from s390-linux-tdep.c
7913 (s390_gdbarch_init): Adjust.
7915 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7917 * s390-linux-nat.c (s390-tdep.h): New include.
7918 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7919 (HFILES_NO_SRCDIR): Add s390-tdep.h.
7920 (ALLDEPFILES): Add s390-tdep.c.
7921 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7922 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7923 * s390-tdep.h: ...this. New file.
7924 * s390-linux-tdep.c (s390-tdep.h): New include.
7925 (_initialize_s390_tdep): Rename to...
7926 (_initialize_s390_linux_tdep): ...this and adjust.
7927 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7928 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7930 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7931 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7932 (s390_is_partial_instruction, s390_software_single_step)
7933 (is_non_branch_ril, s390_displaced_step_copy_insn)
7934 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7935 (s390_prologue_data, s390_addr, s390_store, s390_load)
7936 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7937 (s390_register_call_saved, s390_guess_tracepoint_registers)
7938 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7939 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7940 (s390_pseudo_register_name, s390_pseudo_register_type)
7941 (s390_pseudo_register_read, s390_pseudo_register_write)
7942 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7943 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7944 (s390_addr_bits_remove, s390_address_class_type_flags)
7945 (s390_address_class_type_flags_to_name)
7946 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7947 (s390_function_arg_float, s390_function_arg_vector)
7948 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7949 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7950 (s390_frame_align, s390_register_return_value, s390_return_value)
7951 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7952 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7953 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7954 (s390_trad_frame_prev_register, s390_unwind_cache)
7955 (s390_prologue_frame_unwind_cache)
7956 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7957 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7958 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7959 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7960 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7961 (s390_frame_base_address, s390_local_base_address)
7962 (s390_frame_base, s390_gcc_target_options)
7963 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7964 (s390_validate_reg_range, s390_tdesc_valid)
7965 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7966 * s390-tdep.c: ...this. New file.
7968 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7970 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7971 (s390_process_record, s390_gdbarch_tdep_alloc)
7972 (s390_linux_init_abi_any): Use/set new hook.
7974 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7976 * s390-linux-tdep.c (osabi.h): New include.
7977 (s390_linux_init_abi_31, s390_linux_init_abi_64)
7978 (s390_linux_init_abi_any): New functions.
7979 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7981 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7983 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7984 tdesc_has_registers check
7986 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7988 * s390-linux-tdep.c (s390_tdesc_valid): New function.
7989 (s390_validate_reg_range): New macro.
7990 (s390_gdbarch_init): Adjust.
7992 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7994 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7995 (s390_gdbarch_tdep_alloc): Adjust.
7996 (s390_gdbarch_init): Adjust.
7998 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8000 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8001 <have_tdb>: Change type to bool.
8002 (s390_gdbarch_tdep_alloc): Adjust.
8003 (s390_gdbarch_init): Adjust.
8005 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8007 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8008 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8009 (s390_gdbarch_tdep_alloc): New function.
8010 (s390_gdbarch_init): Allocate tdep at start and use its fields
8011 instead of separate variables.
8013 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8015 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8016 when looking for cached gdbarch and add comment for remaining.
8018 2018-01-22 Pedro Alves <palves@redhat.com>
8019 Sergio Durigan Junior <sergiodj@redhat.com>
8021 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8024 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8026 * MAINTAINERS: Update my company e-mail address.
8028 2018-01-22 Yao Qi <yao.qi@linaro.org>
8030 * regcache.c (cooked_write_test): New function.
8031 (_initialize_regcache): Register the test.
8033 2018-01-22 Yao Qi <yao.qi@linaro.org>
8035 * ia64-tdep.c (ia64_pseudo_register_read): Call
8036 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8037 * m32c-tdep.c (m32c_cat_read): Likewise.
8038 (m32c_r3r2r1r0_read): Likewise.
8039 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8040 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8042 2018-01-22 Yao Qi <yao.qi@linaro.org>
8044 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8045 method raw_read instead of regcache_raw_read.
8046 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8047 * arm-tdep.c (arm_neon_quad_read): Likewise.
8048 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8049 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8050 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8051 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8052 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8053 (i386_pseudo_register_read_into_value): Likewise.
8054 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8055 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8056 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8057 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8058 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8059 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8060 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8061 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8062 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8064 2018-01-22 Yao Qi <yao.qi@linaro.org>
8066 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8067 * configure.tgt: Remove target mt.
8068 * mt-tdep.c: Remove.
8069 * regcache.c (cooked_read_test): Remove the check for mt.
8071 2018-01-22 Yao Qi <yao.qi@linaro.org>
8073 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8074 instead of gdbarch_pseudo_register_read_value.
8076 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8078 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8081 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8083 * linespec.c (create_sals_line_offset): Remove code that preserved
8084 the symtab_and_line's line number.
8086 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8088 * varobj.c (varobj_create): Don't set valid_block when creating a
8091 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8093 * varobj.c (varobj_create): Remove out of date comment.
8095 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8098 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8099 updating innermost block.
8100 * parse.c (innermost_block_tracker::update): Take extra type
8101 parameter, and check types match before updating innermost block.
8102 (write_dollar_variable): Update innermost block for registers.
8103 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8104 (innermost_block_tracker::innermost_block_tracker): Initialise
8106 (innermost_block_tracker::reset): Take type parameter.
8107 (innermost_block_tracker::update): Take type parameter, and pass
8108 type through as needed.
8109 (innermost_block_tracker::m_types): New member.
8110 * varobj.c (varobj_create): Pass type when reseting innermost
8113 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8115 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8116 * ada-lang.c (resolve_subexp): Likewise.
8117 * breakpoint.c (set_breakpoint_condition) Likewise.
8118 (watch_command_1) Likewise.
8119 * c-exp.y (variable): Likewise.
8120 * d-exp.y (PrimaryExpression): Likewise.
8121 * f-exp.y (variable): Likewise.
8122 * go-exp.y (variable): Likewise.
8123 * m2-exp.y (variable): Likewise.
8124 * objfiles.c (objfile::~objfile): Likewise.
8125 * p-exp.y (variable): Likewise.
8126 * parse.c (innermost_block): Change type.
8127 * parser-defs.h (class innermost_block_tracker): New.
8128 (innermost_block): Change to innermost_block_tracker.
8129 * printcmd.c (display_command): Switch to innermost_block API.
8130 (do_one_display): Likewise.
8131 * rust-exp.y (do_one_display): Likewise.
8132 * symfile.c (clear_symtab_users): Likewise.
8133 * varobj.c (varobj_create): Switch to innermost_block API, replace
8134 use of innermost_block with block stored on varobj object.
8136 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8138 * expression.h (innermost_block): Remove declaration.
8139 * varobj.c: Add 'parser-defs.h' include.
8141 2018-01-19 Tom Tromey <tom@tromey.com>
8143 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8144 symbols in the static and global blocks.
8146 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8148 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8149 gdb_ptrace.h, and move including gdb_wait.h ...
8150 * nat/linux-ptrace.h: ... to here.
8152 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8154 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8155 inf_ptrace_detach_success.
8156 (inf_ptrace_detach_success): Add inferior parameter, use it
8157 instead of inferior_ptid, pass it to detach_inferior.
8158 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8160 * inferior.c (detach_inferior): Add overload that takes an
8162 * inferior.h (detach_inferior): Likewise.
8163 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8164 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8165 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8167 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8169 * target.h (struct target_ops) <to_detach>: Add inferior
8171 (target_detach): Likewise.
8172 * target.c (dispose_inferior): Pass inferior down.
8173 (target_detach): Pass inferior down. Assert that it is equal to
8174 the current inferior.
8175 * aix-thread.c (aix_thread_detach): Pass inferior down.
8176 * corefile.c (core_file_command): Pass current_inferior() down.
8177 * corelow.c (core_detach): Add inferior parameter.
8178 * darwin-nat.c (darwin_detach): Likewise.
8179 * gnu-nat.c (gnu_detach): Likewise.
8180 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8181 * infcmd.c (detach_command): Pass current_inferior() down to
8183 * infrun.c (follow_fork_inferior): Pass parent_inf to
8185 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8187 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8188 * linux-thread-db.c (thread_db_detach): Likewise.
8189 * nto-procfs.c (procfs_detach): Likewise.
8190 * procfs.c (procfs_detach): Likewise.
8191 * record.c (record_detach): Likewise.
8192 * record.h (struct inferior): Forward-declare.
8193 (record_detach): Add inferior parameter.
8194 * remote-sim.c (gdbsim_detach): Likewise.
8195 * remote.c (remote_detach_1): Likewise.
8196 (remote_detach): Likewise.
8197 (extended_remote_detach): Likewise.
8198 * sol-thread.c (sol_thread_detach): Likewise.
8199 * target-debug.h (target_debug_print_inferior_p): New macro.
8200 * target-delegates.c: Re-generate.
8201 * top.c (kill_or_detach): Pass inferior down to target_detach.
8202 * windows-nat.c (windows_detach): Add inferior parameter.
8204 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8206 * target.h (struct target_ops) <to_detach>: Remove args
8208 (target_detach): Likewise.
8209 * target.c (dispose_inferior): Adjust.
8210 (target_detach): Remove args parameter, adjust.
8211 * aix-thread.c (aix_thread_detach): Adjust.
8212 * corefile.c (core_file_command): Adjust.
8213 * corelow.c (core_detach): Adjust.
8214 * darwin-nat.c (darwin_detach): Adjust.
8215 * gnu-nat.c (gnu_detach): Adjust.
8216 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8217 * infcmd.c (detach_command): Adjust
8218 * infrun.c (follow_fork_inferior): Adjust.
8219 (handle_vfork_child_exec_or_exit): Adjust.
8220 * linux-fork.c (linux_fork_detach): Remove args parameter.
8221 * linux-fork.h (linux_fork_detach): Likewise.
8222 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8223 * linux-thread-db.c (thread_db_detach): Likewise.
8224 * nto-procfs.c (procfs_detach): Likewise.
8225 * procfs.c (procfs_detach): Likewise.
8226 (do_detach): Remove signo parameter.
8227 * record.c (record_detach): Remove args parameter.
8228 * record.h (record_detach): Likewise.
8229 * remote-sim.c (gdbsim_detach): Likewise.
8230 * remote.c (remote_detach_1): Likewise.
8231 (remote_detach): Likewise.
8232 (extended_remote_detach): Likewise.
8233 * sol-thread.c (sol_thread_detach): Likewise.
8234 * target-delegates.c: Re-generate.
8235 * top.c (struct qt_args) <args>: Remove field.
8236 (kill_or_detach): Don't pass args.
8237 (quit_force): Don't set args.
8238 * windows-nat.c (windows_detach): Remove args parameter.
8240 2018-01-19 Yao Qi <yao.qi@linaro.org>
8242 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8243 (arm_linux_init_abi): Install it.
8245 2018-01-19 Yao Qi <yao.qi@linaro.org>
8247 * osabi.c (gdb_osabi_names): Extend the regexp for
8248 arm-linux-gnueabihf.
8250 2018-01-18 Yao Qi <yao.qi@linaro.org>
8252 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8254 (abbrev_table::add_abbrev): Update.
8255 (abbrev_table::lookup_abbrev): Update.
8257 2018-01-18 Yao Qi <yao.qi@linaro.org>
8259 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8261 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8263 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8266 2018-01-17 Tom Tromey <tom@tromey.com>
8268 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8270 2018-01-17 Tom Tromey <tom@tromey.com>
8272 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8273 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8274 (create_array_type_with_stride): Update.
8275 * dwarf2read.c (set_die_type): Update.
8277 2018-01-17 Tom Tromey <tom@tromey.com>
8279 * dwarf2read.c (delayed_method_info): Remove typedef.
8280 (dwarf2_cu::method_info): Now a std::vector.
8281 (add_to_method_list): Update.
8282 (free_delayed_list): Remove.
8283 (compute_delayed_physnames): Update.
8284 (process_full_comp_unit, process_full_type_unit): Clear the method
8285 list. Remove cleanups.
8286 (psymtab_include_file_name): Add name_holder parameter. Use
8288 (dwarf_decode_lines): Update.
8290 2018-01-17 Tom Tromey <tom@tromey.com>
8291 Simon Marchi <simon.marchi@ericsson.com>
8293 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8294 (dwarf2_per_objfile::free_cached_comp_units)
8295 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8296 (init_cutu_and_read_dies_no_follow): Update.
8297 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8298 (dwarf2_cu::~dwarf2_cu): New.
8299 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8300 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8302 2018-01-17 Tom Tromey <tom@tromey.com>
8303 Simon Marchi <simon.marchi@ericsson.com>
8305 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8306 (struct die_reader_specs) <abbrev_table>: New member.
8307 (struct abbrev_table): Add constructor.
8308 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8309 <abbrev_obstack>: Now an auto_obstack.
8310 (abbrev_table_up): New typedef.
8311 (init_cu_die_reader): Add abbrev_table parameter.
8312 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8313 Add result_dwo_abbrev_table.
8314 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8315 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8317 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8319 (skip_children): Update.
8320 (abbrev_table::alloc_abbrev): Rename from
8321 abbrev_table_alloc_abbrev.
8322 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8323 (abbrev_table::lookup_abbrev): Rename from
8324 abbrev_table_lookup_abbrev.
8325 (abbrev_table_read_table): Return abbrev_table_up.
8326 (abbrev_table_free, abbrev_table_free_cleanup)
8327 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8328 (load_partial_dies): Update.
8330 2018-01-17 Tom Tromey <tom@tromey.com>
8332 * dwarf2read.c (dwarf2_compute_name): Update comment.
8333 (read_func_scope, read_variable): Update.
8334 (new_symbol): Remove.
8335 (new_symbol_full): Rename to new_symbol.
8337 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8340 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8341 a warning instead of throwing an error, set section size to 0 and return
8343 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8345 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8347 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8349 (linux_ptrace_attach_fail_reason_string): Likewise.
8350 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8352 (linux_ptrace_attach_fail_reason_string): Likewise.
8353 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8355 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8357 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8359 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8362 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8363 checking for fs_base/gs_base fields in struct user_regs_struct.
8364 * configure: Regenerate.
8366 2018-01-17 Yao Qi <yao.qi@linaro.org>
8368 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8370 (aarch64_linux_init_abi): Install it to gdbarch hook
8373 2018-01-15 Pedro Alves <palves@redhat.com>
8375 * common/signals-state-save-restore.c
8376 (save_original_signals_state): Fix typos.
8378 2017-01-12 Tom Tromey <tom@tromey.com>
8379 Sergio Durigan Junior <sergiodj@redhat.com>
8381 * Makefile.in (install-only): Install gdb-add-index.
8383 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8385 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8387 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8389 * infrun.c (keep_going_pass_signal): Clear step-over info when
8390 insert_breakpoints fails.
8392 2018-01-11 Pedro Alves <palves@redhat.com>
8395 * infrun.c (resume): Rename to ...
8396 (resume_1): ... this.
8397 (resume): Reimplement as wrapper around resume_1.
8399 2018-01-11 Pedro Alves <palves@redhat.com>
8402 * remote.c (remote_parse_stop_reply): Default to the last-set
8403 general thread instead of to 'magic_null_ptid'.
8405 2018-01-10 Pedro Alves <palves@redhat.com>
8407 * language.h (language_get_symbol_name_matcher): Rename ...
8408 (get_symbol_name_matcher): ... this.
8409 * language.c (language_get_symbol_name_matcher): Ditto.
8410 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8413 2018-01-10 Pedro Alves <palves@redhat.com>
8417 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8418 Adjust to use language_get_symbol_name_matcher instead of
8419 language_defn::la_get_symbol_name_matcher.
8420 * language.c (language_get_symbol_name_matcher): If in Ada mode
8421 and the lookup name is a verbatim match, return Ada's matcher.
8422 * language.h (language_get_symbol_name_matcher): Adjust comment.
8423 (ada_lookup_name_info::verbatim_p):: New method.
8425 2018-01-10 Pedro Alves <palves@redhat.com>
8428 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8429 minsym's language is language_auto or language_cplus, pass down
8430 language_ada instead.
8431 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8433 2018-01-10 Pedro Alves <palves@redhat.com>
8436 * minsyms.c (linkage_name_str): New function.
8437 (iterate_over_minimal_symbols): Use it.
8439 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8441 * NEWS: Document that 'info proc' now works on FreeBSD.
8443 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8445 * configure.ac: Check for kinfo_getfile in libutil.
8446 * configure: Regenerate.
8447 * config.in: Regenerate.
8448 * fbsd-nat.c: Include "fbsd-tdep.h".
8449 (fbsd_fetch_cmdline): New.
8450 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8451 rather than calling error.
8452 (fbsd_info_proc): New.
8453 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8454 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8455 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8457 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8459 * fbsd-nat.c (struct free_deleter): Remove.
8460 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8462 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8464 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8465 NULL for an empty pathname.
8467 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8469 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8470 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8471 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8472 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8473 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8474 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8475 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8476 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8477 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8478 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8479 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8480 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8481 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8482 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8483 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8485 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8487 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8488 (gnu_xfer_auxv): New function.
8489 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8492 2018-01-08 Yao Qi <yao.qi@linaro.org>
8493 Simon Marchi <simon.marchi@ericsson.com>
8495 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8497 (COMMON_OBS): Remove selftest.o.
8498 * configure.ac: Append selftest-arch.c and common/selftest.c to
8499 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8500 * configure: Re-generated.
8501 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8503 (maintenance_info_selftests): Likewise.
8505 2018-01-08 Xavier Roirand <roirand@adacore.com>
8507 * ada-valprint.c (val_print_packed_array_elements): Use
8508 proper number of elements when printing an array indexed
8509 by an enumeration type.
8511 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8513 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8514 (dw2_get_file_names_reader): Adjust.
8515 (lookup_dwo_signatured_type): Adjust.
8516 (lookup_dwp_signatured_type): Adjust.
8517 (lookup_signatured_type): Adjust.
8518 (create_type_unit_group): Adjust.
8519 (get_type_unit_group): Adjust.
8520 (process_psymtab_comp_unit_reader): Adjust.
8521 (build_type_psymtabs_reader): Adjust.
8522 (scan_partial_symbols): Adjust.
8523 (add_partial_symbol): Adjust.
8524 (add_partial_subprogram): Adjust.
8525 (peek_die_abbrev): Adjust.
8526 (fixup_go_packaging): Adjust.
8527 (process_imported_unit_die): Adjust.
8528 (dwarf2_compute_name): Adjust.
8529 (dwarf2_physname): Adjust.
8530 (read_import_statement): Adjust.
8531 (handle_DW_AT_stmt_list): Adjust.
8532 (read_file_scope): Adjust.
8533 (read_func_scope): Adjust.
8534 (read_lexical_block_scope): Adjust.
8535 (read_call_site_scope): Adjust.
8536 (read_variable): Adjust.
8537 (dwarf2_rnglists_process): Adjust.
8538 (dwarf2_ranges_process): Adjust.
8539 (dwarf2_ranges_read): Adjust.
8540 (dwarf2_get_pc_bounds): Adjust.
8541 (dwarf2_record_block_ranges): Adjust.
8542 (dwarf2_add_field): Adjust.
8543 (dwarf2_add_member_fn): Adjust.
8544 (read_structure_type): Adjust.
8545 (process_structure_scope): Adjust.
8546 (read_enumeration_type): Adjust.
8547 (read_array_type): Adjust.
8548 (mark_common_block_symbol_computed): Adjust.
8549 (read_common_block): Adjust.
8550 (read_namespace_type): Adjust.
8551 (read_namespace): Adjust.
8552 (read_module_type): Adjust.
8553 (read_tag_pointer_type): Adjust.
8554 (read_tag_ptr_to_member_type): Adjust.
8555 (read_tag_string_type): Adjust.
8556 (read_subroutine_type): Adjust.
8557 (read_typedef): Adjust.
8558 (read_base_type): Adjust.
8559 (attr_to_dynamic_prop): Adjust.
8560 (read_subrange_type): Adjust.
8561 (read_unspecified_type): Adjust.
8562 (dwarf2_read_abbrevs): Adjust.
8563 (load_partial_dies): Adjust.
8564 (read_partial_die): Adjust.
8565 (find_partial_die): Adjust.
8566 (guess_partial_die_structure_name): Adjust.
8567 (fixup_partial_die): Adjust.
8568 (read_attribute_value): Adjust.
8569 (read_addr_index): Adjust.
8570 (read_addr_index_from_leb128): Adjust.
8571 (read_str_index): Adjust.
8572 (dwarf2_string_attr): Adjust.
8573 (get_debug_line_section): Adjust.
8574 (dwarf_decode_line_header): Adjust.
8575 (lnp_state_machine::check_line_address): Adjust.
8576 (dwarf_decode_lines_1): Adjust.
8577 (dwarf_decode_lines): Adjust.
8578 (dwarf2_start_symtab): Adjust.
8579 (var_decode_location): Adjust.
8580 (new_symbol_full): Adjust.
8581 (dwarf2_const_value_data): Adjust.
8582 (dwarf2_const_value_attr): Adjust.
8583 (dwarf2_const_value): Adjust.
8585 (die_containing_type): Adjust.
8586 (build_error_marker_type): Adjust.
8587 (lookup_die_type): Adjust.
8588 (guess_full_die_structure_name): Adjust.
8589 (anonymous_struct_prefix): Adjust.
8590 (determine_prefix): Adjust.
8591 (dwarf2_name): Adjust.
8592 (follow_die_ref_or_sig): Adjust.
8593 (follow_die_offset): Adjust.
8594 (follow_die_ref): Adjust.
8595 (follow_die_sig_1): Adjust.
8596 (follow_die_sig): Adjust.
8597 (get_signatured_type): Adjust.
8598 (get_DW_AT_signature_type): Adjust.
8599 (decode_locdesc): Adjust.
8600 (dwarf_decode_macros): Adjust.
8601 (cu_debug_loc_section): Adjust.
8602 (fill_in_loclist_baton): Adjust.
8603 (dwarf2_symbol_mark_computed): Adjust.
8604 (init_one_comp_unit): Don't assign
8605 dwarf2_cu::dwarf2_per_objfile.
8606 (set_die_type): Adjust.
8608 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8610 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8611 <dwarf2_per_objfile>: New field.
8612 (dwarf2_per_objfile): Remove global.
8613 (get_dwarf2_per_objfile): New function.
8614 (set_dwarf2_per_objfile): New function.
8615 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8617 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8618 (read_abbrev_offset): Likewise.
8619 (read_indirect_string): Likewise.
8620 (read_indirect_line_string): Likewise.
8621 (read_indirect_string_at_offset): Likewise.
8622 (read_indirect_string_from_dwz): Likewise.
8623 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8625 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8626 (create_all_comp_units): Change objfile parameter to
8628 (create_all_type_units): Likewise.
8629 (process_queue): Add dwarf2_per_objfile parameter.
8630 (read_and_check_comp_unit_head): Likewise.
8631 (lookup_dwo_unit_in_dwp): Likewise.
8632 (get_dwp_file): Likewise.
8633 (process_cu_includes): Likewise.
8634 (struct free_dwo_file_cleanup_data): New struct.
8635 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8636 set_dwarf2_per_objfile.
8637 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8638 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8639 context, adjust calls.
8640 (dw2_instantiate_symtab): Likewise.
8641 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8642 (dw2_get_cu): Likewise.
8643 (create_cu_from_index_list): Change objfile parameter to
8645 (create_cus_from_index_list): Get dwarf2_per_objfile from
8646 context, adjust calls.
8647 (create_cus_from_index): Likewise.
8648 (create_signatured_type_table_from_index): Change objfile
8649 parameter to dwarf2_per_objfile.
8650 (create_signatured_type_table_from_debug_names): Change objfile
8651 parameter to dwarf2_per_objfile.
8652 (create_addrmap_from_index): Likewise.
8653 (create_addrmap_from_aranges): Likewise.
8654 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8655 (dw2_setup): Remove.
8656 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8658 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8659 get_dwarf2_per_objfile.
8660 (dw2_forget_cached_source_info): Likewise.
8661 (dw2_map_symtabs_matching_filename): Likewise.
8662 (struct dw2_symtab_iterator) <index>: Remove.
8663 <dwarf2_per_objfile>: New field.
8664 (dw2_symtab_iter_init): Replace index parameter with
8666 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8667 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8668 (dw2_print_stats): Likewise.
8669 (dw2_dump): Likewise.
8670 (dw2_expand_symtabs_for_function): Likewise.
8671 (dw2_expand_all_symtabs): Likewise.
8672 (dw2_expand_symtabs_with_fullname): Likewise.
8673 (dw2_expand_marked_cus): Replace index and objfile parameters
8674 with dwarf2_per_objfile.
8675 (dw_expand_symtabs_matching_file_matcher): Add
8676 dwarf2_per_objfile parameter and adjust calls.
8677 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8679 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8680 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8682 (create_cus_from_debug_names_list): Replace objfile parameter
8683 with dwarf2_per_objfile and adjust calls.
8684 (create_cus_from_debug_names): Likewise.
8685 (dwarf2_read_debug_names): Likewise.
8686 (mapped_debug_names::namei_to_name): Adjust call.
8687 (dw2_debug_names_iterator::next): Likewise.
8688 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8689 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8690 (dw2_debug_names_dump): Likewise.
8691 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8692 (dw2_debug_names_expand_symtabs_matching): Likewise.
8693 (dwarf2_initialize_objfile): Likewise.
8694 (dwarf2_build_psymtabs): Likewise.
8695 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8697 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8698 (read_and_check_comp_unit_head): Likewise.
8699 (read_abbrev_offset): Likewise.
8700 (create_debug_type_hash_table): Likewise.
8701 (create_debug_types_hash_table): Likewise.
8702 (create_all_type_units): Replace objfile parameter with
8704 (add_type_unit): Add dwarf2_per_objfile parameter.
8705 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8706 with dwarf2_per_objfile.
8707 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8708 (lookup_dwp_signatured_type): Likewise.
8709 (lookup_signatured_type): Likewise.
8710 (read_cutu_die_from_dwo): Likewise.
8711 (init_tu_and_read_dwo_dies): Likewise.
8712 (init_cutu_and_read_dies): Likewise.
8713 (init_cutu_and_read_dies_no_follow): Likewise.
8714 (allocate_type_unit_groups_table): Add objfile parameter.
8715 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8716 (get_type_unit_group): Likewise.
8717 (process_psymtab_comp_unit): Update call.
8718 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8719 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8720 (print_tu_stats): Likewise.
8721 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8723 (build_type_psymtabs): Change objfile parameter to
8725 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8726 passed in void* parameter.
8727 (process_skeletonless_type_units): Change objfile parameter to
8729 (set_partial_user): Likewise.
8730 (dwarf2_build_psymtabs_hard): Likewise.
8731 (read_comp_units_from_section): Likewise.
8732 (create_all_comp_units): Likewise.
8733 (scan_partial_symbols): Update calls.
8734 (add_partial_symbol): Likewise.
8735 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8736 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8737 (process_queue): Add dwarf2_per_objfile parameter.
8738 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8739 (compute_compunit_symtab_includes): Likewise.
8740 (process_cu_includes): Add dwarf2_per_objfile parameter.
8741 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8742 (process_full_type_unit): Likewise.
8743 (process_imported_unit_die): Update call.
8744 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8745 (read_file_scope): Likewise.
8746 (allocate_dwo_file_hash_table): Add objfile parameter.
8747 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8748 (create_cus_hash_table): Likewise.
8749 (create_dwp_hash_table): Likewise.
8750 (create_dwo_unit_in_dwp_v1): Likewise.
8751 (create_dwp_v2_section): Likewise.
8752 (create_dwo_unit_in_dwp_v2): Likewise.
8753 (lookup_dwo_unit_in_dwp): Likewise.
8754 (try_open_dwop_file): Likewise.
8755 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8756 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8757 cleanup to include a reference to dwarf2_per_objfile.
8758 (open_dwp_file): Add dwarf2_per_objfile parameter.
8759 (open_and_init_dwp_file): Likewise.
8760 (get_dwp_file): Likewise.
8761 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8762 (queue_and_load_all_dwo_tus): Update call.
8763 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8765 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8766 (dwarf2_ranges_process): Likewise.
8767 (dwarf2_get_pc_bounds): Likewise.
8768 (mark_common_block_symbol_computed): Likewise.
8769 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8770 (dwarf2_read_abbrevs): Update call.
8771 (read_partial_die): Use dwarf2_per_objfile from cu.
8772 (find_partial_die): Likewise.
8773 (fixup_partial_die): Likewise.
8774 (read_attribute_value): Likewise.
8775 (read_indirect_string_at_offset_from): Add objfile parameter.
8776 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8778 (read_indirect_string_from_dwz): Add objfile parameter.
8779 (read_indirect_string): Add objfile parameter.
8780 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8781 (read_addr_index): Use dwarf2_per_objfile from cu.
8782 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8784 (read_str_index): Use dwarf2_per_objfile from cu.
8785 (get_debug_line_section): Likewise.
8786 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8787 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8788 (new_symbol_full): Use dwarf2_per_objfile from cu.
8789 (build_error_marker_type): Likewise.
8790 (lookup_die_type): Likewise.
8791 (determine_prefix): Likewise.
8792 (follow_die_offset): Likewise.
8793 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8794 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8795 (dwarf2_fetch_die_type_sect_off): Likewise.
8796 (dwarf2_get_die_type): Likewise.
8797 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8798 (get_signatured_type): Likewise.
8799 (get_DW_AT_signature_type): Likewise.
8800 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8801 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8802 (cu_debug_loc_section): Likewise.
8803 (fill_in_loclist_baton): Likewise.
8804 (dwarf2_symbol_mark_computed): Likewise.
8805 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8807 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8809 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8810 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8811 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8812 (set_die_type): Use dwarf2_free_objfile from cu.
8813 (get_die_type_at_offset): Likewise.
8814 (dwarf2_per_objfile_free): Don't assign global variable.
8815 (debug_names) <constructor>: Add dwarf2_per_objfile
8816 parameter, update m_debugstrlookup construction.
8817 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8819 <m_dwarf2_per_objfile>: New field.
8820 <lookup>: Use m_dwarf2_per_objfile.
8821 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8822 (psyms_seen_size): Likewise.
8823 (write_gdbindex): Replace objfile parameter with
8825 (write_debug_names): Likewise.
8826 (write_psymtabs_to_index): Likewise.
8827 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8830 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8832 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8833 <dwarf2_per_objfile>: New field.
8834 (struct dwarf2_per_cu_data) <objfile>: Remove.
8835 <dwarf2_per_objfile>: New field.
8836 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8838 (create_signatured_type_table_from_index): Likewise.
8839 (create_debug_type_hash_table): Likewise.
8840 (fill_in_sig_entry_from_dwo_entry): Likewise.
8841 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8842 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8844 (create_partial_symtab): Access objfile through
8846 (process_psymtab_comp_unit_reader): Likewise.
8847 (read_comp_units_from_section): Likewise.
8848 (scan_partial_symbols): Likewise.
8849 (add_partial_symbol): Likewise.
8850 (add_partial_subprogram): Likewise.
8851 (peek_die_abbrev): Likewise.
8852 (fixup_go_packaging): Likewise.
8853 (process_full_comp_unit): Likewise.
8854 (process_full_type_unit): Likewise.
8855 (process_imported_unit_die): Likewise.
8856 (dwarf2_compute_name): Likewise.
8857 (dwarf2_physname): Likewise.
8858 (read_import_statement): Likewise.
8859 (create_cus_hash_table): Assign dwarf2_physname instead of
8861 (read_func_scope): Access objfile through dwarf2_per_objfile.
8862 (read_lexical_block_scope): Likewise.
8863 (read_call_site_scope): Likewise.
8864 (read_variable): Likewise.
8865 (dwarf2_rnglists_process): Likewise.
8866 (dwarf2_ranges_process): Likewise.
8867 (dwarf2_ranges_read): Likewise.
8868 (dwarf2_record_block_ranges): Likewise.
8869 (dwarf2_add_field): Likewise.
8870 (dwarf2_add_member_fn): Likewise.
8871 (read_structure_type): Likewise.
8872 (process_structure_scope): Likewise.
8873 (read_enumeration_type): Likewise.
8874 (read_array_type): Likewise.
8875 (read_common_block): Likewise.
8876 (read_namespace_type): Likewise.
8877 (read_namespace): Likewise.
8878 (read_module_type): Likewise.
8879 (read_tag_pointer_type): Likewise.
8880 (read_tag_ptr_to_member_type): Likewise.
8881 (read_tag_string_type): Likewise.
8882 (read_subroutine_type): Likewise.
8883 (read_typedef): Likewise.
8884 (read_base_type): Likewise.
8885 (attr_to_dynamic_prop): Likewise.
8886 (read_subrange_type): Likewise.
8887 (read_unspecified_type): Likewise.
8888 (load_partial_dies): Likewise.
8889 (read_partial_die): Likewise.
8890 (find_partial_die): Likewise.
8891 (guess_partial_die_structure_name): Likewise.
8892 (fixup_partial_die): Likewise.
8893 (read_attribute_value): Likewise.
8894 (read_addr_index_from_leb128): Likewise.
8895 (dwarf2_read_addr_index): Likewise.
8896 (dwarf2_string_attr): Likewise.
8897 (lnp_state_machine::check_line_address): Likewise.
8898 (dwarf_decode_lines_1): Likewise.
8899 (dwarf_decode_lines): Likewise.
8900 (dwarf2_start_symtab): Likewise.
8901 (var_decode_location): Likewise.
8902 (new_symbol_full): Likewise.
8903 (dwarf2_const_value_data): Likewise.
8904 (dwarf2_const_value_attr): Likewise.
8905 (dwarf2_const_value): Likewise.
8906 (die_type): Likewise.
8907 (die_containing_type): Likewise.
8908 (lookup_die_type): Likewise.
8909 (guess_full_die_structure_name): Likewise.
8910 (anonymous_struct_prefix): Likewise.
8911 (dwarf2_name): Likewise.
8912 (follow_die_ref_or_sig): Likewise.
8913 (follow_die_offset): Likewise.
8914 (follow_die_ref): Likewise.
8915 (dwarf2_fetch_die_loc_sect_off): Likewise.
8916 (dwarf2_fetch_constant_bytes): Likewise.
8917 (dwarf2_fetch_die_type_sect_off): Likewise.
8918 (dwarf2_get_die_type): Likewise.
8919 (follow_die_sig): Likewise.
8920 (decode_locdesc): Likewise.
8921 (dwarf2_per_cu_objfile): Likewise.
8922 (dwarf2_per_cu_text_offset): Likewise.
8923 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8925 (set_die_type): Access objfile through
8928 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8930 * valprint.c (converted_character_d): Remove typedef.
8931 (DEF_VEC_O (converted_character_d)): Remove.
8932 (count_next_character): Use std::vector.
8933 (print_converted_chars_to_obstack): Likewise.
8934 (generic_printstr): Likewise.
8936 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8938 * xml-support.h (struct gdb_xml_value): Add constructor.
8939 <value>: Change type to unique_xmalloc_ptr.
8940 (gdb_xml_value_s): Remove typedef.
8941 (DEF_VEC_O (gdb_xml_value_s)): Remove.
8942 (gdb_xml_element_start_handler): Change parameter type to
8944 (xml_find_attribute): Likewise.
8945 * xml-support.c (xml_find_attribute): Change parameter type to
8946 std::vector and adjust.
8947 (gdb_xml_values_cleanup): Remove.
8948 (gdb_xml_parser::start_element): Adjust to std::vector.
8949 (xinclude_start_include): Change paraeter type to std::vector
8951 * btrace.c (check_xml_btrace_version): Likewise.
8952 (parse_xml_btrace_block): Likewise.
8953 (parse_xml_btrace_pt_config_cpu): Likewise.
8954 (parse_xml_btrace_pt): Likewise.
8955 (parse_xml_btrace_conf_bts): Likewise.
8956 (parse_xml_btrace_conf_pt): Likewise.
8957 * memory-map.c (memory_map_start_memory): Likewise.
8958 (memory_map_start_property): Likewise.
8959 * osdata.c (osdata_start_osdata): Likewise.
8960 (osdata_start_item): Likewise.
8961 (osdata_start_column): Likewise.
8962 * remote.c (start_thread): Likewise.
8963 * solib-aix.c (library_list_start_library): Likewise.
8964 (library_list_start_list): Likewise.
8965 * solib-svr4.c (library_list_start_library): Likewise.
8966 (svr4_library_list_start_list): Likewise.
8967 * solib-target.c (library_list_start_segment): Likewise.
8968 (library_list_start_section): Likewise.
8969 (library_list_start_library): Likewise.
8970 (library_list_start_list): Likewise.
8971 * tracepoint.c (traceframe_info_start_memory): Likewise.
8972 (traceframe_info_start_tvar): Likewise.
8973 * xml-syscall.c (syscall_start_syscall): Likewise.
8974 * xml-tdesc.c (tdesc_start_target): Likewise.
8975 (tdesc_start_feature): Likewise.
8976 (tdesc_start_reg): Likewise.
8977 (tdesc_start_union): Likewise.
8978 (tdesc_start_struct): Likewise.
8979 (tdesc_start_flags): Likewise.
8980 (tdesc_start_enum): Likewise.
8981 (tdesc_start_field): Likewise.
8982 (tdesc_start_enum_value): Likewise.
8983 (tdesc_start_vector): Likewise.
8985 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8987 * extension.h (struct xmethod_worker) <clone>: Remove.
8988 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8990 (python_xmethod_worker::clone): Remove.
8991 * valops.c (find_overload_match): Use std::move instead of
8994 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8996 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8997 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8998 <free_xmethod_worker_data>: Remove.
8999 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9000 <get_xmethod_arg_types>: Remove.
9001 <get_xmethod_result_type>: Remove.
9002 <invoke_xmethod>: Remove.
9003 * extension.c (new_xmethod_worker): Remove.
9004 (clone_xmethod_worker): Remove.
9005 (get_matching_xmethod_workers): Return void, pass std::vector by
9007 (get_xmethod_arg_types): Rename to...
9008 (xmethod_worker::get_arg_types): ... this, and adjust.
9009 (get_xmethod_result_type): Rename to...
9010 (xmethod_worker::get_result_type): ... this, and adjust.
9011 (invoke_xmethod): Remove.
9012 (free_xmethod_worker): Remove.
9013 (free_xmethod_worker_vec): Remove.
9014 * extension.h (enum ext_lang_rc): Move here from
9016 (struct xmethod_worker): Add constructor and destructor.
9019 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9020 virtual pure methods.
9021 <get_arg_types, get_result_type>: New methods.
9022 (xmethod_worker_ptr): Remove typedef.
9023 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9024 (xmethod_worker_vec): Remove typedef.
9025 (xmethod_worker_up): New typedef.
9026 (invoke_xmethod): Remove.
9027 (clone_xmethod_worker): Remove.
9028 (free_xmethod_worker): Remove.
9029 (free_xmethod_worker_vec): Remove.
9030 (get_xmethod_arg_types): Remove.
9031 (get_xmethod_result_type): Remove.
9032 * valops.c (find_method_list): Use std::vector, don't use
9033 intermediate vector.
9034 (value_find_oload_method_list): Use std::vector.
9035 (find_overload_match): Use std::vector.
9036 (find_oload_champ): Use std::vector.
9037 * value.c (value_free): Use operator delete.
9038 (value_of_xmethod): Rename to...
9039 (value_from_xmethod): ... this. Don't assign
9040 xmethod_worker::value, take rvalue-reference.
9041 (result_type_of_xmethod): Adjust.
9042 (call_xmethod): Adjust.
9043 * value.h: Include extension.h.
9044 (struct xmethod_worker): Don't forward-declare.
9045 (value_of_xmethod): Rename to...
9046 (value_from_xmethod): ... this, take rvalue-reference.
9047 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9048 (struct python_xmethod_worker): ... this, add constructor and
9050 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9051 (gdbpy_free_xmethod_worker_data): Rename to...
9052 (python_xmethod_worker::~python_xmethod_worker): ... this and
9054 (gdbpy_clone_xmethod_worker_data): Rename to...
9055 (python_xmethod_worker::clone): ... this and adjust.
9056 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9058 (gdbpy_get_xmethod_arg_types): Rename to...
9059 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9060 (gdbpy_get_xmethod_result_type): Rename to...
9061 (python_xmethod_worker::do_get_result_type): ... this and
9063 (gdbpy_invoke_xmethod): Rename to...
9064 (python_xmethod_worker::invoke): ... this and adjust.
9065 (new_python_xmethod_worker): Rename to...
9066 (python_xmethod_worker::python_xmethod_worker): ... this and
9068 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9070 (gdbpy_free_xmethod_worker_data): Remove.
9071 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9072 (gdbpy_get_xmethod_arg_types): Remove.
9073 (gdbpy_get_xmethod_result_type): Remove.
9074 (gdbpy_invoke_xmethod): Remove.
9075 * python/python.c (python_extension_ops): Remove obsolete
9078 2018-01-05 Pedro Alves <palves@redhat.com>
9081 * common/signals-state-save-restore.c
9082 (save_original_signals_state): New parameter 'quiet'. Warn if we
9083 find a custom handler preinstalled, instead of internal erroring.
9084 But only warn if !quiet.
9085 * common/signals-state-save-restore.h
9086 (save_original_signals_state): New parameter 'quiet'.
9087 * main.c (captured_main_1): Move save_original_signals_state call
9088 after option handling, and pass QUIET.
9090 2018-01-05 Pedro Alves <palves@redhat.com>
9092 * spu-tdep.c (spu_catch_start): Pass
9093 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9095 2018-01-05 Pedro Alves <palves@redhat.com>
9098 * ada-lang.c (literal_symbol_name_matcher): New function.
9099 (ada_get_symbol_name_matcher): Use it for
9100 symbol_name_match_type::SEARCH_NAME.
9101 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9102 it down instead of assuming symbol_name_match_type::FULL.
9103 * block.h (block_lookup_symbol): New parameter 'match_type'.
9104 * c-valprint.c (print_unpacked_pointer): Use
9105 lookup_symbol_search_name instead of lookup_symbol.
9106 * compile/compile-object-load.c (get_out_value_type): Pass down
9107 symbol_name_match_type::SEARCH_NAME.
9108 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9109 symbol_name_match_type::FULL.
9110 * cp-support.c (cp_get_symbol_name_matcher): Handle
9111 symbol_name_match_type::SEARCH_NAME.
9112 * infrun.c (insert_exception_resume_breakpoint): Use
9113 lookup_symbol_search_name.
9114 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9115 * psymtab.c (maintenance_check_psymtabs): Use
9116 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9117 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9119 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9120 if symbol_name_match_type::SEARCH_NAME.
9121 (lookup_symbol_in_language): Pass down
9122 symbol_name_match_type::FULL.
9123 (lookup_symbol_search_name): New.
9124 (lookup_language_this): Pass down
9125 symbol_name_match_type::SEARCH_NAME.
9126 (lookup_symbol_aux, lookup_local_symbol): New parameter
9127 'match_type'. Pass it down.
9128 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9129 (lookup_symbol_search_name): New declaration.
9130 (lookup_symbol_in_block): New 'match_type' parameter.
9132 2018-01-05 Pedro Alves <palves@redhat.com>
9135 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9137 (ada_lookup_symbol): Reimplement in terms of
9138 ada_lookup_symbol_list, bits factored out from
9139 ada_lookup_encoded_symbol.
9141 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9143 * ada-exp.y (write_object_renaming): When subscripting an array
9144 using a symbol as the index, pass the block in call to
9145 ada_lookup_encoded_symbol when looking that symbol up.
9147 2018-01-05 Jerome Guitton <guitton@adacore.com>
9149 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9152 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9154 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9155 the case where VALUE_LVAL (val0) is not lval_memory.
9157 2018-01-05 Xavier Roirand <roirand@adacore.com>
9159 * ada-valprint.c (print_optional_low_bound): Handle
9160 character-indexed array printing like boolean-indexed array
9163 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9165 * NEWS: Create a new section for the next release branch.
9166 Rename the section of the current branch, now that it has
9169 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9171 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9172 * version.in: Bump version to 8.1.50.DATE-git.
9174 2018-01-03 Xavier Roirand <roirand@adacore.com>
9176 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9178 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9180 (default_exception_support_info) <catch_handlers_sym>: Add field.
9181 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9182 (ada_exception_name_addr_1): Add "catch handlers" handling.
9183 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9185 (create_excep_cond_exprs) <ex>: Add parameter.
9186 (re_set_exception): Update create_excep_cond_exprs call.
9187 (print_it_exception, print_one_exception, print_mention_exception)
9188 (print_recreate_exception): Add "catch handler" handling.
9189 (allocate_location_catch_handlers, re_set_catch_handlers)
9190 (check_status_catch_handlers, print_it_catch_handlers)
9191 (print_one_catch_handlers, print_mention_catch_handlers)
9192 (print_recreate_catch_handlers): New function.
9193 (catch_handlers_breakpoint_ops): New variable.
9194 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9195 Add parameter. Add "catch handler" handling.
9196 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9197 Add "catch handler" handling.
9198 (ada_exception_catchpoint_cond_string): Add "catch handler"
9200 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9202 (catch_ada_handlers_command): New function.
9203 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9204 operations structure.
9205 (_initialize_ada_language): Add "catch handlers" command entry.
9206 * NEWS: Document "catch handlers" feature.
9208 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9210 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9211 account when creating the array type of the slice.
9212 (ada_value_slice): Likewise.
9214 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9216 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9218 (create_array_type_with_stride): Add byte_stride_prop parameter.
9219 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9220 New parameter. Update all callers in this file.
9221 (array_type_has_dynamic_stride): New function.
9222 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9223 of arrays with dynamic byte strides.
9224 * dwarf2read.c (read_array_type): Add support for dynamic
9225 DW_AT_byte_stride attributes.
9227 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9229 * dwarf2read.c (read_unspecified_type): Treat
9230 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9232 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9234 Update copyright year range in all GDB files.
9236 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9238 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9239 and gdb/testsuite/gdb.base/step-line.c.
9241 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9243 * copyright.py (main): Dump the contents of
9244 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9245 even if BY_HAND is empty.
9247 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9249 * top.c (print_gdb_version): Update Copyright year in version
9252 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9254 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9256 For older changes see ChangeLog-2017.
9262 version-control: never