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