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