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