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