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