Remove a cleanup from remote.c
[external/binutils.git] / gdb / ChangeLog
1 2018-05-04  Tom Tromey  <tom@tromey.com>
2
3         * remote.c (remote_query_supported_append): Change type.
4         (remote_check_symbols): Update.
5
6 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7
8         PR gdb/11420
9         * configure.ac: Prepend libpython.
10         * python/python-config.py: Likewise.
11         * configure: Regenerate.
12
13 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
14
15         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
16
17 2018-05-03  Pedro Alves  <palves@redhat.com>
18
19         * s390-linux-nat.c
20         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
21         override.  Write 'true' instead of '1'.
22         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
23         declaration.
24
25 2018-05-02  Pedro Alves  <palves@redhat.com>
26
27         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
28         add_inf_child_target.
29         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
30         add_inf_child_target.
31         * aix-thread.c (aix_thread_target_info): New.
32         (aix_thread_target) <shortname, longname, doc>: Delete.
33         <info>: New.
34         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
35         add_inf_child_target.
36         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
37         add_inf_child_target.
38         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
39         add_inf_child_target.
40         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
41         add_inf_child_target.
42         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
43         add_inf_child_target.
44         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
45         add_inf_child_target.
46         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
47         add_inf_child_target.
48         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
49         add_inf_child_target.
50         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
51         add_inf_child_target.
52         * bfd-target.c (target_bfd_target_info): New.
53         (target_bfd) <shortname, longname, doc>: Delete.
54         <info>: New.
55         * bsd-kvm.c (bsd_kvm_target_info): New.
56         (bsd_kvm_target) <shortname, longname, doc>: Delete.
57         <info>: New.
58         (bsd_kvm_target::open): Rename to ...
59         (bsd_kvm_target_open): ... this.  Adjust.
60         * bsd-uthread.c (bsd_uthread_target_info): New.
61         (bsd_uthread_target) <shortname, longname, doc>: Delete.
62         <info>: New.
63         * corefile.c (core_file_command): Adjust.
64         * corelow.c (core_target_info): New.
65         (core_target) <shortname, longname, doc>: Delete.
66         <info>: New.
67         (core_target::open): Rename to ...
68         (core_target_open): ... this.  Adjust.
69         * ctf.c (ctf_target_info): New.
70         (ctf_target) <shortname, longname, doc>: Delete.
71         <info>: New.
72         (ctf_target::open): Rename to ...
73         (ctf_target_open): ... this.
74         (_initialize_ctf): Adjust.
75         * exec.c (exec_target_info): New.
76         (exec_target) <shortname, longname, doc>: Delete.
77         <info>: New.
78         (exec_target::open): Rename to ...
79         (exec_target_open): ... this.
80         * gdbcore.h (core_target_open): Declare.
81         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
82         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
83         add_inf_child_target.
84         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
85         add_inf_child_target.
86         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
87         add_inf_child_target.
88         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
89         add_inf_child_target.
90         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
91         add_inf_child_target.
92         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
93         add_inf_child_target.
94         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
95         add_inf_child_target.
96         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
97         add_inf_child_target.
98         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
99         add_inf_child_target.
100         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
101         add_inf_child_target.
102         * inf-child.c (inf_child_target_info): New.
103         (inf_child_target::info): New.
104         (inf_child_open_target): Remove 'target' parameter.  Use
105         get_native_target instead.
106         (inf_child_target::open): Delete.
107         (add_inf_child_target): New.
108         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
109         Delete.
110         <info>: New.
111         (add_inf_child_target): Declare.
112         (inf_child_open_target): Declare.
113         * linux-thread-db.c (thread_db_target_info): New.
114         (thread_db_target) <shortname, longname, doc>: Delete.
115         <info>: New.
116         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
117         add_inf_child_target.
118         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
119         add_inf_child_target.
120         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
121         add_inf_child_target.
122         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
123         add_inf_child_target.
124         * make-target-delegates (print_class): Adjust.
125         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
126         add_inf_child_target.
127         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
128         add_inf_child_target.
129         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
130         add_inf_child_target.
131         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
132         add_inf_child_target.
133         * nto-procfs.c (nto_native_target_info): New.
134         (nto_procfs_target_native) <shortname, longname, doc>:
135         Delete.
136         <info>: New.
137         (nto_procfs_target_info): New.
138         (nto_procfs_target_procfs) <shortname, longname, doc>:
139         Delete.
140         <info>: New.
141         (init_procfs_targets): Adjust.
142         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
143         add_inf_child_target.
144         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
145         add_inf_child_target.
146         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
147         add_inf_child_target.
148         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
149         add_inf_child_target.
150         * ravenscar-thread.c (ravenscar_target_info): New.
151         (ravenscar_thread_target) <shortname, longname, doc>:
152         Delete.
153         <info>: New.
154         * record-btrace.c (record_btrace_target_info):
155         (record_btrace_target) <shortname, longname, doc>: Delete.
156         <info>: New.
157         (record_btrace_target::open): Rename to ...
158         (record_btrace_target_open): ... this.  Adjust.
159         * record-full.c (record_longname, record_doc): New.
160         (record_full_base_target) <shortname, longname, doc>: Delete.
161         <info>: New.
162         (record_full_target_info): New.
163         (record_full_target): <shortname>: Delete.
164         <info>: New.
165         (record_full_core_open_1, record_full_open_1): Update comments.
166         (record_full_base_target::open): Rename to ...
167         (record_full_open): ... this.
168         (cmd_record_full_restore): Update.
169         (_initialize_record_full): Update.
170         * remote-sim.c (remote_sim_target_info): New.
171         (gdbsim_target) <shortname, longname, doc>: Delete.
172         <info>: New.
173         (gdbsim_target::open): Rename to ...
174         (gdbsim_target_open): ... this.
175         (_initialize_remote_sim): Adjust.
176         * remote.c (remote_doc): New.
177         (remote_target_info): New.
178         (remote_target) <shortname, longname, doc>: Delete.
179         <info>: New.
180         (extended_remote_target_info): New.
181         (extended_remote_target) <shortname, longname, doc>: Delete.
182         <info>: New.
183         (remote_target::open_1): Make static.  Adjust.
184         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
185         * s390-linux-nat.c (_initialize_s390_nat): Use
186         add_inf_child_target.
187         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
188         add_inf_child_target.
189         * sol-thread.c (thread_db_target_info): New.
190         (sol_thread_target) <shortname, longname, doc>: Delete.
191         <info>: New.
192         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
193         add_inf_child_target.
194         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
195         add_inf_child_target.
196         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
197         add_inf_child_target.
198         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
199         add_inf_child_target.
200         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
201         add_inf_child_target.
202         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
203         add_inf_child_target.
204         * spu-linux-nat.c (_initialize_spu_nat): Use
205         add_inf_child_target.
206         * spu-multiarch.c (spu_multiarch_target_info): New.
207         (spu_multiarch_target) <shortname, longname, doc>: Delete.
208         <info>: New.
209         * target-delegates.c: Regenerate.
210         * target.c: Include <unordered_map>.
211         (target_ops_p): Delete.
212         (DEF_VEC_P(target_ops_p)): Delete.
213         (target_factories): New.
214         (test_target_info): New.
215         (test_target_ops::info): New.
216         (open_target): Adjust to use target_factories.
217         (add_target_with_completer): Rename to ...
218         (add_target): ... this.  Change prototype.  Register target_info
219         and open callback in target_factories.  Register target_info in
220         command context instead of target_ops.
221         (add_target): Delete old implementation.
222         (add_deprecated_target_alias): Change prototype.  Adjust.
223         (the_native_target): New.
224         (set_native_target, get_native_target): New.
225         (find_default_run_target): Use the_native_target.
226         (find_attach_target, find_run_target): Simplify.
227         (target_ops::open): Delete.
228         (dummy_target_info): New.
229         (dummy_target::shortname, dummy_target::longname)
230         (dummy_target::doc): Delete.
231         (dummy_target::info): New.
232         (debug_target::shortname, debug_target::longname)
233         (debug_target::doc): Delete.
234         (debug_target::info): New.
235         * target.h (struct target_info): New.
236         (target_ops::~target_ops): Add comment.
237         (target_ops::info): New.
238         (target_ops::shortname, target_ops::longname, target_ops::doc): No
239         longer virtual.  Implement in terms of target_info.
240         (set_native_target, get_native_target): Declare.
241         (target_open_ftype): New.
242         (add_target, add_target_with_completer)
243         (add_deprecated_target_alias): Change prototype.
244         (test_target) <shortname, longname, doc>: Delete.
245         <info>: New.
246         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
247         add_inf_child_target.
248         * tracefile-tfile.c (tfile_target_info): New.
249         (tfile_target) <shortname, longname, doc>: Delete.
250         <info>: New.
251         (tfile_target::open): Rename to ...
252         (tfile_target_open): ... this.
253         (_initialize_tracefile_tfile): Adjust.
254         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
255         add_inf_child_target.
256         * windows-nat.c (_initialize_windows_nat): Use
257         add_inf_child_target.
258         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
259         add_inf_child_target.
260
261 2018-05-02  Pedro Alves  <palves@redhat.com>
262
263         * linux-nat.h (linux_nat_target) <low_new_thread,
264         low_delete_thread, low_new_fork, low_forget_process,
265         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
266         New virtual methods.
267         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
268         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
269         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
270         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
271         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
272         Delete.
273         * linux-fork.c (delete_fork): Adjust to call low method.
274         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
275         (linux_nat_new_fork, linux_nat_forget_process_hook)
276         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
277         (linux_nat_status_is_event):
278         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
279         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
280         to call low method.
281         (sigtrap_is_event): Rename to ...
282         (linux_nat_target::low_status_is_event): ... this.
283         (linux_nat_set_status_is_event): Delete.
284         (save_stop_reason, linux_nat_wait_1)
285         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
286         low methods.
287         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
288         (linux_nat_set_new_fork, linux_nat_set_forget_process)
289         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
290         (linux_nat_set_prepare_to_resume): Delete.
291         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
292         low virtual methods.
293         * amd64-linux-nat.c: Likewise.
294         * arm-linux-nat.c: Likewise.
295         * i386-linux-nat.c: Likewise.
296         * ia64-linux-nat.c: Likewise.
297         * mips-linux-nat.c: Likewise.
298         * ppc-linux-nat.c: Likewise.
299         * s390-linux-nat.c: Likewise.
300         * sparc64-linux-nat.c: Likewise.
301         * x86-linux-nat.c: Likewise.
302         * x86-linux-nat.h: Include "nat/x86-linux.h".
303         (x86_linux_nat_target) <low_new_fork, low_forget_process,
304         low_prepare_to_resume, low_new_thread, low_delete_thread>:
305         Override methods.
306
307 2018-05-02  Pedro Alves  <palves@redhat.com>
308
309         * target.h (target_ops)
310         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
311         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
312         stopped_by_watchpoint, have_continuable_watchpoint,
313         stopped_data_address, watchpoint_addr_within_range,
314         can_accel_watchpoint_condition, can_run, thread_alive,
315         has_all_memory, has_memory, has_stack, has_registers,
316         has_execution, can_async_p, is_async_p, supports_non_stop,
317         always_non_stop_p, can_execute_reverse, supports_multi_process,
318         supports_enable_disable_tracepoint,
319         supports_disable_randomization, supports_string_tracing,
320         supports_evaluation_of_breakpoint_conditions,
321         can_run_breakpoint_commands, filesystem_is_local,
322         can_download_tracepoint, get_trace_state_variable_value,
323         set_trace_notes, get_tib_address, use_agent, can_use_agent,
324         record_is_replaying, record_will_replay,
325         augmented_libraries_svr4_read>: Adjust to return bool.
326         * aarch64-linux-nat.c: All implementations adjusted.
327         * aix-thread.c: All implementations adjusted.
328         * arm-linux-nat.c: All implementations adjusted.
329         * breakpoint.c: All implementations adjusted.
330         * bsd-kvm.c: All implementations adjusted.
331         * bsd-uthread.c: All implementations adjusted.
332         * corelow.c: All implementations adjusted.
333         * ctf.c: All implementations adjusted.
334         * darwin-nat.c: All implementations adjusted.
335         * darwin-nat.h: All implementations adjusted.
336         * exec.c: All implementations adjusted.
337         * fbsd-nat.c: All implementations adjusted.
338         * fbsd-nat.h: All implementations adjusted.
339         * gnu-nat.c: All implementations adjusted.
340         * gnu-nat.h: All implementations adjusted.
341         * go32-nat.c: All implementations adjusted.
342         * ia64-linux-nat.c: All implementations adjusted.
343         * inf-child.c: All implementations adjusted.
344         * inf-child.h: All implementations adjusted.
345         * inf-ptrace.c: All implementations adjusted.
346         * inf-ptrace.h: All implementations adjusted.
347         * linux-nat.c: All implementations adjusted.
348         * linux-nat.h: All implementations adjusted.
349         * mips-linux-nat.c: All implementations adjusted.
350         * nto-procfs.c: All implementations adjusted.
351         * ppc-linux-nat.c: All implementations adjusted.
352         * procfs.c: All implementations adjusted.
353         * ravenscar-thread.c: All implementations adjusted.
354         * record-btrace.c: All implementations adjusted.
355         * record-full.c: All implementations adjusted.
356         * remote-sim.c: All implementations adjusted.
357         * remote.c: All implementations adjusted.
358         * s390-linux-nat.c: All implementations adjusted.
359         * sol-thread.c: All implementations adjusted.
360         * spu-multiarch.c: All implementations adjusted.
361         * target-delegates.c: All implementations adjusted.
362         * target.c: All implementations adjusted.
363         * target.h: All implementations adjusted.
364         * tracefile-tfile.c: All implementations adjusted.
365         * tracefile.c: All implementations adjusted.
366         * tracefile.h: All implementations adjusted.
367         * windows-nat.c: All implementations adjusted.
368         * x86-linux-nat.h: All implementations adjusted.
369         * x86-nat.h: All implementations adjusted.
370
371 2018-05-02  Pedro Alves  <palves@redhat.com>
372
373         * make-target-delegates (scan_target_h): Don't trim lines here.
374         Replace sequences of tabs and/or whitespace with a single
375         whitespace.
376         (top level, parsing methods): Trim each line before processing it
377         here.
378
379 2018-05-02  Pedro Alves  <palves@redhat.com>
380             John Baldwin  <jhb@freebsd.org>
381
382         * target.h (enum strata) <debug_stratum>: New.
383         (struct target_ops) <all delegation methods>: Replace by C++
384         virtual methods, and drop "to_" prefix.  All references updated
385         throughout.
386         <to_shortname, to_longname, to_doc, to_data,
387         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
388         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
389         virtual methods.  All references updated throughout.
390         <can_attach, supports_terminal_ours, can_create_inferior,
391         get_thread_control_capabilities, attach_no_wait>: New
392         virtual methods.
393         <insert_breakpoint, remove_breakpoint>: Now
394         TARGET_DEFAULT_NORETURN methods.
395         <info_proc>: Now returns bool.
396         <to_magic>: Delete.
397         (OPS_MAGIC): Delete.
398         (current_target): Delete.  All references replaced by references
399         to ...
400         (target_stack): ... this.  New.
401         (target_shortname, target_longname): Adjust.
402         (target_can_run): Now a function declaration.
403         (default_child_has_all_memory, default_child_has_memory)
404         (default_child_has_stack, default_child_has_registers)
405         (default_child_has_execution): Remove target_ops parameter.
406         (complete_target_initialization): Delete.
407         (memory_breakpoint_target): New template class.
408         (test_target_ops): Refactor as a C++ class with virtual methods.
409         * make-target-delegates (NAME_PART): Tighten.
410         (POINTER_PART, CP_SYMBOL): New.
411         (SIMPLE_RETURN_PART): Reimplement.
412         (VEC_RETURN_PART): Expect less.
413         (RETURN_PART, VIRTUAL_PART): New.
414         (METHOD): Adjust to C++ virtual methods.
415         (scan_target_h): Remove reference to C99.
416         (dname): Output "target_ops::" prefix.
417         (write_function_header): Adjust to output a C++ class method.
418         (write_declaration): New.
419         (write_delegator): Adjust to output a C++ class method.
420         (tdname): Output "dummy_target::" prefix.
421         (write_tdefault, write_debugmethod): Adjust to output a C++ class
422         method.
423         (tdefault_names, debug_names): Delete.
424         (return_types, tdefaults, styles, argtypes_array): New.
425         (top level): All methods are delegators.
426         (print_class): New.
427         (top level): Print dummy_target and debug_target classes.
428         * target-delegates.c: Regenerate.
429         * target-debug.h (target_debug_print_enum_info_proc_what)
430         (target_debug_print_thread_control_capabilities)
431         (target_debug_print_thread_info_p): New.
432         * target.c (dummy_target): Delete.
433         (the_dummy_target, the_debug_target): New.
434         (target_stack): Now extern.
435         (set_targetdebug): Push/unpush debug target.
436         (default_child_has_all_memory, default_child_has_memory)
437         (default_child_has_stack, default_child_has_registers)
438         (default_child_has_execution): Remove target_ops parameter.
439         (complete_target_initialization): Delete.
440         (add_target_with_completer): No longer call
441         complete_target_initialization.
442         (target_supports_terminal_ours): Use regular delegation.
443         (update_current_target): Delete.
444         (push_target): No longer check magic number.  Don't call
445         update_current_target.
446         (unpush_target): Don't call update_current_target.
447         (target_is_pushed): No longer check magic number.
448         (target_require_runnable): Skip for all stratums over
449         process_stratum.
450         (target_ops::info_proc): New.
451         (target_info_proc): Use find_target_at and
452         find_default_run_target.
453         (target_supports_disable_randomization): Use regular delegation.
454         (target_get_osdata): Use find_target_at.
455         (target_ops::open, target_ops::close, target_ops::can_attach)
456         (target_ops::attach, target_ops::can_create_inferior)
457         (target_ops::create_inferior, target_ops::can_run)
458         (target_can_run): New.
459         (default_fileio_target): Use regular delegation.
460         (target_ops::fileio_open, target_ops::fileio_pwrite)
461         (target_ops::fileio_pread, target_ops::fileio_fstat)
462         (target_ops::fileio_close, target_ops::fileio_unlink)
463         (target_ops::fileio_readlink): New.
464         (target_fileio_open_1, target_fileio_unlink)
465         (target_fileio_readlink): Always call the target method.  Handle
466         FILEIO_ENOSYS.
467         (return_zero, return_zero_has_execution): Delete.
468         (init_dummy_target): Delete.
469         (dummy_target::dummy_target, dummy_target::shortname)
470         (dummy_target::longname, dummy_target::doc)
471         (debug_target::debug_target, debug_target::shortname)
472         (debug_target::longname, debug_target::doc): New.
473         (target_supports_delete_record): Use regular delegation.
474         (setup_target_debug): Delete.
475         (maintenance_print_target_stack): Skip debug_stratum.
476         (initialize_targets): Instantiate the_dummy_target and
477         the_debug_target.
478         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
479         use target_stack.
480         (target_auxv_search, fprint_target_auxv): Adjust.
481         (info_auxv_command): Adjust to use target_stack.
482         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
483         * exceptions.c (print_flush): Handle a NULL target_stack.
484         * regcache.c (target_ops_no_register): Refactor as class with
485         virtual methods.
486
487         * exec.c (exec_target): New class.
488         (exec_ops): Now an exec_target.
489         (exec_open, exec_close_1, exec_get_section_table)
490         (exec_xfer_partial, exec_files_info, exec_has_memory)
491         (exec_make_note_section): Refactor as exec_target methods.
492         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
493         Delete.
494         (exec_target::find_memory_regions): New.
495         (_initialize_exec): Don't call init_exec_ops.
496         * gdbcore.h (exec_file_clear): Delete.
497
498         * corefile.c (core_target): Delete.
499         (core_file_command): Adjust.
500         * corelow.c (core_target): New class.
501         (the_core_target): New.
502         (core_close): Remove target_ops parameter.
503         (core_close_cleanup): Adjust.
504         (core_target::close): New.
505         (core_open, core_detach, get_core_registers, core_files_info)
506         (core_xfer_partial, core_thread_alive, core_read_description)
507         (core_pid_to_str, core_thread_name, core_has_memory)
508         (core_has_stack, core_has_registers, core_info_proc): Rework as
509         core_target methods.
510         (ignore, core_remove_breakpoint, init_core_ops): Delete.
511         (_initialize_corelow): Initialize the_core_target.
512         * gdbcore.h (core_target): Delete.
513         (the_core_target): New.
514
515         * ctf.c: (ctf_target): New class.
516         (ctf_ops): Now a ctf_target.
517         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
518         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
519         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
520         methods.
521         (init_ctf_ops): Delete.
522         (_initialize_ctf): Don't call it.
523         * tracefile-tfile.c (tfile_target): New class.
524         (tfile_ops): Now a tfile_target.
525         (tfile_open, tfile_close, tfile_files_info)
526         (tfile_get_tracepoint_status, tfile_trace_find)
527         (tfile_fetch_registers, tfile_xfer_partial)
528         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
529         Refactor as tfile_target methods.
530         (tfile_xfer_partial_features): Remove target_ops parameter.
531         (init_tfile_ops): Delete.
532         (_initialize_tracefile_tfile): Don't call it.
533         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
534         (tracefile_has_stack, tracefile_has_registers)
535         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
536         tracefile_target methods.
537         (init_tracefile_ops): Delete.
538         (tracefile_target::tracefile_target): New.
539         * tracefile.h: Include "target.h".
540         (tracefile_target): New class.
541         (init_tracefile_ops): Delete.
542
543         * spu-multiarch.c (spu_multiarch_target): New class.
544         (spu_ops): Now a spu_multiarch_target.
545         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
546         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
547         (spu_search_memory, spu_mourn_inferior): Refactor as
548         spu_multiarch_target methods.
549         (init_spu_ops): Delete.
550         (_initialize_spu_multiarch): Remove references to init_spu_ops,
551         complete_target_initialization.
552
553         * ravenscar-thread.c (ravenscar_thread_target): New class.
554         (ravenscar_ops): Now a ravenscar_thread_target.
555         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
556         (ravenscar_thread_alive, ravenscar_pid_to_str)
557         (ravenscar_fetch_registers, ravenscar_store_registers)
558         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
559         (ravenscar_stopped_by_hw_breakpoint)
560         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
561         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
562         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
563         methods.
564         (init_ravenscar_thread_ops): Delete.
565         (_initialize_ravenscar): Remove references to
566         init_ravenscar_thread_ops and complete_target_initialization.
567
568         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
569         (bsd_uthread_target): New class.
570         (bsd_uthread_ops): Now a bsd_uthread_target.
571         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
572         (bsd_uthread_close, bsd_uthread_mourn_inferior)
573         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
574         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
575         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
576         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
577         (bsd_uthread_target): Delete function.
578         (_initialize_bsd_uthread): Remove reference to
579         complete_target_initialization.
580
581         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
582         (target_bfd): ... this new class.
583         (target_bfd_xfer_partial, target_bfd_get_section_table)
584         (target_bfd_close): Refactor as target_bfd methods.
585         (target_bfd::~target_bfd): New.
586         (target_bfd_reopen): Adjust.
587         (target_bfd::close): New.
588
589         * record-btrace.c (record_btrace_target): New class.
590         (record_btrace_ops): Now a record_btrace_target.
591         (record_btrace_open, record_btrace_stop_recording)
592         (record_btrace_disconnect, record_btrace_close)
593         (record_btrace_async, record_btrace_info)
594         (record_btrace_insn_history, record_btrace_insn_history_range)
595         (record_btrace_insn_history_from, record_btrace_call_history)
596         (record_btrace_call_history_range)
597         (record_btrace_call_history_from, record_btrace_record_method)
598         (record_btrace_is_replaying, record_btrace_will_replay)
599         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
600         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
601         (record_btrace_store_registers, record_btrace_prepare_to_store)
602         (record_btrace_to_get_unwinder)
603         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
604         (record_btrace_commit_resume, record_btrace_wait)
605         (record_btrace_stop, record_btrace_can_execute_reverse)
606         (record_btrace_stopped_by_sw_breakpoint)
607         (record_btrace_supports_stopped_by_sw_breakpoint)
608         (record_btrace_stopped_by_hw_breakpoint)
609         (record_btrace_supports_stopped_by_hw_breakpoint)
610         (record_btrace_update_thread_list, record_btrace_thread_alive)
611         (record_btrace_goto_begin, record_btrace_goto_end)
612         (record_btrace_goto, record_btrace_stop_replaying_all)
613         (record_btrace_execution_direction)
614         (record_btrace_prepare_to_generate_core)
615         (record_btrace_done_generating_core): Refactor as
616         record_btrace_target methods.
617         (init_record_btrace_ops): Delete.
618         (_initialize_record_btrace): Remove reference to
619         init_record_btrace_ops.
620         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
621         the execution_direction global.
622         (record_full_base_target, record_full_target)
623         (record_full_core_target): New classes.
624         (record_full_ops): Now a record_full_target.
625         (record_full_core_ops): Now a record_full_core_target.
626         (record_full_target::detach, record_full_target::disconnect)
627         (record_full_core_target::disconnect)
628         (record_full_target::mourn_inferior, record_full_target::kill):
629         New.
630         (record_full_open, record_full_close, record_full_async): Refactor
631         as methods of the record_full_base_target class.
632         (record_full_resume, record_full_commit_resume): Refactor
633         as methods of the record_full_target class.
634         (record_full_wait, record_full_stopped_by_watchpoint)
635         (record_full_stopped_data_address)
636         (record_full_stopped_by_sw_breakpoint)
637         (record_full_supports_stopped_by_sw_breakpoint)
638         (record_full_stopped_by_hw_breakpoint)
639         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
640         methods of the record_full_base_target class.
641         (record_full_store_registers, record_full_xfer_partial)
642         (record_full_insert_breakpoint, record_full_remove_breakpoint):
643         Refactor as methods of the record_full_target class.
644         (record_full_can_execute_reverse, record_full_get_bookmark)
645         (record_full_goto_bookmark, record_full_execution_direction)
646         (record_full_record_method, record_full_info, record_full_delete)
647         (record_full_is_replaying, record_full_will_replay)
648         (record_full_goto_begin, record_full_goto_end, record_full_goto)
649         (record_full_stop_replaying): Refactor as methods of the
650         record_full_base_target class.
651         (record_full_core_resume, record_full_core_kill)
652         (record_full_core_fetch_registers)
653         (record_full_core_prepare_to_store)
654         (record_full_core_store_registers, record_full_core_xfer_partial)
655         (record_full_core_insert_breakpoint)
656         (record_full_core_remove_breakpoint)
657         (record_full_core_has_execution): Refactor
658         as methods of the record_full_core_target class.
659         (record_full_base_target::supports_delete_record): New.
660         (init_record_full_ops): Delete.
661         (init_record_full_core_ops): Delete.
662         (record_full_save): Refactor as method of the
663         record_full_base_target class.
664         (_initialize_record_full): Remove references to
665         init_record_full_ops and init_record_full_core_ops.
666
667         * remote.c (remote_target, extended_remote_target): New classes.
668         (remote_ops): Now a remote_target.
669         (extended_remote_ops): Now an extended_remote_target.
670         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
671         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
672         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
673         (remote_pass_signals, remote_set_syscall_catchpoint)
674         (remote_program_signals, )
675         (remote_thread_always_alive): Remove target_ops parameter.
676         (remote_thread_alive, remote_thread_name)
677         (remote_update_thread_list, remote_threads_extra_info)
678         (remote_static_tracepoint_marker_at)
679         (remote_static_tracepoint_markers_by_strid)
680         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
681         (remote_open): Refactor as methods of remote_target.
682         (extended_remote_open, extended_remote_detach)
683         (extended_remote_attach, extended_remote_post_attach):
684         (extended_remote_supports_disable_randomization)
685         (extended_remote_create_inferior): : Refactor as method of
686         extended_remote_target.
687         (remote_set_permissions, remote_open_1, remote_detach)
688         (remote_follow_fork, remote_follow_exec, remote_disconnect)
689         (remote_resume, remote_commit_resume, remote_stop)
690         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
691         (remote_terminal_ours, remote_wait, remote_fetch_registers)
692         (remote_prepare_to_store, remote_store_registers)
693         (remote_flash_erase, remote_flash_done, remote_files_info)
694         (remote_kill, remote_mourn, remote_insert_breakpoint)
695         (remote_remove_breakpoint, remote_insert_watchpoint)
696         (remote_watchpoint_addr_within_range)
697         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
698         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
699         (remote_supports_stopped_by_sw_breakpoint)
700         (remote_stopped_by_hw_breakpoint)
701         (remote_supports_stopped_by_hw_breakpoint)
702         (remote_stopped_by_watchpoint, remote_stopped_data_address)
703         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
704         (remote_verify_memory): Refactor as methods of remote_target.
705         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
706         parameter.
707         (remote_xfer_partial, remote_get_memory_xfer_limit)
708         (remote_search_memory, remote_rcmd, remote_memory_map)
709         (remote_pid_to_str, remote_get_thread_local_address)
710         (remote_get_tib_address, remote_read_description): Refactor as
711         methods of remote_target.
712         (remote_target::fileio_open, remote_target::fileio_pwrite)
713         (remote_target::fileio_pread, remote_target::fileio_close): New.
714         (remote_hostio_readlink, remote_hostio_fstat)
715         (remote_filesystem_is_local, remote_can_execute_reverse)
716         (remote_supports_non_stop, remote_supports_disable_randomization)
717         (remote_supports_multi_process, remote_supports_cond_breakpoints)
718         (remote_supports_enable_disable_tracepoint)
719         (remote_supports_string_tracing)
720         (remote_can_run_breakpoint_commands, remote_trace_init)
721         (remote_download_tracepoint, remote_can_download_tracepoint)
722         (remote_download_trace_state_variable, remote_enable_tracepoint)
723         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
724         (remote_trace_start, remote_get_trace_status)
725         (remote_get_tracepoint_status, remote_trace_stop)
726         (remote_trace_find, remote_get_trace_state_variable_value)
727         (remote_save_trace_data, remote_get_raw_trace_data)
728         (remote_set_disconnected_tracing, remote_core_of_thread)
729         (remote_set_circular_trace_buffer, remote_traceframe_info)
730         (remote_get_min_fast_tracepoint_insn_len)
731         (remote_set_trace_buffer_size, remote_set_trace_notes)
732         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
733         (remote_disable_btrace, remote_teardown_btrace)
734         (remote_read_btrace, remote_btrace_conf)
735         (remote_augmented_libraries_svr4_read, remote_load)
736         (remote_pid_to_exec_file, remote_can_do_single_step)
737         (remote_execution_direction, remote_thread_handle_to_thread_info):
738         Refactor as methods of remote_target.
739         (init_remote_ops, init_extended_remote_ops): Delete.
740         (remote_can_async_p, remote_is_async_p, remote_async)
741         (remote_thread_events, remote_upload_tracepoints)
742         (remote_upload_trace_state_variables): Refactor as methods of
743         remote_target.
744         (_initialize_remote): Remove references to init_remote_ops and
745         init_extended_remote_ops.
746
747         * remote-sim.c (gdbsim_target): New class.
748         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
749         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
750         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
751         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
752         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
753         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
754         Refactor as methods of gdbsim_target.
755         (gdbsim_ops): Now a gdbsim_target.
756         (init_gdbsim_ops): Delete.
757         (gdbsim_cntrl_c): Adjust.
758         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
759
760         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
761         (the_amd64_linux_nat_target): New.
762         (amd64_linux_fetch_inferior_registers)
763         (amd64_linux_store_inferior_registers): Refactor as methods of
764         amd64_linux_nat_target.
765         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
766         * i386-linux-nat.c: Don't include "linux-nat.h".
767         (i386_linux_nat_target): New class.
768         (the_i386_linux_nat_target): New.
769         (i386_linux_fetch_inferior_registers)
770         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
771         as methods of i386_linux_nat_target.
772         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
773         * inf-child.c (inf_child_ops): Delete.
774         (inf_child_fetch_inferior_registers)
775         (inf_child_store_inferior_registers): Delete.
776         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
777         methods of inf_child_target.
778         (inf_child_target::supports_terminal_ours)
779         (inf_child_target::terminal_init)
780         (inf_child_target::terminal_inferior)
781         (inf_child_target::terminal_ours_for_output)
782         (inf_child_target::terminal_ours, inf_child_target::interrupt)
783         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
784         New.
785         (inf_child_open, inf_child_disconnect, inf_child_close)
786         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
787         (inf_child_post_startup_inferior, inf_child_can_run)
788         (inf_child_pid_to_exec_file): Refactor as methods of
789         inf_child_target.
790         (inf_child_follow_fork): Delete.
791         (inf_child_target::can_create_inferior)
792         (inf_child_target::can_attach): New.
793         (inf_child_target::has_all_memory, inf_child_target::has_memory)
794         (inf_child_target::has_stack, inf_child_target::has_registers)
795         (inf_child_target::has_execution): New.
796         (inf_child_fileio_open, inf_child_fileio_pwrite)
797         (inf_child_fileio_pread, inf_child_fileio_fstat)
798         (inf_child_fileio_close, inf_child_fileio_unlink)
799         (inf_child_fileio_readlink, inf_child_use_agent)
800         (inf_child_can_use_agent): Refactor as methods of
801         inf_child_target.
802         (return_zero, inf_child_target): Delete.
803         (inf_child_target::inf_child_target): New.
804         * inf-child.h: Include "target.h".
805         (inf_child_target): Delete function prototype.
806         (inf_child_target): New class.
807         (inf_child_open_target, inf_child_mourn_inferior)
808         (inf_child_maybe_unpush_target): Delete.
809         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
810         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
811         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
812         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
813         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
814         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
815         (inf_ptrace_wait, inf_ptrace_xfer_partial)
816         (inf_ptrace_thread_alive, inf_ptrace_files_info)
817         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
818         methods of inf_ptrace_target.
819         (inf_ptrace_target): Delete function.
820         * inf-ptrace.h: Include "inf-child.h".
821         (inf_ptrace_target): Delete function declaration.
822         (inf_ptrace_target): New class.
823         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
824         * linux-nat.c (linux_target): New.
825         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
826         (linux_nat_target::~linux_nat_target): New.
827         (linux_child_post_attach, linux_child_post_startup_inferior)
828         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
829         (linux_child_remove_fork_catchpoint)
830         (linux_child_insert_vfork_catchpoint)
831         (linux_child_remove_vfork_catchpoint)
832         (linux_child_insert_exec_catchpoint)
833         (linux_child_remove_exec_catchpoint)
834         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
835         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
836         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
837         (linux_nat_stopped_data_address)
838         (linux_nat_stopped_by_sw_breakpoint)
839         (linux_nat_supports_stopped_by_sw_breakpoint)
840         (linux_nat_stopped_by_hw_breakpoint)
841         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
842         (linux_nat_kill, linux_nat_mourn_inferior)
843         (linux_nat_xfer_partial, linux_nat_thread_alive)
844         (linux_nat_update_thread_list, linux_nat_pid_to_str)
845         (linux_nat_thread_name, linux_child_pid_to_exec_file)
846         (linux_child_static_tracepoint_markers_by_strid)
847         (linux_nat_is_async_p, linux_nat_can_async_p)
848         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
849         (linux_nat_supports_multi_process)
850         (linux_nat_supports_disable_randomization, linux_nat_async)
851         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
852         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
853         (linux_nat_fileio_open, linux_nat_fileio_readlink)
854         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
855         methods of linux_nat_target.
856         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
857         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
858         parameter.
859         (check_stopped_by_watchpoint): Adjust.
860         (linux_xfer_partial): Delete.
861         (linux_target_install_ops, linux_target, linux_nat_add_target):
862         Delete.
863         (linux_nat_target::linux_nat_target): New.
864         * linux-nat.h: Include "inf-ptrace.h".
865         (linux_nat_target): New.
866         (linux_target, linux_target_install_ops, linux_nat_add_target):
867         Delete function declarations.
868         (linux_target): Declare global.
869         * linux-thread-db.c (thread_db_target): New.
870         (thread_db_target::thread_db_target): New.
871         (thread_db_ops): Delete.
872         (the_thread_db_target): New.
873         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
874         (thread_db_update_thread_list, thread_db_pid_to_str)
875         (thread_db_extra_thread_info)
876         (thread_db_thread_handle_to_thread_info)
877         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
878         (thread_db_resume): Refactor as methods of thread_db_target.
879         (init_thread_db_ops): Delete.
880         (_initialize_thread_db): Remove reference to init_thread_db_ops.
881         * x86-linux-nat.c: Don't include "linux-nat.h".
882         (super_post_startup_inferior): Delete.
883         (x86_linux_nat_target::~x86_linux_nat_target): New.
884         (x86_linux_child_post_startup_inferior)
885         (x86_linux_read_description, x86_linux_enable_btrace)
886         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
887         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
888         methods of x86_linux_nat_target.
889         (x86_linux_create_target): Delete.  Bits folded ...
890         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
891         pointer.
892         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
893         (x86_linux_nat_target): New class.
894         (x86_linux_create_target): Delete.
895         (x86_linux_add_target): Now takes a linux_nat_target pointer.
896         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
897         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
898         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
899         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
900         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
901         make extern.
902         (x86_use_watchpoints): Delete.
903         * x86-nat.h: Include "breakpoint.h" and "target.h".
904         (x86_use_watchpoints): Delete.
905         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
906         (x86_stopped_by_watchpoint, x86_stopped_data_address)
907         (x86_insert_watchpoint, x86_remove_watchpoint)
908         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
909         (x86_stopped_by_hw_breakpoint): New declarations.
910         (x86_nat_target): New template class.
911
912         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
913         (the_ppc_linux_nat_target): New.
914         (ppc_linux_fetch_inferior_registers)
915         (ppc_linux_can_use_hw_breakpoint)
916         (ppc_linux_region_ok_for_hw_watchpoint)
917         (ppc_linux_ranged_break_num_registers)
918         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
919         (ppc_linux_insert_mask_watchpoint)
920         (ppc_linux_remove_mask_watchpoint)
921         (ppc_linux_can_accel_watchpoint_condition)
922         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
923         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
924         (ppc_linux_watchpoint_addr_within_range)
925         (ppc_linux_masked_watch_num_registers)
926         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
927         (ppc_linux_read_description): Refactor as methods of
928         ppc_linux_nat_target.
929         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
930
931         * procfs.c (procfs_xfer_partial): Delete forward declaration.
932         (procfs_target): New class.
933         (the_procfs_target): New.
934         (procfs_target): Delete function.
935         (procfs_auxv_parse, procfs_attach, procfs_detach)
936         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
937         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
938         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
939         (procfs_create_inferior, procfs_update_thread_list)
940         (procfs_thread_alive, procfs_pid_to_str)
941         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
942         (procfs_stopped_data_address, procfs_insert_watchpoint)
943         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
944         (proc_find_memory_regions, procfs_info_proc)
945         (procfs_make_note_section): Refactor as methods of procfs_target.
946         (_initialize_procfs): Adjust.
947         * sol-thread.c (sol_thread_target): New class.
948         (sol_thread_ops): Now a sol_thread_target.
949         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
950         (sol_thread_fetch_registers, sol_thread_store_registers)
951         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
952         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
953         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
954         (init_sol_thread_ops): Delete.
955         (_initialize_sol_thread): Adjust.  Remove references to
956         init_sol_thread_ops and complete_target_initialization.
957
958         * windows-nat.c (windows_nat_target): New class.
959         (windows_fetch_inferior_registers)
960         (windows_store_inferior_registers, windows_resume, windows_wait)
961         (windows_attach, windows_detach, windows_pid_to_exec_file)
962         (windows_files_info, windows_create_inferior)
963         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
964         (windows_close, windows_pid_to_str, windows_xfer_partial)
965         (windows_get_tib_address, windows_get_ada_task_ptid)
966         (windows_thread_name, windows_thread_alive): Refactor as
967         windows_nat_target methods.
968         (do_initial_windows_stuff): Adjust.
969         (windows_target): Delete function.
970         (_initialize_windows_nat): Adjust.
971
972         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
973         (darwin_mourn_inferior, darwin_kill_inferior)
974         (darwin_create_inferior, darwin_attach, darwin_detach)
975         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
976         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
977         (darwin_supports_multi_process): Refactor as darwin_nat_target
978         methods.
979         (darwin_resume_to, darwin_files_info): Delete.
980         (_initialize_darwin_inferior): Rename to ...
981         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
982         * darwin-nat.h: Include "inf-child.h".
983         (darwin_nat_target): New class.
984         (darwin_complete_target): Delete.
985         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
986         (darwin_target): New.
987         (i386_darwin_fetch_inferior_registers)
988         (i386_darwin_store_inferior_registers): Refactor as methods of
989         darwin_nat_target.
990         (darwin_complete_target): Delete, with ...
991         (_initialize_i386_darwin_nat): ... bits factored out here.
992
993         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
994         (the_alpha_linux_nat_target): New.
995         (alpha_linux_register_u_offset): Refactor as
996         alpha_linux_nat_target method.
997         (_initialize_alpha_linux_nat): Adjust.
998         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
999         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1000         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1001         methods of linux_nat_trad_target.
1002         (linux_trad_target): Delete.
1003         * linux-nat-trad.h (linux_trad_target): Delete function.
1004         (linux_nat_trad_target): New class.
1005         * mips-linux-nat.c (mips_linux_nat_target): New class.
1006         (super_fetch_registers, super_store_registers, super_close):
1007         Delete.
1008         (the_mips_linux_nat_target): New.
1009         (mips64_linux_regsets_fetch_registers)
1010         (mips64_linux_regsets_store_registers)
1011         (mips64_linux_fetch_registers, mips64_linux_store_registers)
1012         (mips_linux_register_u_offset, mips_linux_read_description)
1013         (mips_linux_can_use_hw_breakpoint)
1014         (mips_linux_stopped_by_watchpoint)
1015         (mips_linux_stopped_data_address)
1016         (mips_linux_region_ok_for_hw_watchpoint)
1017         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1018         (mips_linux_close): Refactor as methods of mips_linux_nat.
1019         (_initialize_mips_linux_nat): Adjust to C++ification.
1020
1021         * aix-thread.c (aix_thread_target): New class.
1022         (aix_thread_ops): Now an aix_thread_target.
1023         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1024         (aix_thread_fetch_registers, aix_thread_store_registers)
1025         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1026         (aix_thread_thread_alive, aix_thread_pid_to_str)
1027         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1028         Refactor as methods of aix_thread_target.
1029         (init_aix_thread_ops): Delete.
1030         (_initialize_aix_thread): Remove references to init_aix_thread_ops
1031         and complete_target_initialization.
1032         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1033         (rs6000_nat_target): New class.
1034         (the_rs6000_nat_target): New.
1035         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1036         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1037         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1038         (super_create_inferior): Delete.
1039         (_initialize_rs6000_nat): Adjust to C++ification.
1040
1041         * arm-linux-nat.c (arm_linux_nat_target): New class.
1042         (the_arm_linux_nat_target): New.
1043         (arm_linux_fetch_inferior_registers)
1044         (arm_linux_store_inferior_registers, arm_linux_read_description)
1045         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1046         (arm_linux_remove_hw_breakpoint)
1047         (arm_linux_region_ok_for_hw_watchpoint)
1048         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1049         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1050         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1051         arm_linux_nat_target.
1052         (_initialize_arm_linux_nat): Adjust to C++ification.
1053
1054         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1055         (the_aarch64_linux_nat_target): New.
1056         (aarch64_linux_fetch_inferior_registers)
1057         (aarch64_linux_store_inferior_registers)
1058         (aarch64_linux_child_post_startup_inferior)
1059         (aarch64_linux_read_description)
1060         (aarch64_linux_can_use_hw_breakpoint)
1061         (aarch64_linux_insert_hw_breakpoint)
1062         (aarch64_linux_remove_hw_breakpoint)
1063         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1064         (aarch64_linux_region_ok_for_hw_watchpoint)
1065         (aarch64_linux_stopped_data_address)
1066         (aarch64_linux_stopped_by_watchpoint)
1067         (aarch64_linux_watchpoint_addr_within_range)
1068         (aarch64_linux_can_do_single_step): Refactor as methods of
1069         aarch64_linux_nat_target.
1070         (super_post_startup_inferior): Delete.
1071         (_initialize_aarch64_linux_nat): Adjust to C++ification.
1072
1073         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1074         (the_hppa_linux_nat_target): New.
1075         (hppa_linux_fetch_inferior_registers)
1076         (hppa_linux_store_inferior_registers): Refactor as methods of
1077         hppa_linux_nat_target.
1078         (_initialize_hppa_linux_nat): Adjust to C++ification.
1079
1080         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1081         (the_ia64_linux_nat_target): New.
1082         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1083         (ia64_linux_stopped_data_address)
1084         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1085         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1086         ia64_linux_nat_target methods.
1087         (super_xfer_partial): Delete.
1088         (_initialize_ia64_linux_nat): Adjust to C++ification.
1089
1090         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1091         (the_m32r_linux_nat_target): New.
1092         (m32r_linux_fetch_inferior_registers)
1093         (m32r_linux_store_inferior_registers): Refactor as
1094         m32r_linux_nat_target methods.
1095         (_initialize_m32r_linux_nat): Adjust to C++ification.
1096
1097         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1098         (the_m68k_linux_nat_target): New.
1099         (m68k_linux_fetch_inferior_registers)
1100         (m68k_linux_store_inferior_registers): Refactor as
1101         m68k_linux_nat_target methods.
1102         (_initialize_m68k_linux_nat): Adjust to C++ification.
1103
1104         * s390-linux-nat.c (s390_linux_nat_target): New class.
1105         (the_s390_linux_nat_target): New.
1106         (s390_linux_fetch_inferior_registers)
1107         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1108         (s390_insert_watchpoint, s390_remove_watchpoint)
1109         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1110         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1111         (s390_auxv_parse, s390_read_description): Refactor as methods of
1112         s390_linux_nat_target.
1113         (_initialize_s390_nat): Adjust to C++ification.
1114
1115         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1116         (the_sparc_linux_nat_target): New.
1117         (_initialize_sparc_linux_nat): Adjust to C++ification.
1118         * sparc-nat.c (sparc_fetch_inferior_registers)
1119         (sparc_store_inferior_registers): Remove target_ops parameter.
1120         * sparc-nat.h (sparc_fetch_inferior_registers)
1121         (sparc_store_inferior_registers): Remove target_ops parameter.
1122         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1123         (the_sparc64_linux_nat_target): New.
1124         (_initialize_sparc64_linux_nat): Adjust to C++ification.
1125
1126         * spu-linux-nat.c (spu_linux_nat_target): New class.
1127         (the_spu_linux_nat_target): New.
1128         (spu_child_post_startup_inferior, spu_child_post_attach)
1129         (spu_child_wait, spu_fetch_inferior_registers)
1130         (spu_store_inferior_registers, spu_xfer_partial)
1131         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1132         methods.
1133         (_initialize_spu_nat): Adjust to C++ification.
1134
1135         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1136         (the_tilegx_linux_nat_target): New.
1137         (fetch_inferior_registers, store_inferior_registers):
1138         Refactor as methods.
1139         (_initialize_tile_linux_nat): Adjust to C++ification.
1140
1141         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1142         (the_xtensa_linux_nat_target): New.
1143         (xtensa_linux_fetch_inferior_registers)
1144         (xtensa_linux_store_inferior_registers): Refactor as
1145         xtensa_linux_nat_target methods.
1146         (_initialize_xtensa_linux_nat): Adjust to C++ification.
1147
1148         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1149         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1150         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1151         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1152         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1153         (fbsd_stopped_by_sw_breakpoint)
1154         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1155         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1156         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1157         (fbsd_post_startup_inferior, fbsd_post_attach)
1158         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1159         (fbsd_set_syscall_catchpoint)
1160         (super_xfer_partial, super_resume, super_wait)
1161         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1162         (fbsd_handle_debug_trap): Remove target_ops parameter.
1163         (fbsd_nat_add_target): Delete.
1164         * fbsd-nat.h: Include "inf-ptrace.h".
1165         (fbsd_nat_add_target): Delete.
1166         (USE_SIGTRAP_SIGINFO): Define.
1167         (fbsd_nat_target): New class.
1168
1169         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1170         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1171         (amd64bsd_target): Delete.
1172         * amd64-bsd-nat.h: New file.
1173         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1174         "x86-bsd-nat.h".
1175         (amd64_fbsd_nat_target): New class.
1176         (the_amd64_fbsd_nat_target): New.
1177         (amd64fbsd_read_description): Refactor as method of
1178         amd64_fbsd_nat_target.
1179         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1180         (_initialize_amd64fbsd_nat): Adjust to C++ification.
1181         * amd64-nat.h (amd64bsd_target): Delete function declaration.
1182         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1183         (i386bsd_store_inferior_registers): Remove target_ops parameter.
1184         (i386bsd_target): Delete.
1185         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1186         (i386bsd_fetch_inferior_registers)
1187         (i386bsd_store_inferior_registers): Declare.
1188         (i386_bsd_nat_target): New class.
1189         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1190         (the_i386_fbsd_nat_target): New.
1191         (i386fbsd_resume, i386fbsd_read_description): Refactor as
1192         i386_fbsd_nat_target methods.
1193         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1194         (_initialize_i386fbsd_nat): Adjust to C++ification.
1195         * x86-bsd-nat.c (super_mourn_inferior): Delete.
1196         (x86bsd_mourn_inferior, x86bsd_target): Delete.
1197         (_initialize_x86_bsd_nat): Adjust to C++ification.
1198         * x86-bsd-nat.h: Include "x86-nat.h".
1199         (x86bsd_target): Delete declaration.
1200         (x86bsd_nat_target): New class.
1201
1202         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1203         (the_aarch64_fbsd_nat_target): New.
1204         (aarch64_fbsd_fetch_inferior_registers)
1205         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1206         aarch64_fbsd_nat_target.
1207         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1208         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1209         (the_alpha_bsd_nat_target): New.
1210         (alphabsd_fetch_inferior_registers)
1211         (alphabsd_store_inferior_registers): Refactor as
1212         alpha_bsd_nat_target methods.
1213         (_initialize_alphabsd_nat): Refactor as methods of
1214         alpha_bsd_nat_target.
1215         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1216         (the_amd64_nbsd_nat_target): New.
1217         (_initialize_amd64nbsd_nat): Adjust to C++ification.
1218         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1219         (the_amd64_obsd_nat_target): New.
1220         (_initialize_amd64obsd_nat): Adjust to C++ification.
1221         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1222         (the_arm_fbsd_nat_target): New.
1223         (arm_fbsd_fetch_inferior_registers)
1224         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1225         (_initialize_arm_fbsd_nat): Refactor as methods of
1226         arm_fbsd_nat_target.
1227         (_initialize_arm_fbsd_nat): Adjust to C++ification.
1228         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1229         (the_arm_netbsd_nat_target): New.
1230         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1231         arm_netbsd_nat_target.
1232         (_initialize_arm_netbsd_nat): Adjust to C++ification.
1233         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1234         (the_hppa_nbsd_nat_target): New.
1235         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1236         hppa_nbsd_nat_target methods.
1237         (_initialize_hppanbsd_nat): Adjust to C++ification.
1238         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1239         (the_hppa_obsd_nat_target): New.
1240         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1241         methods of hppa_obsd_nat_target.
1242         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
1243         add_target.
1244         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1245         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
1246         add_target.
1247         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1248         (_initialize_i386obsd_nat): Use add_target.
1249         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1250         (the_m68k_bsd_nat_target): New.
1251         (m68kbsd_fetch_inferior_registers)
1252         (m68kbsd_store_inferior_registers): Refactor as methods of
1253         m68k_bsd_nat_target.
1254         (_initialize_m68kbsd_nat): Adjust to C++ification.
1255         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1256         (the_mips_fbsd_nat_target): New.
1257         (mips_fbsd_fetch_inferior_registers)
1258         (mips_fbsd_store_inferior_registers): Refactor as methods of
1259         mips_fbsd_nat_target.
1260         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
1261         add_target.
1262         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1263         (the_mips_nbsd_nat_target): New.
1264         (mipsnbsd_fetch_inferior_registers)
1265         (mipsnbsd_store_inferior_registers): Refactor as methods of
1266         mips_nbsd_nat_target.
1267         (_initialize_mipsnbsd_nat): Adjust to C++ification.
1268         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1269         (the_mips64_obsd_nat_target): New.
1270         (mips64obsd_fetch_inferior_registers)
1271         (mips64obsd_store_inferior_registers): Refactor as methods of
1272         mips64_obsd_nat_target.
1273         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
1274         add_target.
1275         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1276         nbsd_nat_target.
1277         * nbsd-nat.h: Include "inf-ptrace.h".
1278         (nbsd_nat_target): New class.
1279         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1280         (obsd_wait): Refactor as methods of obsd_nat_target.
1281         (obsd_add_target): Delete.
1282         * obsd-nat.h: Include "inf-ptrace.h".
1283         (obsd_nat_target): New class.
1284         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1285         (the_ppc_fbsd_nat_target): New.
1286         (ppcfbsd_fetch_inferior_registers)
1287         (ppcfbsd_store_inferior_registers): Refactor as methods of
1288         ppc_fbsd_nat_target.
1289         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
1290         add_target.
1291         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1292         (the_ppc_nbsd_nat_target): New.
1293         (ppcnbsd_fetch_inferior_registers)
1294         (ppcnbsd_store_inferior_registers): Refactor as methods of
1295         ppc_nbsd_nat_target.
1296         (_initialize_ppcnbsd_nat): Adjust to C++ification.
1297         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1298         (the_ppc_obsd_nat_target): New.
1299         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1300         methods of ppc_obsd_nat_target.
1301         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
1302         add_target.
1303         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1304         (the_sh_nbsd_nat_target): New.
1305         (shnbsd_fetch_inferior_registers)
1306         (shnbsd_store_inferior_registers): Refactor as methods of
1307         sh_nbsd_nat_target.
1308         (_initialize_shnbsd_nat): Adjust to C++ification.
1309         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1310         (inf_ptrace_xfer_partial): Delete.
1311         (sparc_xfer_partial, sparc_target): Delete.
1312         * sparc-nat.h (sparc_fetch_inferior_registers)
1313         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1314         (sparc_target): Delete function declaration.
1315         (sparc_target): New template class.
1316         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1317         (_initialize_sparcnbsd_nat): Adjust to C++ification.
1318         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1319         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
1320         add_target.
1321         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1322         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1323         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1324         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
1325         add_target.
1326         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1327         (the_vax_bsd_nat_target): New.
1328         (vaxbsd_fetch_inferior_registers)
1329         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1330         methods.
1331         (_initialize_vaxbsd_nat): Adjust to C++ification.
1332
1333         * bsd-kvm.c (bsd_kvm_target): New class.
1334         (bsd_kvm_ops): Now a bsd_kvm_target.
1335         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1336         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1337         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1338         bsd_kvm_target.
1339         (bsd_kvm_return_one): Delete.
1340         (bsd_kvm_add_target): Adjust to C++ification.
1341
1342         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1343         (nto_procfs_target_procfs): New classes.
1344         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1345         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1346         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1347         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1348         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1349         (procfs_remove_hw_breakpoint, procfs_resume)
1350         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1351         (procfs_kill_inferior, procfs_store_registers)
1352         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1353         as methods of nto_procfs_target.
1354         (nto_procfs_ops): Now an nto_procfs_target_procfs.
1355         (nto_native_ops): Delete.
1356         (procfs_open, procfs_native_open): Delete.
1357         (nto_native_ops): Now an nto_procfs_target_native.
1358         (init_procfs_targets): Adjust to C++ification.
1359         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1360         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1361         Refactor as methods of nto_procfs_target.
1362
1363         * go32-nat.c (go32_nat_target): New class.
1364         (the_go32_nat_target): New.
1365         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1366         (go32_store_registers, go32_xfer_partial, go32_files_info)
1367         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1368         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1369         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1370         (go32_pid_to_str): Refactor as methods of go32_nat_target.
1371         (go32_target): Delete.
1372         (_initialize_go32_nat): Adjust to C++ification.
1373
1374         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1375         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1376         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1377         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1378         gnu_nat_target.
1379         (gnu_target): Delete.
1380         * gnu-nat.h (gnu_target): Delete.
1381         (gnu_nat_target): New class.
1382         * i386-gnu-nat.c (gnu_base_target): New.
1383         (i386_gnu_nat_target): New class.
1384         (the_i386_gnu_nat_target): New.
1385         (_initialize_i386gnu_nat): Adjust to C++ification.
1386
1387 2018-05-02  Pedro Alves  <palves@redhat.com>
1388
1389         * bfd-target.c (target_bfd_xclose): Rename to ...
1390         (target_bfd_close): ... this.
1391         (target_bfd_reopen): Adjust.
1392         * target.c (target_close): Remove references to to_xclose.
1393         * target.h (target_ops::to_xclose): Delete.
1394         (target_ops::to_close): Update comments.
1395
1396 2018-05-02  Pedro Alves  <palves@redhat.com>
1397
1398         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1399         "linux-nat.h".
1400         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1401         * inf-ptrace.c (inf_ptrace_register_u_offset)
1402         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1403         (inf_ptrace_store_register, inf_ptrace_store_registers)
1404         (inf_ptrace_trad_target): Move to ...
1405         * linux-nat-trad.c: ... this new file.
1406         * linux-nat-trad.h: New file.
1407         * linux-nat.c (linux_target_install_ops): Make extern.
1408         (linux_trad_target): Delete.
1409         * linux-nat.h (linux_trad_target): Delete declaration.
1410         (linux_target_install_ops): Declare.
1411         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1412         "linux-nat.h".
1413
1414 2018-05-02  Pedro Alves  <palves@redhat.com>
1415
1416         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1417         procfs_target/add_target here.
1418         * procfs.c (procfs_target): Make static.
1419         (_initialize_procfs): Call add_target here.
1420         * procfs.h (struct target_ops): Remove forward declaration.
1421         (procfs_target): Remove declaration.
1422         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1423
1424 2018-05-02  Pedro Alves  <palves@redhat.com>
1425
1426         * procfs.c (procfs_stopped_by_watchpoint)
1427         (procfs_insert_watchpoint, procfs_remove_watchpoint)
1428         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1429         Forward declare.
1430         (procfs_use_watchpoints): Delete, move contents...
1431         (procfs_target): ... here.
1432         * procfs.h (procfs_use_watchpoints): Delete declaration.
1433         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1434         procfs_use_watchpoints.
1435         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1436         procfs_use_watchpoints.
1437
1438 2018-05-02  Tom Tromey  <tom@tromey.com>
1439
1440         PR python/20084:
1441         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1442         and var_zuinteger_unlimited.
1443         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1444         and PARAM_ZUINTEGER_UNLIMITED.
1445         (set_parameter_value): Handle var_zuinteger and
1446         var_zuinteger_unlimited.
1447         (add_setshow_generic): Likewise.
1448         (parmpy_init): Likewise.
1449
1450 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
1451
1452         PR rust/23124
1453         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1454         pointer is not null before dereferencing it.
1455
1456 2018-04-30  Tom Tromey  <tom@tromey.com>
1457
1458         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1459         is_mi_like_p.
1460
1461 2018-04-30  Tom Tromey  <tom@tromey.com>
1462
1463         * breakpoint.c (mention): Remove use of is_mi_like_p.
1464         (print_mention_ranged_breakpoint): Likewise.
1465         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1466         of is_mi_like_p.
1467
1468 2018-04-30  Tom Tromey  <tom@tromey.com>
1469
1470         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1471
1472 2018-04-30  Tom Tromey  <tom@tromey.com>
1473
1474         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1475         (info_spu_event_command): Remove some uses of is_mi_like_p.
1476
1477 2018-04-30  Tom Tromey  <tom@tromey.com>
1478
1479         * python/py-framefilter.c (py_print_single_arg)
1480         (enumerate_locals, py_print_args, py_print_frame): Remove some
1481         uses of is_mi_like_p.
1482
1483 2018-04-30  Tom Tromey  <tom@tromey.com>
1484
1485         * ui-out.c: Update.
1486         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1487         * ui-out.h (ui_out::is_mi_like_p): Now const.
1488         (ui_out::do_is_mi_like_p): Now const.
1489         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1490
1491 2018-04-30  Tom Tromey  <tom@tromey.com>
1492
1493         * varobj.c (varobj_set_visualizer): Use new_reference.
1494         * python/python.c (gdbpy_decode_line): Use new_reference.
1495         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1496         new_reference.
1497
1498 2018-04-30  Tom Tromey  <tom@tromey.com>
1499
1500         * varobj.c (install_new_value): Use new_reference.
1501         * value.h (value_incref): Return void.  Swap intro comment with
1502         value_decref.
1503         * value.c (set_value_parent): Use new_reference.
1504         (value_incref): Return void.  Update intro comment.
1505         (release_value): Use new_reference.
1506         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1507
1508 2018-04-30  Tom Tromey  <tom@tromey.com>
1509
1510         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1511         * gdb_bfd.h (new_bfd_ref): Remove.
1512         (gdb_bfd_open): Update comment.
1513         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1514         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1515         (gdb_bfd_fdopenr): Use new_reference.
1516         * exec.c (exec_file_attach): Use new_reference.
1517
1518 2018-04-30  Tom Tromey  <tom@tromey.com>
1519
1520         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1521         method.
1522
1523 2018-04-30  Tom Tromey  <tom@tromey.com>
1524
1525         * jit.c (jit_read_code_entry): Use type_align.
1526         * i386-tdep.c (i386_gdbarch_init): Don't call
1527         set_gdbarch_long_long_align_bit.
1528         * gdbarch.sh: Remove long_long_align_bit.
1529         * gdbarch.c, gdbarch.h: Rebuild.
1530         * arc-tdep.c (arc_type_align): New function.
1531         (arc_gdbarch_init): Use arc_type_align.  Don't call
1532         set_gdbarch_long_long_align_bit.
1533
1534 2018-04-30  Tom Tromey  <tom@tromey.com>
1535
1536         * rust-lang.c (rust_type_alignment): Remove.
1537         (rust_composite_type): Use type_align.
1538
1539 2018-04-30  Tom Tromey  <tom@tromey.com>
1540
1541         * NEWS: Mention Type.align.
1542         * python/py-type.c (typy_get_alignof): New function.
1543         (type_object_getset): Add "alignof".
1544
1545 2018-04-30  Tom Tromey  <tom@tromey.com>
1546
1547         PR exp/17095:
1548         * NEWS: Update.
1549         * std-operator.def (UNOP_ALIGNOF): New operator.
1550         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1551         New.
1552         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1553         * c-lang.c (c_op_print_tab): Add alignof.
1554         * c-exp.y (ALIGNOF): New token.
1555         (exp): Add "ALIGNOF" production.
1556         (ident_tokens): Add _Alignof and alignof.
1557
1558 2018-04-30  Tom Tromey  <tom@tromey.com>
1559
1560         * i386-tdep.c (i386_type_align): New function.
1561         (i386_gdbarch_init): Update.
1562         * gdbarch.sh (type_align): New method.
1563         * gdbarch.c, gdbarch.h: Rebuild.
1564         * arch-utils.h (default_type_align): Declare.
1565         * arch-utils.c (default_type_align): New function.
1566         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1567         (struct type) <align_log2>: New field.
1568         <instance_flags>: Now a bitfield.
1569         (TYPE_RAW_ALIGN): New macro.
1570         (type_align, type_raw_align, set_type_align): Declare.
1571         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1572         functions.
1573         * dwarf2read.c (quirk_rust_enum): Set type alignment.
1574         (get_alignment, maybe_set_alignment): New functions.
1575         (read_structure_type, read_enumeration_type, read_array_type)
1576         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1577         (read_subrange_type, read_base_type): Set type alignment.
1578
1579 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
1580
1581         * dwarf2read.c (read_index_from_section): Use bool.
1582
1583 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
1584
1585         PR gdb/22950
1586         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1587         with #ifdef.
1588
1589 2018-04-29  John Reiser  <jreiser@BitWagon.com>
1590
1591         PR build/22873
1592         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1593         last step, and do it atomically.
1594
1595 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
1596
1597         * compile/compile-c-types.c (convert_int, convert_float):
1598         Update for C FE v1.
1599
1600 2018-04-27  Tom Tromey  <tom@tromey.com>
1601
1602         PR rust/22545:
1603         * rust-lang.c (rust_inclusive_range_type_p): New function.
1604         (rust_range): Handle inclusive ranges.
1605         (rust_compute_range): Likewise.
1606         * rust-exp.y (struct rust_op) <inclusive>: New field.
1607         (DOTDOTEQ): New constant.
1608         (range_expr): Add "..=" productions.
1609         (operator_tokens): Add "..=" token.
1610         (ast_range): Add "inclusive" parameter.
1611         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1612         ranges.
1613         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1614         bounds values.
1615         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1616         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1617         Update comments.
1618         * expprint.c (print_subexp_standard): Handle new bounds values.
1619         (dump_subexp_body_standard): Likewise.
1620
1621 2018-04-27  Tom Tromey  <tom@tromey.com>
1622
1623         * configure: Rebuild.
1624         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1625         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1626         "OVERRIDE".
1627         (class symbol_needs_eval_context): Likewise.
1628         * dwarf2read.c (mock_mapped_index::symbol_name_count)
1629         (mock_mapped_index::symbol_name_at): Use "override".  Remove
1630         "virtual".
1631         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1632         "override".
1633         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1634         * aarch64-tdep.c (instruction_reader::read): Use "override".
1635         (instruction_reader_test::read): Likewise.
1636         * arm-tdep.c (instruction_reader::read): Use "override".
1637         (instruction_reader_thumb::read): Likewise.
1638
1639 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
1640
1641         PR remote/9665
1642         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1643         instead of remote_send.
1644         (remote_send): Remove.
1645
1646 2018-04-26  Pedro Alves  <palves@redhat.com>
1647
1648         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1649         find_function_start_sal instead of find_pc_line.
1650
1651 2018-04-26  Pedro Alves  <palves@redhat.com>
1652
1653         * breakpoint.c (set_breakpoint_location_function): Handle
1654         mst_data_gnu_ifunc.
1655         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1656         * elfread.c (elf_symtab_read): Give data symbols with
1657         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1658         (elf_rel_plt_read): Update comment.
1659         * linespec.c (convert_linespec_to_sals): Handle
1660         mst_data_gnu_ifunc.
1661         (minsym_found): Handle mst_data_gnu_ifunc.
1662         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1663         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1664         * parse.c (find_minsym_type_and_address): Handle
1665         mst_data_gnu_ifunc.
1666         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1667         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1668         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1669         comment.
1670         <mst_data_gnu_ifunc>: New enumerator.
1671
1672 2018-04-26  Pedro Alves  <palves@redhat.com>
1673
1674         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1675         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
1676         'want_trampoline' parameter by a lookup_msym_prefer parameter.
1677         Handle it.
1678         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1679         (lookup_minimal_symbol_by_pc): Adjust.
1680         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1681         (lookup_solib_trampoline_symbol_by_pc): Adjust.
1682         * minsyms.h (lookup_msym_prefer): New enum.
1683         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1684         parameter by a lookup_msym_prefer parameter.
1685
1686 2018-04-26  Pedro Alves  <palves@redhat.com>
1687
1688         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1689         ends in "@plt" instead of looking at the symbol's section.
1690
1691 2018-04-26  Pedro Alves  <palves@redhat.com>
1692
1693         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
1694         all references.
1695         (find_pc_partial_function_gnu_ifunc): Rename to ...
1696         (find_pc_partial_function): ... this, and remove references to
1697         'is_gnu_ifunc_p'.
1698         (find_pc_partial_function): Delete old implementation.
1699         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1700
1701 2018-04-26  Pedro Alves  <palves@redhat.com>
1702
1703         * linespec.c (struct bound_minimal_symbol_search_key): New.
1704         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
1705         skip first line if we found a GNU ifunc minimal symbol by name.
1706         (compare_msymbols): Change parameters to work with a destructured
1707         lhs minsym.
1708         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1709         functions.
1710
1711 2018-04-26  Pedro Alves  <palves@redhat.com>
1712
1713         * breakpoint.c (set_breakpoint_location_function): Don't resolve
1714         ifunc targets here.  Instead, if we have an ifunc minsym, use its
1715         address/name.
1716         (add_location_to_breakpoint): Store the minsym and the objfile in
1717         the breakpoint location.
1718         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1719         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1720         Record the minsym in the sal.
1721         * symtab.h (symtab_and_line) <msymbol>: New field.
1722
1723 2018-04-26  Pedro Alves  <palves@redhat.com>
1724
1725         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1726         unless we actually resolved the ifunc.
1727
1728 2018-04-26  Pedro Alves  <palves@redhat.com>
1729
1730         * c-exp.y (variable production): Prefer ifunc minsyms over
1731         regular function symbols.
1732         * symtab.c (find_gnu_ifunc): New function.
1733         * minsyms.h (lookup_msym_prefer): New enum.
1734         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1735         parameter by a lookup_msym_prefer parameter.
1736         * symtab.h (find_gnu_ifunc): New declaration.
1737
1738 2018-04-26  Pedro Alves  <palves@redhat.com>
1739
1740         * blockframe.c (find_gnu_ifunc_target_type): New function.
1741         (find_function_type): New.
1742         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1743         return a value with a memory address.
1744         (eval_call): For calls to GNU ifunc functions, try to find the
1745         type of the target function from the type that the resolver
1746         returns.
1747         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
1748         symbols.
1749         * infcall.c (find_function_return_type): Delete.
1750         (find_function_addr): Add 'function_type' parameter.  For calls to
1751         GNU ifunc functions, try to find the type of the target function
1752         from the type that the resolver returns, and return it via
1753         FUNCTION_TYPE.
1754         (call_function_by_hand_dummy): Adjust to use the function type
1755         returned by find_function_addr.
1756         (find_function_addr): Add 'function_type' parameter and move
1757         description here.
1758         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
1759         declarations.
1760
1761 2018-04-26  Pedro Alves  <palves@redhat.com>
1762
1763         * c-exp.y (variable production): Skip finding an alias for ifunc
1764         symbols.
1765
1766 2018-04-26  Pedro Alves  <palves@redhat.com>
1767
1768         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
1769
1770 2018-04-25  Pedro Alves  <palves@redhat.com>
1771
1772         * infcmd.c (kill_command): Print the pid as string, not the whole
1773         thread's ptid.  Add comment.  s/has been killed/killed/ in output
1774         message.
1775         * remote.c (remote_detach_1): Print the pid as string, not the
1776         whole thread's ptid.
1777
1778 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1779             Sergio Durigan Junior  <sergiodj@redhat.com>
1780             Pedro Alves  <palves@redhat.com>
1781
1782         * infcmd.c (kill_command): Print message when inferior has
1783         been killed.
1784         * inferior.c (print_inferior_events): Remove 'static'.  Set as
1785         '1'.
1786         (add_inferior): Improve message printed when
1787         'print_inferior_events' is on.
1788         (exit_inferior): Remove message printed when
1789         'print_inferior_events' is on.
1790         (detach_inferior): Improve message printed when
1791         'print_inferior_events' is on.
1792         (initialize_inferiors): Use 'add_inferior_silent' to set
1793         'current_inferior_'.
1794         * inferior.h (print_inferior_events): Declare here as
1795         'extern'.
1796         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
1797         '[Detaching...]' messages when 'print_inferior_events' is on.
1798         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
1799         as prefix/suffix for messages.  Remove periods.  Fix erroneous
1800         'Detaching after fork from child...', replace it by '... from
1801         parent...'.
1802         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
1803         prefix/suffix when printing 'Detaching...' messages.  Print
1804         them when 'print_inferior_events' is on.
1805         * remote.c (remote_detach_1): Print message when detaching
1806         from inferior and '!is_fork_parent'.
1807
1808 2018-04-24  Tom Tromey  <tom@tromey.com>
1809
1810         * cli-out.h: Reindent.
1811
1812 2018-04-24  Tom Tromey  <tom@tromey.com>
1813
1814         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
1815         (cli_ui_out::do_field_string): Use fputs_filtered.
1816         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
1817
1818 2018-04-23  Tom Tromey  <tom@tromey.com>
1819
1820         * guile/scm-frame.c (gdbscm_frame_read_var): Use
1821         gdb::unique_xmalloc_ptr.
1822
1823 2018-04-23  Tom Tromey  <tom@tromey.com>
1824
1825         * configure: Rebuild.
1826
1827 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
1828
1829         PR gdb/23095
1830         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
1831         prepare_for_testing.  Set normal_bp to r_debug_state if target
1832         is bsd.
1833
1834 2018-04-21  Pedro Alves  <palves@redhat.com>
1835             Rajendra SY  <rajendra.sy@gmail.com>
1836
1837         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
1838         * remote.c (extended_remote_attach): In all-stop mode, mark the
1839         thread as executing.
1840
1841 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1842
1843         * thread.c (thread_apply_all_command): Fix comment.
1844         (thread_command): Fix comment.
1845
1846 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
1847
1848         * common/tdesc.h (tdesc_create_feature): Remove xml filename
1849         parameter.
1850         * features/aarch64-core.c (create_feature_aarch64_core):
1851         Regenerate.
1852         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
1853         Likewise.
1854         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
1855         Likewise.
1856         * features/i386/32bit-avx512.c
1857         (create_feature_i386_32bit_avx512): Likewise.
1858         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
1859         Likewise.
1860         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
1861         Likewise.
1862         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
1863         Likewise.
1864         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
1865         Likewise.
1866         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
1867         Likewise.
1868         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
1869         Likewise.
1870         * features/i386/64bit-avx512.c
1871         (create_feature_i386_64bit_avx512): Likewise.
1872         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
1873         Likewise.
1874         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
1875         Likewise.
1876         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
1877         Likewise.
1878         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
1879         Likewise.
1880         * features/i386/64bit-segments.c
1881         (create_feature_i386_64bit_segments): Likewise.
1882         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
1883         Likewise.
1884         * features/i386/x32-core.c
1885         (create_feature_i386_x32_core): Likewise.
1886         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
1887         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
1888         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
1889         * target-descriptions.c: In generated code, don't pass xml
1890         filename.
1891
1892 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1893
1894         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
1895         (print_xml_feature::visit_post): Likewise.
1896         (print_xml_feature::visit): Likewise.
1897         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
1898         (print_xml_feature): Add new class.
1899         * regformats/regdat.sh: Null xmltarget on feature targets.
1900         * target-descriptions.c (struct target_desc): Add xmltarget.
1901         (maintenance_check_tdesc_xml_convert): Add unittest function.
1902         (tdesc_get_features_xml): Add function to get xml.
1903         (maintenance_check_xml_descriptions): Test xml generation.
1904         * xml-tdesc.c (string_read_description_xml): Add function.
1905         * xml-tdesc.h (string_read_description_xml): Add declaration.
1906
1907 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1908
1909         * features/Makefile: Add feature marker to targets with new style
1910         target descriptions.
1911         * regformats/aarch64.dat: Regenerate.
1912         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
1913         * regformats/i386/amd64-avx-linux.dat: Likewise.
1914         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
1915         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
1916         * regformats/i386/amd64-linux.dat: Likewise.
1917         * regformats/i386/amd64-mpx-linux.dat: Likewise.
1918         * regformats/i386/amd64.dat: Likewise.
1919         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
1920         * regformats/i386/i386-avx-linux.dat: Likewise.
1921         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
1922         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
1923         * regformats/i386/i386-linux.dat: Likewise.
1924         * regformats/i386/i386-mmx-linux.dat: Likewise.
1925         * regformats/i386/i386-mpx-linux.dat: Likewise.
1926         * regformats/i386/i386.dat: Likewise.
1927         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
1928         * regformats/i386/x32-avx-linux.dat: Likewise.
1929         * regformats/i386/x32-linux.dat: Likewise.
1930         * regformats/tic6x-c62x-linux.dat: Likewise.
1931         * regformats/tic6x-c64x-linux.dat: Likewise.
1932         * regformats/tic6x-c64xp-linux.dat: Likewise.
1933         * regformats/regdat.sh: Parse feature marker.
1934
1935 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1936
1937         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
1938         (tdesc_osabi_name): Likewise.
1939         * target-descriptions.c (tdesc_architecture_name): Add new
1940         function.
1941         (tdesc_osabi_name): Likewise.
1942
1943 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1944
1945         * common/tdesc.c (tdesc_predefined_type): Move to here.
1946         (tdesc_named_type): Likewise.
1947         (tdesc_create_vector): Likewise.
1948         (tdesc_create_struct): Likewise.
1949         (tdesc_set_struct_size): Likewise.
1950         (tdesc_create_union): Likewise.
1951         (tdesc_create_flags): Likewise.
1952         (tdesc_create_enum): Likewise.
1953         (tdesc_add_field): Likewise.
1954         (tdesc_add_typed_bitfield): Likewise.
1955         (tdesc_add_bitfield): Likewise.
1956         (tdesc_add_flag): Likewise.
1957         (tdesc_add_enum_value): Likewise.
1958         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
1959         (struct tdesc_type_vector): Likewise.
1960         (struct tdesc_type_field): Likewise.
1961         (struct tdesc_type_with_fields): Likewise.
1962         (tdesc_create_enum): Add declaration.
1963         (tdesc_add_typed_bitfield): Likewise.
1964         (tdesc_add_enum_value): Likewise.
1965         * target-descriptions.c (tdesc_type_field): Move from here.
1966         (tdesc_type_builtin): Likewise.
1967         (tdesc_type_vector): Likewise.
1968         (tdesc_type_with_fields): Likewise.
1969         (tdesc_predefined_types): Likewise.
1970         (tdesc_named_type): Likewise.
1971         (tdesc_create_vector): Likewise.
1972         (tdesc_create_struct): Likewise.
1973         (tdesc_set_struct_size): Likewise.
1974         (tdesc_create_union): Likewise.
1975         (tdesc_create_flags): Likewise.
1976         (tdesc_create_enum): Likewise.
1977         (tdesc_add_field): Likewise.
1978         (tdesc_add_typed_bitfield): Likewise.
1979         (tdesc_add_bitfield): Likewise.
1980         (tdesc_add_flag): Likewise.
1981         (tdesc_add_enum_value): Likewise.
1982         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
1983         (tdesc_add_typed_bitfield): Likewise.
1984         (tdesc_add_enum_value): Likewise.
1985
1986 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1987
1988         * common/tdesc.c (tdesc_feature::accept): Move to here.
1989         (tdesc_feature::operator==): Likewise.
1990         (tdesc_create_reg): Likewise.
1991         * common/tdesc.h (tdesc_type_kind): Likewise.
1992         (struct tdesc_type): Likewise.
1993         (struct tdesc_feature): Likewise.
1994         * regformats/regdat.sh: Create a feature.
1995         * target-descriptions.c (tdesc_type_kind): Move from here.
1996         (tdesc_type): Likewise.
1997         (tdesc_type_up): Likewise.
1998         (tdesc_feature): Likewise.
1999         (tdesc_create_reg): Likewise.
2000
2001 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2002
2003         * Makefile.in: Add arch/tdesc.c
2004         * common/tdesc.c: New file.
2005         * common/tdesc.h (tdesc_element_visitor): Move to here.
2006         (tdesc_element): Likewise.
2007         (tdesc_reg): Likewise.
2008         (tdesc_reg_up): Likewise.
2009         * regformats/regdef.h (reg): Add offset to constructors.
2010         * target-descriptions.c (tdesc_element_visitor): Move from here.
2011         (tdesc_element): Likewise.
2012         (tdesc_reg): Likewise.
2013         (tdesc_reg_up): Likewise.
2014
2015 2018-04-17  Tom Tromey  <tom@tromey.com>
2016
2017         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2018         discriminant field.
2019
2020 2018-04-17  Tom Tromey  <tom@tromey.com>
2021
2022         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2023
2024 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2025
2026         * symtab.c (print_symbol_info): Skip printing filename and line
2027         number when `last' is NULL.
2028         (symtab_symbol_info): Use empty string instead of NULL for first
2029         invocation of print_symbol_info.
2030         (rbreak_command): Pass NULL to `last' parameter of
2031         print_symbol_info.
2032
2033 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
2034
2035         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2036         instead of nullptr.
2037
2038 2018-04-16  Pedro Alves  <palves@redhat.com>
2039
2040         * MAINTAINERS (sh): Remove.
2041         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2042         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2043         (ALLDEPFILES): Remove sh64-tdep.c.
2044         * NEWS: Mentions that support for SH-5/SH64 is removed.
2045         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2046         (sh*-*-openbsd*): Ditto.
2047         (sh64-*-elf*): Remove.
2048         (sh*): Remove.
2049         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2050         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2051         * sh-tdep.c: No longer include "sh64-tdep.h".
2052         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2053         * sh64-tdep.c, sh64-tdep.h: Remove files.
2054
2055 2018-04-16  Pedro Alves  <palves@redhat.com>
2056
2057         * MAINTAINERS: Remove m88k.
2058         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2059         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2060         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2061         * NEWS: Mention that support for m88k was removed.
2062         * configure.host (m88*-*-*): Remove support.
2063         * configure.nat (m88k-*-*): Remove support.
2064         * configure.tgt (m88*-*-openbsd*): Remove.
2065         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2066
2067 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
2068
2069         * configure.tgt (x86_tobjs): New variable.
2070         (amd64_tobjs, i386_tobjs): Use it.
2071
2072 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2073
2074         * symtab.c (print_symbol_info): Precede the symbol definition by
2075         the line number when available.
2076         * NEWS: Advertise this enhancement.
2077
2078 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2079
2080         * NEWS (New options): announce set/show record btrace cpu.
2081         * btrace.c: Include record-btrace.h.
2082         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2083         the vendor is unknown.
2084         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
2085         Maybe overwrite the btrace configuration's cpu.
2086         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
2087         (btrace_fetch): Add cpu parameter.  Update callers.
2088         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2089         Maybe overwrite the btrace configuration's cpu.  Skip enabling
2090         errata workarounds if the vendor is unknown.
2091         * python/py-record-btrace.c: Include record-btrace.h.
2092         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2093         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2094         * record-btrace.c (record_btrace_cpu_state_kind): New.
2095         (record_btrace_cpu): New.
2096         (set_record_btrace_cpu_cmdlist): New.
2097         (record_btrace_get_cpu): New.
2098         (require_btrace_thread, record_btrace_info)
2099         (record_btrace_resume_thread): Call record_btrace_get_cpu.
2100         (cmd_set_record_btrace_cpu_none): New.
2101         (cmd_set_record_btrace_cpu_auto): New.
2102         (cmd_set_record_btrace_cpu): New.
2103         (cmd_show_record_btrace_cpu): New.
2104         (_initialize_record_btrace): Initialize set/show record btrace cpu
2105         commands.
2106         * record-btrace.h (record_btrace_get_cpu): New.
2107
2108 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2109
2110         * record.c (set_record_command): Fix typo in message.
2111
2112 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2113
2114         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2115
2116 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2117
2118         * infrun.c (process_event_stop_test): Call
2119         gdbarch_in_indirect_branch_thunk.
2120         * gdbarch.sh (in_indirect_branch_thunk): New.
2121         * gdbarch.c: Regenerated.
2122         * gdbarch.h: Regenerated.
2123         * x86-tdep.h: New.
2124         * x86-tdep.c: New.
2125         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2126         (HFILES_NO_SRCDIR): Add x86-tdep.h.
2127         (ALLDEPFILES): Add x86-tdep.c.
2128         * arch-utils.h (default_in_indirect_branch_thunk): New.
2129         * arch-utils.c (default_in_indirect_branch_thunk): New.
2130         * i386-tdep: Include x86-tdep.h.
2131         (i386_in_indirect_branch_thunk): New.
2132         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2133         function.
2134         * amd64-tdep: Include x86-tdep.h.
2135         (amd64_in_indirect_branch_thunk): New.
2136         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2137
2138 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
2139
2140         PR gdb/23053
2141         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2142         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2143         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2144         regression.
2145
2146 2018-04-12  Tom Tromey  <tom@tromey.com>
2147
2148         * rust-lang.c (rust_print_struct_def): Remove univariant code.
2149         (rust_evaluate_subexp): Likewise.
2150
2151 2018-04-12  Pedro Alves  <palves@redhat.com>
2152
2153         * procfs.c (procfs_detach): Make forward declaration's prototype
2154         match definition's protototype.
2155         (proc_get_LDT_entry): Remove stale do_cleanups call.
2156
2157 2018-04-12  Pedro Alves  <palves@redhat.com>
2158
2159         * target.h (target_ops::to_has_exited): Delete.
2160         (target_has_exited): Delete.
2161         * target-delegates.c: Regenerate.
2162
2163 2018-04-11  Pedro Alves  <palves@redhat.com>
2164
2165         * target.c (fileio_fh_t::t): Add comment.
2166         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2167         (target_fileio_close): Handle a NULL target.
2168         (invalidate_fileio_fh): New.
2169         (target_close): Call it.
2170         * remote.c (remote_hostio_send_command): No longer check whether
2171         remote_desc is open.
2172
2173 2018-04-11  Pedro Alves  <palves@redhat.com>
2174
2175         * target.c (fileio_fh_t): Make it a named struct instead of a
2176         typedef.
2177         (fileio_fh_t::is_closed): New method.
2178         (DEF_VEC_O (fileio_fh_t)): Remove.
2179         (fileio_fhandles): Now a std::vector.
2180         (is_closed_fileio_fh): Delete.
2181         (acquire_fileio_fd): Adjust.  Rename parameters.
2182         (release_fileio_fd): Adjust.
2183         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2184         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2185         (target_fileio_close): Adjust.
2186
2187 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
2188
2189         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2190         index.
2191
2192 2018-04-10  Pedro Alves  <palves@redhat.com>
2193
2194         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2195         (scoped_finish_thread_state): New class.
2196         * infcmd.c (run_command_1): Use it instead of finish_thread_state
2197         cleanup.
2198         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2199         (fetch_inferior_event, normal_stop): Likewise.
2200         * thread.c (finish_thread_state_cleanup): Delete.
2201
2202 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2203             Pedro Alves  <palves@redhat.com>
2204
2205         * value.c: Include "selftest.h" and "common/array-view.h".
2206         (struct range) <operator ==>: New.
2207         (test_ranges_contain): New.
2208         (check_ranges_vector): New.
2209         (test_insert_into_bit_range_vector): New.
2210         (_initialize_values): Register selftests.
2211         * common/array-view.h (operator==, operator!=): New.
2212
2213 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2214
2215         * common/gdb_vecs.h (unordered_remove): Add overload that takes
2216         an iterator.
2217         * inline-frame.c: Include <algorithm>.
2218         (struct inline_state): Add constructor.
2219         (inline_state_s): Remove.
2220         (DEF_VEC_O(inline_state_s)): Remove.
2221         (inline_states): Change type to std::vector.
2222         (find_inline_frame_state): Adjust to std::vector.
2223         (allocate_inline_frame_state): Remove.
2224         (clear_inline_frame_state): Adjust to std::vector.
2225         (skip_inline_frames): Adjust to std::vector.
2226
2227 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2228
2229         * tracepoint.h (struct trace_state_variable): Add constructor.
2230         <name>: Change type to std::string.
2231         * tracepoint.c (tsv_s): Remove.
2232         (DEF_VEC_O(tsv_s)): Remove.
2233         (tvariables): Change to std::vector.
2234         (create_trace_state_variable): Adjust to std::vector.
2235         (find_trace_state_variable): Likewise.
2236         (find_trace_state_variable_by_number): Likewise.
2237         (delete_trace_state_variable): Likewise.
2238         (trace_variable_command): Adjust to std::string.
2239         (delete_trace_variable_command): Likewise.
2240         (tvariables_info_1): Adjust to std::vector.
2241         (save_trace_state_variables): Likewise.
2242         (start_tracing): Likewise.
2243         (merge_uploaded_trace_state_variables): Adjust to std::vector
2244         and std::string.
2245         * target.h (struct target_ops)
2246         <to_download_trace_state_variable>: Pass reference to
2247         trace_state_variable.
2248         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2249         * target-delegates.c: Re-generate.
2250         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2251         (mi_tsv_deleted): Likewise.
2252         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2253         * remote.c (remote_download_trace_state_variable): Change
2254         pointer to reference and adjust.
2255         * make-target-delegates (parse_argtypes): Handle references.
2256         (write_function_header): Likewise.
2257         (munge_type): Likewise.
2258
2259 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2260
2261         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2262         string_view-selftests.c.
2263         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2264         testsuite.
2265         * unittests/basic_string_view/cons/char/1.cc: Likewise.
2266         * unittests/basic_string_view/cons/char/2.cc: Likewise.
2267         * unittests/basic_string_view/cons/char/3.cc: Likewise.
2268         * unittests/basic_string_view/element_access/char/1.cc:
2269         Likewise.
2270         * unittests/basic_string_view/element_access/char/empty.cc:
2271         Likewise.
2272         * unittests/basic_string_view/element_access/char/front_back.cc:
2273         Likewise.
2274         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2275         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2276         Likewise.
2277         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2278         Likewise.
2279         * unittests/basic_string_view/modifiers/swap/char/1.cc:
2280         Likewise.
2281         * unittests/basic_string_view/operations/compare/char/1.cc:
2282         Likewise.
2283         * unittests/basic_string_view/operations/compare/char/13650.cc:
2284         Likewise.
2285         * unittests/basic_string_view/operations/copy/char/1.cc:
2286         Likewise.
2287         * unittests/basic_string_view/operations/data/char/1.cc:
2288         Likewise.
2289         * unittests/basic_string_view/operations/find/char/1.cc:
2290         Likewise.
2291         * unittests/basic_string_view/operations/find/char/2.cc:
2292         Likewise.
2293         * unittests/basic_string_view/operations/find/char/3.cc:
2294         Likewise.
2295         * unittests/basic_string_view/operations/find/char/4.cc:
2296         Likewise.
2297         * unittests/basic_string_view/operations/rfind/char/1.cc:
2298         Likewise.
2299         * unittests/basic_string_view/operations/rfind/char/2.cc:
2300         Likewise.
2301         * unittests/basic_string_view/operations/rfind/char/3.cc:
2302         Likewise.
2303         * unittests/basic_string_view/operations/substr/char/1.cc:
2304         Likewise.
2305         * unittests/basic_string_view/operators/char/2.cc: Likewise.
2306         * unittests/string_view-selftests.c: New file.
2307
2308 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2309
2310         * unittests/basic_string_view/capacity/1.cc: New file.
2311         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2312         * unittests/basic_string_view/cons/char/1.cc: New file.
2313         * unittests/basic_string_view/cons/char/2.cc: New file.
2314         * unittests/basic_string_view/cons/char/3.cc: New file.
2315         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2316         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2317         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2318         * unittests/basic_string_view/element_access/char/1.cc: New file.
2319         * unittests/basic_string_view/element_access/char/2.cc: New file.
2320         * unittests/basic_string_view/element_access/char/empty.cc: New file.
2321         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2322         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2323         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2324         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2325         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2326         * unittests/basic_string_view/include.cc: New file.
2327         * unittests/basic_string_view/inserters/char/1.cc: New file.
2328         * unittests/basic_string_view/inserters/char/2.cc: New file.
2329         * unittests/basic_string_view/inserters/char/3.cc: New file.
2330         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2331         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2332         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2333         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2334         * unittests/basic_string_view/literals/types.cc: New file.
2335         * unittests/basic_string_view/literals/values.cc: New file.
2336         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2337         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2338         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2339         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2340         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2341         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2342         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2343         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2344         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2345         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2346         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2347         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2348         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2349         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2350         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2351         * unittests/basic_string_view/operations/data/char/1.cc: New file.
2352         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2353         * unittests/basic_string_view/operations/find/char/1.cc: New file.
2354         * unittests/basic_string_view/operations/find/char/2.cc: New file.
2355         * unittests/basic_string_view/operations/find/char/3.cc: New file.
2356         * unittests/basic_string_view/operations/find/char/4.cc: New file.
2357         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2358         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2359         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2360         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2361         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2362         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2363         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2364         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2365         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2366         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2367         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2368         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2369         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2370         * unittests/basic_string_view/operators/char/2.cc: New file.
2371         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2372         * unittests/basic_string_view/range_access/char/1.cc: New file.
2373         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2374         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2375         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2376         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2377         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2378         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2379         * unittests/basic_string_view/requirements/typedefs.cc: New file.
2380         * unittests/basic_string_view/typedefs.cc: New file.
2381         * unittests/basic_string_view/types/1.cc: New file.
2382
2383 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2384
2385         * common/gdb_string_view.h: Remove libstdc++ implementation
2386         details, adjust to gdb reality.
2387         * common/gdb_string_view.tcc: Likewise.
2388         * cli/cli-script.c (struct string_view): Remove.
2389         (user_args) <m_args>: Change element type to gdb::string_view.
2390         (user_args::insert_args): Adjust.
2391
2392 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2393
2394         * common/gdb_string_view.h: New file.
2395         * common/gdb_string_view.tcc: New file.
2396
2397 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2398
2399         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2400         * configure: Re-generate.
2401
2402 2018-04-09  Pedro Alves  <palves@redhat.com>
2403
2404         * gdbarch.sh: Include "observable.h" instead of "observer.h".
2405         (set_target_gdbarch): Call
2406         gdb::observers::architecture_changed.notify instead of
2407         observer_notify_architecture_changed.
2408
2409 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2410
2411         * tracepoint.c (struct current_traceframe_cleanup): Remove.
2412         (do_restore_current_traceframe_cleanup): Remove.
2413         (restore_current_traceframe_cleanup_dtor): Remove.
2414         (make_cleanup_restore_current_traceframe): Remove.
2415         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2416         New.
2417         * tracepoint.h (struct scoped_restore_current_traceframe): New.
2418         * infrun.c (fetch_inferior_event): Use
2419         scoped_restore_current_traceframe.
2420
2421 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2422
2423         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2424         Remove.
2425         <n_allocated_type_units>: Remove.
2426         <all_type_units>: Change to std::vector.
2427         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2428         to std::vector change.
2429         (dwarf2_per_objfile::get_cutu): Likewise.
2430         (dwarf2_per_objfile::get_tu): Likewise.
2431         (create_signatured_type_table_from_index): Likewise.
2432         (create_signatured_type_table_from_debug_names): Likewise.
2433         (dw2_symtab_iter_next): Likewise.
2434         (dw2_print_stats): Likewise.
2435         (dw2_expand_all_symtabs): Likewise.
2436         (dw2_expand_marked_cus): Likewise.
2437         (dw2_debug_names_iterator::next): Likewise.
2438         (dwarf2_initialize_objfile): Likewise.
2439         (add_signatured_type_cu_to_table): Likewise.
2440         (create_all_type_units): Likewise.
2441         (add_type_unit): Likewise.
2442         (struct tu_abbrev_offset): Add constructor.
2443         (build_type_psymtabs_1): Adjust to std::vector change.
2444         (print_tu_stats): Likewise.
2445         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2446         (write_debug_names): Likewise.
2447
2448 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2449
2450         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2451         Make an std::vector.
2452         <n_comp_units>: Remove.
2453         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2454         to std::vector change.
2455         (dwarf2_per_objfile::get_cutu): Likewise.
2456         (dwarf2_per_objfile::get_cu): Likewise.
2457         (create_cus_from_index): Likewise.
2458         (create_addrmap_from_index): Likewise.
2459         (create_addrmap_from_aranges): Likewise.
2460         (dwarf2_read_index): Likewise.
2461         (dw2_find_last_source_symtab): Likewise.
2462         (dw2_map_symtabs_matching_filename): Likewise.
2463         (dw2_symtab_iter_next): Likewise.
2464         (dw2_print_stats): Likewise.
2465         (dw2_expand_all_symtabs): Likewise.
2466         (dw2_expand_symtabs_with_fullname): Likewise.
2467         (dw2_expand_marked_cus): Likewise.
2468         (dw2_map_symbol_filenames): Likewise.
2469         (create_cus_from_debug_names): Likewise.
2470         (dwarf2_read_debug_names): Likewise.
2471         (dw2_debug_names_iterator::next): Likewise.
2472         (dwarf2_initialize_objfile): Likewise.
2473         (set_partial_user): Likewise.
2474         (dwarf2_build_psymtabs_hard): Likewise.
2475         (read_comp_units_from_section): Remove arguments, adjust to
2476         std::vector change.
2477         (create_all_comp_units): Adjust to std::vector and
2478         read_comp_units_from_section changes.
2479         (dwarf2_find_containing_comp_unit): Adjust to std::vector
2480         change.
2481         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2482         (psyms_seen_size): Likewise.
2483         (write_gdbindex): Likewise.
2484         (write_debug_names): Likewise.
2485
2486 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2487
2488         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2489         with dwarf2_per_objfile.
2490         (create_cus_from_index): Likewise.
2491         (create_signatured_type_table_from_index): Likewise.
2492         (dwarf2_read_index): Likewise.
2493         (dwarf2_initialize_objfile): Likewise.
2494         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
2495         per_cu rather than get_dwarf2_per_objfile.
2496
2497 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2498
2499         * dwarf2read.h (struct signatured_type): Forward declare.
2500         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2501         New methods.
2502         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2503         (dw2_get_cutu): ...this.
2504         (dwarf2_per_objfile::get_cu): Rename from...
2505         (dw2_get_cu): ...this.
2506         (dwarf2_per_objfile::get_tu): New.
2507         (create_addrmap_from_index): Adjust.
2508         (create_addrmap_from_aranges): Adjust.
2509         (dw2_find_last_source_symtab): Adjust.
2510         (dw2_map_symtabs_matching_filename): Adjust.
2511         (dw2_symtab_iter_next): Adjust.
2512         (dw2_print_stats): Adjust.
2513         (dw2_expand_all_symtabs): Adjust.
2514         (dw2_expand_symtabs_with_fullname): Adjust.
2515         (dw2_expand_marked_cus): Adjust.
2516         (dw_expand_symtabs_matching_file_matcher): Adjust.
2517         (dw2_map_symbol_filenames): Adjust.
2518         (dw2_debug_names_iterator::next): Adjust.
2519         (dwarf2_initialize_objfile): Adjust.
2520         (set_partial_user): Adjust.
2521         (dwarf2_build_psymtabs_hard): Adjust.
2522
2523 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2524
2525         * dwarf2read.c (create_signatured_type_table_from_debug_names):
2526         Remove unused variables.
2527         (dw2_map_symtabs_matching_filename): Likewise.
2528         (dwarf2_record_block_ranges): Likewise.
2529         (dwarf2_read_addr_index): Likewise.
2530         (follow_die_offset): Likewise.
2531
2532 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2533
2534         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2535         to symbol_file_add_main.
2536
2537 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2538
2539         PR mi/22299
2540         * mi/mi-console.c (do_fputc_async_safe): New.
2541         (mi_console_file::write_async_safe): New.
2542         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2543         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2544         New.
2545         * ui-file.c (ui_file::putstrn): Adjust call to
2546         fputstrn_unfiltered.
2547         * utils.c (printchar): Replace do_fputs and do_fprintf
2548         parameters by do_fputc.
2549         (fputstr_filtered): Adjust call to printchar.
2550         (fputstr_unfiltered): Likewise.
2551         (fputstrn_filtered): Likewise.
2552         (fputstrn_unfiltered): Add do_fputc parameter, pass to
2553         printchar.
2554         * utils.h (do_fputc_ftype): New typedef.
2555         (fputstrn_unfiltered): Add do_fputc parameter.
2556
2557 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2558
2559         * regformats/i386/i386-avx.dat: Remove.
2560
2561 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2562
2563         PR gdb/22979
2564         * amd64-tdep.c (amd64_none_init_abi): New function.
2565         (amd64_x32_none_init_abi): New function.
2566         (_initialize_amd64_tdep): Register handlers for x86-64 and
2567         x64_32 with GDB_OSABI_NONE.
2568         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2569         GDB_OSABI_NONE osabi.
2570
2571 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2572
2573         PR gdb/22980
2574         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2575         GDB_OSABI_NONE.
2576         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2577         * osabi.c (gdb_osabi_names): Add "unknown" entry.
2578
2579 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2580
2581         * common/byte-vector.h (char_vector): New type.
2582         * target.h (target_read_alloc): Return
2583         gdb::optional<byte_vector>.
2584         (target_read_stralloc): Return gdb::optional<char_vector>.
2585         (target_get_osdata): Return gdb::optional<char_vector>.
2586         * target.c (target_read_alloc_1): Templatize.  Replacement
2587         manual memory management with vector.
2588         (target_read_alloc): Change return type, adjust.
2589         (target_read_stralloc): Change return type, adjust.
2590         (target_get_osdata): Change return type, adjust.
2591         * auxv.c (struct auxv_info) <length>: Remove.
2592         <data>: Change type to gdb::optional<byte_vector>.
2593         (auxv_inferior_data_cleanup): Free auxv_info with delete.
2594         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2595         (target_auxv_search): Adjust.
2596         (fprint_target_auxv): Adjust.
2597         * avr-tdep.c (avr_io_reg_read_command): Adjust.
2598         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2599         (linux_make_corefile_notes): Adjust.
2600         * osdata.c (get_osdata): Adjust.
2601         * remote.c (remote_get_threads_with_qxfer): Adjust.
2602         (remote_memory_map): Adjust.
2603         (remote_traceframe_info): Adjust.
2604         (btrace_read_config): Adjust.
2605         (remote_read_btrace): Adjust.
2606         (remote_pid_to_exec_file): Adjust.
2607         * solib-aix.c (solib_aix_get_library_list): Adjust.
2608         * solib-dsbt.c (decode_loadmap): Don't free buf.
2609         (dsbt_get_initial_loadmaps): Adjust.
2610         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2611         * solib-target.c (solib_target_current_sos): Adjust.
2612         * tracepoint.c (sdata_make_value): Adjust.
2613         * xml-support.c (xinclude_start_include): Adjust.
2614         (xml_fetch_content_from_file): Adjust.
2615         * xml-support.h (xml_fetch_another): Change return type.
2616         (xml_fetch_content_from_file): Change return type.
2617         * xml-syscall.c (xml_init_syscalls_info): Adjust.
2618         * xml-tdesc.c (file_read_description_xml): Adjust.
2619         (fetch_available_features_from_target): Change return type.
2620         (target_fetch_description_xml): Adjust.
2621         (target_read_description_xml): Adjust.
2622
2623 2018-04-06  Tom Tromey  <tom@tromey.com>
2624
2625         * value.c (~value): Update.
2626         (struct value) <contents>: Now unique_xmalloc_ptr.
2627         (value_contents_bits_eq, allocate_value_contents)
2628         (value_contents_raw, value_contents_all_raw)
2629         (value_contents_for_printing, value_contents_for_printing_const)
2630         (set_value_enclosing_type): Update.
2631
2632 2018-04-06  Tom Tromey  <tom@tromey.com>
2633
2634         * value.c (range_s): Remove typedef, VEC.
2635         (struct range): Add operator<.
2636         (range_lessthan): Remove.
2637         (ranges_contain): Change type.
2638         (~value): Update.
2639         (struct value) <unavailable, optimized_out>: Now std::vector.
2640         (value_entirely_available)
2641         (value_entirely_covered_by_range_vector)
2642         (value_entirely_unavailable, value_entirely_optimized_out):
2643         Update.
2644         (insert_into_bit_range_vector): Change argument type.
2645         (find_first_range_overlap): Likewise.
2646         (struct ranges_and_idx, value_contents_bits_eq)
2647         (require_not_optimized_out, require_available): Update.
2648         (ranges_copy_adjusted): Change argument types.
2649         (value_optimized_out, value_copy, value_fetch_lazy): Update.
2650
2651 2018-04-06  Tom Tromey  <tom@tromey.com>
2652
2653         * value.c (~value): Update.
2654         (struct value) <parent>: Now a value_ref_ptr.
2655         (value_parent, set_value_parent, value_address, value_copy):
2656         Update.
2657
2658 2018-04-06  Tom Tromey  <tom@tromey.com>
2659
2660         * value.c (struct value): Add constructor, destructor, and member
2661         initializers.
2662         (allocate_value_lazy, value_decref): Update.
2663
2664 2018-04-06  Tom Tromey  <tom@tromey.com>
2665
2666         * value.c (struct value) <released, next>: Remove.
2667         (all_values): Now a std::vector.
2668         (allocate_value_lazy): Update.
2669         (value_next): Remove.
2670         (value_mark, value_free_to_mark, release_value)
2671         (value_release_to_mark): Update.
2672
2673 2018-04-06  Tom Tromey  <tom@tromey.com>
2674
2675         * value.h (fetch_subexp_value, value_release_to_mark): Update.
2676         (free_value_chain): Remove.
2677         * value.c (free_value_chain): Remove.
2678         (value_release_to_mark): Return a std::vector.
2679         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2680         std::vector.
2681         (check_condition): Update.
2682         * eval.c (fetch_subexp_value): Change "val_chain" to a
2683         std::vector.
2684         * breakpoint.c (update_watchpoint): Update.
2685         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2686
2687 2018-04-06  Tom Tromey  <tom@tromey.com>
2688
2689         * value.h (free_all_values): Remove.
2690         * value.c (free_all_values): Remove.
2691
2692 2018-04-06  Tom Tromey  <tom@tromey.com>
2693
2694         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2695         (value_history_chain, value_history_count): Remove.
2696         (value_history): New global.
2697         (record_latest_value, access_value_history, show_values)
2698         (preserve_values): Update.
2699
2700 2018-04-06  Tom Tromey  <tom@tromey.com>
2701
2702         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2703         * varobj.c (varobj_set_display_format, varobj_set_value)
2704         (install_default_visualizer, construct_visualizer)
2705         (install_new_value, ~varobj, varobj_get_value_type)
2706         (my_value_of_variable, varobj_editable_p): Update.
2707         * c-varobj.c (c_describe_child, c_value_of_variable)
2708         (cplus_number_of_children, cplus_describe_child): Update.
2709         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2710         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2711         (ada_value_of_variable, ada_value_is_changeable_p): Update.
2712
2713 2018-04-06  Tom Tromey  <tom@tromey.com>
2714
2715         * printcmd.c (last_examine_address): Change type to
2716         value_ref_ptr.
2717         (do_examine, x_command): Update.
2718
2719 2018-04-06  Tom Tromey  <tom@tromey.com>
2720
2721         * value.c (release_value): Update.
2722         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2723         (struct bpstats) <val>: Now a value_ref_ptr.
2724         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2725         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2726         (~watchpoint, print_it_watchpoint, watch_command_1)
2727         (invalidate_bp_value_on_memory_change): Update.
2728
2729 2018-04-06  Tom Tromey  <tom@tromey.com>
2730
2731         * varobj.c (varobj_clear_saved_item)
2732         (update_dynamic_varobj_children, install_new_value, ~varobj):
2733         Update.
2734         * value.h (value_incref): Move declaration earlier.
2735         (value_decref): Rename from value_free.
2736         (struct value_ref_policy): New.
2737         (value_ref_ptr): New typedef.
2738         (struct value_deleter): Remove.
2739         (gdb_value_up): Remove typedef.
2740         (release_value): Change return type.
2741         (release_value_or_incref): Remove.
2742         * value.c (set_value_parent): Update.
2743         (value_incref): Change return type.
2744         (value_decref): Rename from value_free.
2745         (value_free_to_mark, free_all_values, free_value_chain): Update.
2746         (release_value): Return value_ref_ptr.
2747         (release_value_or_incref): Remove.
2748         (record_latest_value, set_internalvar, clear_internalvar):
2749         Update.
2750         * stack.c (info_frame_command): Don't call value_free.
2751         * python/py-value.c (valpy_dealloc, valpy_new)
2752         (value_to_value_object): Update.
2753         * printcmd.c (do_examine): Update.
2754         * opencl-lang.c (lval_func_free_closure): Update.
2755         * mi/mi-main.c (register_changed_p): Don't call value_free.
2756         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
2757         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
2758         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
2759         value_free.
2760         * guile/scm-value.c (vlscm_free_value_smob)
2761         (vlscm_scm_from_value): Update.
2762         * frame.c (frame_register_unwind, frame_unwind_register_signed)
2763         (frame_unwind_register_unsigned, get_frame_register_bytes)
2764         (put_frame_register_bytes): Don't call value_free.
2765         * findvar.c (address_from_register): Don't call value_free.
2766         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
2767         * dwarf2loc.c (entry_data_value_free_closure)
2768         (value_of_dwarf_reg_entry, free_pieced_value_closure)
2769         (dwarf2_evaluate_loc_desc_full): Update.
2770         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2771         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2772         (~watchpoint, watch_command_1)
2773         (invalidate_bp_value_on_memory_change): Update.
2774         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
2775
2776 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
2777
2778         PR gdb/23022
2779         * warning.m4: Add -Wno-error=deprecated-register.
2780         * configure: Re-generate.
2781
2782 2018-04-05  Tom Tromey  <tom@tromey.com>
2783
2784         * linespec.h: Remove include of "vec.h".
2785
2786 2018-04-05  Tom Tromey  <tom@tromey.com>
2787
2788         * linespec.c (typep): Remove typedef.
2789         (find_methods, find_superclass_methods): Take a std::vector.
2790         (find_method): Use std::vector.
2791
2792 2018-04-05  Tom Tromey  <tom@tromey.com>
2793
2794         * utils.c (compare_strings): Remove.
2795         * utils.h (compare_strings): Remove.
2796         * objc-lang.h (find_imps): Update.
2797         * objc-lang.c (find_methods): Take a std::vector.
2798         (uniquify_strings, find_imps): Likewise.
2799         * linespec.c (find_methods): Take a std::vector.
2800         (decode_objc): Use std::vector.
2801         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
2802         a std::vector.
2803         (find_method, find_function_symbols): Use std::vector.
2804
2805 2018-04-05  Tom Tromey  <tom@tromey.com>
2806
2807         * completer.c (completion_tracker::completion_tracker): Remove
2808         cast.
2809         (completion_tracker::discard_completions): Likewise.
2810         * breakpoint.c (ambiguous_names_p): Remove cast.
2811         * ada-lang.c (_initialize_ada_language): Remove cast.
2812         * utils.h (streq): Update.
2813         (streq_hash): Add new declaration.
2814         * utils.c (streq): Return bool.
2815         (streq_hash): New function.
2816
2817 2018-04-05  Tom Tromey  <tom@tromey.com>
2818
2819         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
2820         Remove a string copy.
2821
2822 2018-04-05  Tom Tromey  <tom@tromey.com>
2823
2824         * linespec.c (filter_results): Use std::vector.
2825         (decode_line_2, decode_line_full): Update.
2826
2827 2018-04-05  Tom Tromey  <tom@tromey.com>
2828
2829         * linespec.c (canonical_to_fullform): Return std::string.
2830         (filter_results): Update.
2831         (struct decode_line_2_item): Add constructor.
2832         <fullform, displayform>: Now std::string.
2833         (decode_line_2_compare_items): Now a std::sort comparator.
2834         (decode_line_2): Update.
2835
2836 2018-04-05  Tom Tromey  <tom@tromey.com>
2837
2838         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
2839         (unexpected_linespec_error): Update.
2840         (linespec_parse_basic, parse_linespec): Update.
2841
2842 2018-04-05  Tom Tromey  <tom@tromey.com>
2843
2844         * linespec.c (linespec_parse_basic): Reindent.
2845
2846 2018-04-05  Tom Tromey  <tom@tromey.com>
2847
2848         * minsyms.h (iterate_over_minimal_symbols): Update.
2849         * minsyms.c (iterate_over_minimal_symbols): Take a
2850         gdb::function_view.
2851         * linespec.c (struct collect_minsyms): Remove.
2852         (compare_msyms): Now a std::sort comparator.
2853         (add_minsym): Add parameters.
2854         (search_minsyms_for_name): Update.  Use std::vector.
2855
2856 2018-04-03  Tom Tromey  <tom@tromey.com>
2857
2858         * mipsread.c (read_alphacoff_dynamic_symtab): Use
2859         gdb::byte_vector.
2860
2861 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
2862
2863         * MAINTAINERS (Write After Approval): Add Weimin Pan.
2864
2865 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
2866
2867         PR gdb/16959
2868         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
2869         printing static type.
2870
2871 2018-04-01  Tom Tromey  <tom@tromey.com>
2872
2873         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
2874         (rs6000_xfer_shared_libraries): Update.
2875
2876 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
2877
2878         * common/gdb_vecs.h (char_ptr): Remove.
2879         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
2880
2881 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
2882
2883         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
2884         with std::vector.
2885         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
2886
2887 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
2888
2889         * tracepoint.h (struct uploaded_tp): Initialize fields.
2890         <actions, step_actions, cmd_strings>: Change type to
2891         std::vector<char *>.
2892         * tracepoint.c (get_uploaded_tp): Allocate with new.
2893         (free_uploaded_tps): Free with delete.
2894         (parse_tracepoint_definition): Adjust to std::vector change.
2895         * breakpoint.c (read_uploaded_action): Likewise.
2896         (create_tracepoint_from_upload): Likewise.
2897         * ctf.c (ctf_write_uploaded_tp): Likewise.
2898         (SET_ARRAY_FIELD): Likewise.
2899         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
2900
2901 2018-03-30  Tom Tromey  <tom@tromey.com>
2902
2903         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
2904         std::unique_ptr.
2905         (svr4_keep_data_in_core): Update.
2906         (svr4_read_so_list): Update.
2907
2908 2018-03-30  Tom Tromey  <tom@tromey.com>
2909
2910         * windows-nat.c (handle_output_debug_string, handle_exception):
2911         Update.
2912         * target.h (target_read_string): Update.
2913         * target.c (target_read_string): Change "string" to
2914         unique_xmalloc_ptr.
2915         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
2916         Update.
2917         * solib-frv.c (frv_current_sos): Update.
2918         * solib-dsbt.c (dsbt_current_sos): Update.
2919         * solib-darwin.c (darwin_current_sos): Update.
2920         * linux-thread-db.c (inferior_has_bug): Update.
2921         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
2922         Update.  Remove alloca.
2923         * ada-lang.c (ada_main_name): Update.
2924
2925 2018-03-30  Tom Tromey  <tom@tromey.com>
2926
2927         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
2928         (struct dwo_file_deleter): New.
2929         (dwo_file_up): New typedef.
2930         (open_and_init_dwo_file): Use dwo_file_up.
2931         (free_dwo_file_cleanup): Remove.
2932
2933 2018-03-30  Tom Tromey  <tom@tromey.com>
2934
2935         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
2936         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
2937
2938 2018-03-30  Tom Tromey  <tom@tromey.com>
2939
2940         * dwarf2read.c (class free_cached_comp_units): New class.
2941         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
2942         (free_cached_comp_units): Remove function.
2943
2944 2018-03-30  Tom Tromey  <tom@tromey.com>
2945
2946         * utils.h (make_cleanup_unpush_target): Remove.
2947         * inf-ptrace.c (struct target_unpusher): New.
2948         (target_unpush_up) New typedef.
2949         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
2950         target_unpush_up.
2951         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
2952
2953 2018-03-27  Tom Tromey  <tom@tromey.com>
2954
2955         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
2956
2957 2018-03-27  Pedro Alves  <palves@redhat.com>
2958             Tom Tromey  <tom@tromey.com>
2959
2960         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
2961         destructor.  Now a class.
2962         (gdb_readline_wrapper_cleanup): Remove function.
2963         (gdb_readline_wrapper): Remove cleanups.
2964
2965 2018-03-27  Tom Tromey  <tom@tromey.com>
2966
2967         * typeprint.h (struct type_print_options) <local_typedefs,
2968         global_typedefs>: Remove "struct" keyword.
2969         (class typedef_hash_table): New class.
2970         (recursively_update_typedef_hash, add_template_parameters)
2971         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
2972         (find_typedef_in_hash): Don't declare.
2973         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
2974         (typedef_hash_table::recursively_update): Rename from
2975         recursively_update_typedef_hash.  Now a member.
2976         (typedef_hash_table::add_template_parameters): Rename from
2977         add_template_parameters.  Now a member.
2978         (typedef_hash_table::typedef_hash_table): Now a constructor;
2979         rename from create_typedef_hash.
2980         (typedef_hash_table::~typedef_hash_table): Now a destructor;
2981         rename from free_typedef_hash.
2982         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
2983         (do_free_global_table): Remove.
2984         (typedef_hash_table::typedef_hash_table): New constructor; renamed
2985         from copy_type_recursive.
2986         (create_global_typedef_table): Remove.
2987         (typedef_hash_table::find_global_typedef): Now a member of
2988         typedef_hash_table.
2989         (typedef_hash_table::find_typedef): Rename from
2990         find_typedef_in_hash; now a member.
2991         (whatis_exp): Update.
2992         * extension.h (struct ext_lang_type_printers): Add constructor and
2993         destructor.
2994         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
2995         declare.
2996         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
2997         Now a constructor; rename from start_ext_lang_type_printers.
2998         (ext_lang_type_printers): Now a destructor; rename from
2999         free_ext_lang_type_printers.
3000         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3001         Update.
3002         (c_type_print_base_struct_union): Update.  Remove cleanups.
3003
3004 2018-03-27  Tom Tromey  <tom@tromey.com>
3005
3006         * dwarf-index-write.c: Include <cmath>.
3007
3008 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
3009
3010         * NEWS: Add entry describing new "set|show varsize-limit" command.
3011         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3012         command.
3013         * printcmd.c (_initialize_printcmd): Add "set var" alias of
3014         "set variable".
3015
3016 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
3017
3018         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3019         dwarf-index-write.c
3020         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3021         * dwarf-index-common.c: New file.
3022         * dwarf-index-common.h: New file.
3023         * dwarf-index-write.c: New file.
3024         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3025         (struct dwarf2_section_info): Move from here.
3026         (dwarf2_section_info_def): Likewise.
3027         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3028         (offset_type): Likewise.
3029         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3030         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3031         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3032         (byte_swap): Likewise.
3033         (MAYBE_SWAP): Likewise.
3034         (dwarf2_per_cu_ptr): Likewise.
3035         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3036         (struct tu_stats): Likewise.
3037         (struct dwarf2_per_objfile): Likewise.
3038         (struct dwarf2_per_cu_data): Likewise.
3039         (struct signatured_type): Likewise.
3040         (sig_type_ptr): Likewise.
3041         (DEF_VEC_P (sig_type_ptr)): Likewise.
3042         (INDEX4_SUFFIX): Likewise.
3043         (INDEX5_SUFFIX): Likewise.
3044         (DEBUG_STR_SUFFIX): Likewise.
3045         (dwarf2_read_section): Make non-static.
3046         (mapped_index_string_hash): Move from here.
3047         (dwarf5_djb_hash): Likewise.
3048         (file_write): Likewise.
3049         (class data_buf): Likewise.
3050         (struct symtab_index_entry): Likewise.
3051         (struct mapped_symtab): Likewise.
3052         (find_slot): Likewise.
3053         (hash_expand): Likewise.
3054         (add_index_entry): Likewise.
3055         (uniquify_cu_indices): Likewise.
3056         (class c_str_view): Likewise.
3057         (class c_str_view_hasher): Likewise.
3058         (class vector_hasher): Likewise.
3059         (write_hash_table): Likewise.
3060         (psym_index_map): Likewise.
3061         (struct addrmap_index_data): Likewise.
3062         (add_address_entry): Likewise.
3063         (add_address_entry_worker): Likewise.
3064         (write_address_map): Likewise.
3065         (symbol_kind): Likewise.
3066         (write_psymbols): Likewise.
3067         (struct signatured_type_index_data): Likewise.
3068         (write_one_signatured_type): Likewise.
3069         (recursively_count_psymbols): Likewise.
3070         (recursively_write_psymbols): Likewise.
3071         (class debug_names): Likewise.
3072         (check_dwarf64_offsets): Likewise.
3073         (psyms_seen_size): Likewise.
3074         (write_gdbindex): Likewise.
3075         (write_debug_names): Likewise.
3076         (assert_file_size): Likewise.
3077         (write_psymtabs_to_index): Likewise.
3078         (save_gdb_index_command): Likewise.
3079         (_initialize_dwarf2_read): Don't register the "save gdb-index"
3080         command.
3081         * dwarf2read.h: New file.
3082
3083 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
3084
3085         PR gdb/22670
3086         * dwarf2read.c (dwarf2_physname): Do not return the demangled
3087         symbol name if the CU's language stores symbol names in linkage
3088         format.
3089         * language.h (struct language_defn)
3090         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
3091         all instances of this struct.
3092
3093 2018-03-26  Tom Tromey  <tom@tromey.com>
3094
3095         * stack.c (backtrace_command_1): Remove verbose code.
3096
3097 2018-03-26  Tom Tromey  <tom@tromey.com>
3098
3099         * python/py-framefilter.c (py_print_type): Don't catch
3100         exceptions.  Return void.
3101         (py_print_value): Likewise.
3102         (py_print_single_arg): Likewise.
3103         (enumerate_args): Don't catch exceptions.
3104         (py_print_args): Likewise.
3105         (py_print_frame): Likewise.
3106         (gdbpy_apply_frame_filter): Catch exceptions here.
3107
3108 2018-03-26  Tom Tromey  <tom@tromey.com>
3109
3110         * stack.c (_initialize_stack): Remove trailing newlines from help
3111         text.  Add "Usage" line to "backtrace" help.
3112
3113 2018-03-26  Tom Tromey  <tom@tromey.com>
3114
3115         PR python/16486:
3116         * python/py-framefilter.c (py_print_args): Call wrap_hint.
3117
3118 2018-03-26  Tom Tromey  <tom@tromey.com>
3119
3120         * python/py-framefilter.c (py_print_single_arg): Return
3121         EXT_LANG_BT_ERROR from catch.
3122
3123 2018-03-26  Tom Tromey  <tom@tromey.com>
3124
3125         PR backtrace/15584:
3126         * stack.c (backtrace_command_1): Move some code into no-filters
3127         "if".
3128
3129 2018-03-26  Tom Tromey  <tom@tromey.com>
3130
3131         * python/py-framefilter.c (throw_quit_or_print_exception): New
3132         function.
3133         (gdbpy_apply_frame_filter): Use it.
3134
3135 2018-03-26  Tom Tromey  <tom@tromey.com>
3136
3137         PR cli/17716:
3138         * python/py-framefilter.c (py_print_type, py_print_value)
3139         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3140         RETURN_MASK_ERROR.
3141
3142 2018-03-26  Tom Tromey  <tom@tromey.com>
3143
3144         * python/py-framefilter.c (enumerate_args): Use
3145         gdb::unique_xmalloc_ptr.
3146
3147 2018-03-26  Tom Tromey  <tom@tromey.com>
3148
3149         * python/py-framefilter.c (py_print_frame): Return
3150         EXT_LANG_BT_OK.
3151         (gdbpy_apply_frame_filter): Update comment.
3152         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3153         Remove.
3154         <EXT_LANG_BT_NO_FILTERS>: Change value.
3155
3156 2018-03-26  Tom Tromey  <tom@tromey.com>
3157
3158         PR backtrace/15582:
3159         * stack.c (backtrace_command): Parse "hide" argument.
3160         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3161         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3162         constant.
3163
3164 2018-03-26  Tom Tromey  <tom@tromey.com>
3165
3166         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3167         add "flags".
3168         (backtrace_command): Remove "fulltrace", add "flags".
3169
3170 2018-03-26  Tom Tromey  <tom@tromey.com>
3171
3172         * stack.c (backtrace_command): Rewrite command line parsing.
3173
3174 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
3175
3176         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3177
3178 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
3179
3180         * filename-seen-cache.h: Add include guard.
3181
3182 2018-03-26  Keith Seitz  <keiths@redhat.com>
3183
3184         * symfile.c (place_section): Remove "struct" from section_addr_info
3185         in comment.
3186         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3187         "struct" keyword from section_addr_info.
3188
3189 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
3190
3191         * regformats/regdef.h (reg): Add constructors.
3192
3193 2018-03-25  Pedro Alves  <palves@redhat.com>
3194
3195         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3196         if then/else bodies in var_func_name extraction.
3197
3198 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
3199
3200         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3201         lookup_minimal_symbol() to find symbol entry.
3202         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3203
3204 2018-03-23  Keith Seitz  <keiths@redhat.com>
3205
3206         PR c++/22968
3207         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3208         nested type definitions for C++, too.
3209
3210 2018-03-23  Tom Tromey  <tom@tromey.com>
3211
3212         * machoread.c (struct oso_el): Add a constructor.  Don't define as
3213         a typedef.
3214         (macho_register_oso): Remove.
3215         (macho_symtab_read): Take a std::vector.
3216         (oso_el_compare_name): Now a std::sort comparator.
3217         (macho_symfile_read_all_oso): Take a std::vector.
3218         (macho_symfile_read): Use std::vector.  Remove cleanups.
3219
3220 2018-03-22  Tom Tromey  <tom@tromey.com>
3221
3222         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3223         (record_full_goto_bookmark): Use std::string.
3224
3225 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3226
3227         PR tdep/18295
3228         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3229         a single mask.
3230
3231 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3232
3233         * rs6000-tdep.c (store_insn_p): New function.
3234         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3235         and cr_reg to their unshifted values. Use store_insn_p to
3236         match LR saves using either R1 or fdata->alloca_reg. Use
3237         store_insn_p to match CR saves. Set alloca_reg_offset
3238         when alloca_reg and framep are set. Remove lr_reg shift
3239         when assigning to fdata->lr_register.
3240
3241 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3242
3243         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3244         command line args instead of emitting a warning.
3245
3246 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
3247
3248         * tracepoint.h (struct static_tracepoint_marker): Initialize
3249         fields, define default constructor, move constructor and move
3250         assignment, disable the rest.
3251         <str_id, extra>: Make std::string.
3252         (release_static_tracepoint_marker): Remove.
3253         (free_current_marker): Remove.
3254         * tracepoint.c (free_current_marker): Remove.
3255         (parse_static_tracepoint_marker_definition): Adjust to
3256         std::string, use new hex2str overload.
3257         (release_static_tracepoint_marker): Remove.
3258         (print_one_static_tracepoint_marker): Get marker by reference
3259         and adjust to std::string.
3260         (info_static_tracepoint_markers_command): Adjust to std::vector
3261         changes
3262         * target.h (static_tracepoint_marker_p): Remove typedef.
3263         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3264         (struct target_ops) <to_static_tracepoint_marker_at>: Return
3265         bool.
3266         <to_static_tracepoint_markers_by_strid>: Return std::vector.
3267         * target-debug.h
3268         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3269         (target_debug_print_std_vector_static_tracepoint_marker): New.
3270         (target_debug_print_struct_static_tracepoint_marker_p): Rename
3271         to...
3272         (target_debug_print_static_tracepoint_marker_p): ... this.
3273         * target-delegates.c: Re-generate.
3274         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3275         Make std::string.
3276         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3277         (decode_static_tracepoint_spec): Adjust to std::vector.
3278         (tracepoint_print_one_detail): Adjust to std::string.
3279         (strace_marker_decode_location): Adjust to std::string.
3280         (update_static_tracepoint): Adjust to std::string, remove call
3281         to release_static_tracepoint_marker.
3282         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3283         Adjust to std::vector.
3284         * remote.c (remote_static_tracepoint_marker_at): Return bool.
3285         (remote_static_tracepoint_markers_by_strid): Adjust to
3286         std::vector.
3287         * common/rsp-low.h (hex2str): New overload with explicit count
3288         of bytes.
3289         * common/rsp-low.c (hex2str): New overload with explicit count
3290         of bytes.
3291         * unittests/rsp-low-selftests.c (test_hex2str): New function.
3292         (_initialize_rsp_low_selftests): Add test_hex2str test.
3293         * unittests/tracepoint-selftests.c
3294         (test_parse_static_tracepoint_marker_definition): Adjust to
3295         std::string.
3296
3297 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
3298
3299         * tracepoint.c (parse_static_tracepoint_marker_definition):
3300         Consider case where the definition is followed by more
3301         definitions.
3302         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3303         tracepoint-selftests.c.
3304         * unittests/tracepoint-selftests.c: New.
3305
3306 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3307
3308         * MAINTAINERS (Write After Approval): Add Pedro Franco de
3309         Carvalho.
3310
3311 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
3312
3313         * symtab.c (find_pc_sect_line): fixed indentation.
3314
3315 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
3316
3317         * symtab.c (find_pc_sect_line): now uses binary search.
3318
3319 2018-03-19  Tom Tromey  <tom@tromey.com>
3320
3321         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3322         "IDENT" production.
3323
3324 2018-03-19  Pedro Alves  <palves@redhat.com>
3325             Tom Tromey  <tom@tromey.com>
3326
3327         * unittests/observable-selftests.c: New file.
3328         * common/observable.h: New file.
3329         * observable.h: New file.
3330         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3331         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3332         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3333         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3334         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3335         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3336         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3337         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3338         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3339         python/py-breakpoint.c, python/py-finishbreakpoint.c,
3340         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3341         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3342         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3343         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3344         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3345         tui/tui-interp.c, valops.c: Update all users.
3346         * tui/tui-hooks.c (tui_bp_created_observer)
3347         (tui_bp_deleted_observer, tui_bp_modified_observer)
3348         (tui_inferior_exit_observer, tui_before_prompt_observer)
3349         (tui_normal_stop_observer, tui_register_changed_observer):
3350         Remove.
3351         (tui_observers_token): New global.
3352         (attach_or_detach, tui_attach_detach_observers): New functions.
3353         (tui_install_hooks, tui_remove_hooks): Use
3354         tui_attach_detach_observers.
3355         * record-btrace.c (record_btrace_thread_observer): Remove.
3356         (record_btrace_thread_observer_token): New global.
3357         * observer.sh: Remove.
3358         * observer.c: Rename to observable.c.
3359         * observable.c (namespace gdb_observers): Define new objects.
3360         (observer_debug): Move into gdb_observers namespace.
3361         (struct observer, struct observer_list, xalloc_observer_list_node)
3362         (xfree_observer_list_node, generic_observer_attach)
3363         (generic_observer_detach, generic_observer_notify): Remove.
3364         (_initialize_observer): Update.
3365         Don't include observer.inc.
3366         * Makefile.in (generated_files): Remove observer.h, observer.inc.
3367         (clean mostlyclean): Likewise.
3368         (observer.h, observer.inc): Remove targets.
3369         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3370         (COMMON_SFILES): Use observable.c, not observer.c.
3371         * .gitignore: Remove observer.h.
3372
3373 2018-03-18  Tom Tromey  <tom@tromey.com>
3374
3375         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3376         gdb::def_vector.
3377         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3378
3379 2018-03-17  Tom Tromey  <tom@tromey.com>
3380
3381         * auto-load.c (auto_load_objfile_script_1): Use std::string.
3382
3383 2018-03-17  Tom Tromey  <tom@tromey.com>
3384
3385         * target.c (class scoped_target_fd): New.
3386         (target_fileio_close_cleanup): Remove.
3387         (target_fileio_read_alloc_1): Use scoped_target_fd.
3388
3389 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
3390
3391         * silent-rules.mk: New.
3392         * Makefile.in: Include silent-rules.mk
3393         (srcdir, VPATH, top_srcdir): Move up.
3394         (COMPILE): Add ECHO_CXX.
3395         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3396         (init.c): Add ECHO_INIT_C.
3397         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3398         (version.c): Add ECHO_GEN.
3399         (printcmd.o): Add ECHO_CXX.
3400         (target-float.o): Add ECHO_CXX.
3401         (ada-exp.o): Add ECHO_CXX.
3402         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3403         (insight$(EXEEXT)): Add ECHO_CXXLD.
3404         * gnulib/configure.ac: Add AM_SILENT_RULES.
3405         * gnulib/aclocal.m4: Re-generate.
3406         * gnulib/configure: Re-generate.
3407         * gnulib/import/Makefile.in: Re-generate.
3408
3409 2018-03-16  Tom Tromey  <tom@tromey.com>
3410
3411         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3412         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3413         * utils.c (do_free_section_addr_info)
3414         (make_cleanup_free_section_addr_info): Remove.
3415         * symfile.h (struct other_sections): Add constructor.
3416         (struct section_addr_info): Remove.
3417         (section_addr_info): New typedef.
3418         (struct sym_fns) <sym_offsets>: Change type of parameter.
3419         (build_section_addr_info_from_objfile)
3420         (relative_addr_info_to_section_offsets, addr_info_make_relative)
3421         (default_symfile_offsets, symbol_file_add)
3422         (symbol_file_add_from_bfd)
3423         (build_section_addr_info_from_section_table): Update.
3424         (alloc_section_addr_info, free_section_addr_info): Don't declare.
3425         * symfile.c (alloc_section_addr_info): Remove.
3426         (build_section_addr_info_from_section_table): Change return type.
3427         Update.
3428         (build_section_addr_info_from_bfd)
3429         (build_section_addr_info_from_objfile): Likewise.
3430         (free_section_addr_info): Remove.
3431         (relative_addr_info_to_section_offsets): Change type of "addrs".
3432         (addrs_section_compar): Now a std::sort comparator.
3433         (addrs_section_sort): Change return type.
3434         (addr_info_make_relative): Change type of "addrs".  Update.
3435         (default_symfile_offsets, syms_from_objfile_1)
3436         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3437         (symbol_file_add_separate): Update.
3438         (symbol_file_add): Change type of "addrs".  Update.
3439         (add_symbol_file_command): Update.  Remove cleanups.
3440         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
3441         cleanups.
3442         * symfile-debug.c (debug_sym_offsets): Change type of "info".
3443         * solib.c (solib_read_symbols): Update.
3444         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
3445         * machoread.c (macho_symfile_offsets): Update.
3446         * jit.c (jit_bfd_try_read_symtab): Update.
3447
3448 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
3449
3450         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3451         unittests/utils-selftests.c.
3452         * unittests/utils-selftests.c: New file.
3453
3454 2018-03-14  Tom Tromey  <tom@tromey.com>
3455
3456         PR cli/14977:
3457         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3458         for NULL.
3459
3460 2018-03-14  Tom Tromey  <tom@tromey.com>
3461
3462         PR cli/19918:
3463         * printcmd.c (printf_pointer): Allow "-" in format.
3464
3465 2018-03-14  Tom Tromey  <tom@tromey.com>
3466
3467         * printcmd.c (_initialize_printcmd): Add usage to printf.
3468
3469 2018-03-14  Yao Qi  <qiyao@sourceware.org>
3470
3471         * MAINTAINERS: Update my email address.
3472
3473 2018-03-13  Tom Tromey  <tom@tromey.com>
3474
3475         * machoread.c (macho_check_dsym): Change filenamep to a
3476         std::string*.
3477         (macho_symfile_read): Update.
3478         * symfile.c (load_command): Use std::string.
3479
3480 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3481
3482         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3483         to error message string.
3484         (riscv_register_name): Use xsnprintf instead of sprintf.
3485         (riscv_insn::fetch_instruction): Use gdb_assert instead of
3486         internal_error.
3487         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3488         error.
3489         (riscv_push_dummy_call): Likewise.
3490
3491 2018-03-12  Tom Tromey  <tom@tromey.com>
3492
3493         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3494         Use gdb::byte_vector.
3495         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3496
3497 2018-03-12  Yao Qi  <yao.qi@linaro.org>
3498
3499         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3500         parameter type to readable_regcache.
3501         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3502         the declaration.
3503
3504 2018-03-11  Tom Tromey  <tom@tromey.com>
3505
3506         * dwarf2read.c (struct nextfield): Add initializers.
3507         (struct nextfnfield): Remove.
3508         (struct fnfieldlist): Add initializers.  Remove "length" and
3509         "head", use std::vector.
3510         (struct decl_field_list): Remove.
3511         (struct field_info): Add initializers.
3512         <fields, baseclasses>: Now std::vector.
3513         <nbaseclasses, nfnfields, typedef_field_list_count,
3514         nested_types_list_count>: Remove.
3515         (dwarf2_add_field, dwarf2_add_type_defn)
3516         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3517         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3518         (process_structure_scope): Update.
3519
3520 2018-03-11  Tom Tromey  <tom@tromey.com>
3521
3522         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3523         for use by std::sort.
3524         (build_type_psymtabs_1): Use std::vector.
3525
3526 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
3527
3528         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3529         and LIBMPFR in the printed configuration.
3530
3531 2018-03-08  Tom Tromey  <tom@tromey.com>
3532
3533         * source.c (get_filename_and_charpos): Use scoped_fd.
3534         * nto-procfs.c (procfs_open_1): Use scoped_fd.
3535         (procfs_pidlist): Likewise.
3536         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3537         (iterate_over_mappings): Likewise.
3538
3539 2018-03-08  Tom Tromey  <tom@tromey.com>
3540
3541         * infcall.c (struct call_return_meta_info)
3542         <stack_temporaries_enabled>: Remove.
3543         (get_call_return_value, call_function_by_hand_dummy): Update.
3544         * thread.c (disable_thread_stack_temporaries): Remove.
3545         (enable_thread_stack_temporaries): Remove.
3546         (thread_stack_temporaries_enabled_p): Return bool.
3547         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3548         (get_last_thread_stack_temporary): Update.
3549         * eval.c (evaluate_subexp): Update.
3550         * gdbthread.h (class enable_thread_stack_temporaries): Now a
3551         class, not a function.
3552         (value_ptr, value_vec): Remove typedefs.
3553         (class thread_info) <stack_temporaries_enabled>: Now bool.
3554         <stack_temporaries>: Now a std::vector.
3555         (thread_stack_temporaries_enabled_p)
3556         (value_in_thread_stack_temporaries): Return bool.
3557
3558 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
3559
3560         * remote.c (putpkt_binary): Fix omitted bytes reporting.
3561         (getpkt_or_notif_sane_1): Likewise.
3562
3563 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3564
3565         * build-id.c (build_id_to_debug_bfd): Use std::string.
3566
3567 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3568
3569         * build-id.c (find_separate_debug_file_by_buildid): Return
3570         std::string.
3571         * build-id.h (find_separate_debug_file_by_buildid): Return
3572         std::string.
3573         * coffread.c (coff_symfile_read): Adjust to std::string.
3574         * elfread.c (elf_symfile_read): Adjust to std::string.
3575         * symfile.c (separate_debug_file_exists): Change parameter to
3576         std::string.
3577         (find_separate_debug_file): Return std::string.
3578         (find_separate_debug_file_by_debuglink): Return std::string.
3579         * symfile.h (find_separate_debug_file_by_debuglink): Return
3580         std::string.
3581
3582 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3583
3584         * common/xml-utils.c (xml_escape_text): Move code to...
3585         (xml_escape_text_append): ... this new function.
3586         * common/xml-utils.h (xml_escape_text_append): New declaration.
3587         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3588         New function.
3589         (_initialize_xml_utils): register test_xml_escape_text_append as
3590         a selftest.
3591
3592 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
3593
3594         * defs.h: Remove MAX_REGISTER_SIZE.
3595         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3596         asserts.
3597         * python/py-unwind.c (pyuw_sniffer): Likewise.
3598
3599 2018-03-07  Tom Tromey  <tom@tromey.com>
3600
3601         * linux-tdep.c (linux_info_proc): Update.
3602         * target.h (struct target_ops) <to_fileio_readlink>: Return
3603         optional<string>.
3604         (target_fileio_readlink): Return optional<string>.
3605         * remote.c (remote_hostio_readlink): Return optional<string>.
3606         * inf-child.c (inf_child_fileio_readlink): Return
3607         optional<string>.
3608         * target.c (target_fileio_readlink): Return optional<string>.
3609
3610 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
3611
3612         * regcache.c (cooked_read_test): Add riscv to the list of
3613         architectures that have a save_reggroup.
3614
3615 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3616
3617         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3618         value is not a dynamic class object.
3619
3620 2018-03-06  Tom Tromey  <tom@tromey.com>
3621
3622         * rust-exp.y: Formatting fixes.
3623
3624 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3625
3626         * riscv-tdep.c (riscv_register_name): Remove target description
3627         support.
3628         (riscv_gdbarch_init): Remove target description check.
3629
3630 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3631
3632         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3633         comment.
3634         * riscv-tdep.h: Likewise.
3635
3636 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3637
3638         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3639         (riscv_pseudo_register_write): Delete.
3640         (riscv_gdbarch_init): Remove all use of pseudo registers.
3641
3642 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3643
3644         * record-btrace.c (btrace_print_lines): Replace cleanup
3645         parameter with RAII equivalents.
3646         (btrace_insn_history): Replace cleanup with RAII equivalents.
3647         * ui-out.h (make_cleanup_ui_out_list_begin_end,
3648         make_cleanup_ui_out_tuple_begin_end): Remove.
3649         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3650         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3651         make_cleanup_ui_out_list_begin_end): Remove.
3652
3653 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3654
3655         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3656         parameter types to std::vector.  Use bool.
3657         (record_btrace_wait): Replace VEC(tp_t) with
3658         std::vector<thread_info *>.
3659         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3660
3661 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3662
3663         * record-btrace.c (record_btrace_disable_callback): Remove.
3664         (struct scoped_btrace_disable): New.
3665         (record_btrace_open): Use scoped_btrace_disable.
3666
3667 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3668
3669         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3670         reading values from registers.
3671
3672 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3673
3674         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3675         where appropriate.
3676
3677 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3678
3679         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3680         change parameter type.  Use GDB's print functions, and use
3681         core_addr_to_string where appropriate.
3682         (riscv_push_dummy_call): Use core_addr_to_string where
3683         appropriate, update call to riscv_print_arg_location, and reindent
3684         a few lines.
3685         (riscv_return_value): Update call to riscv_print_arg_location.
3686
3687 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3688             Tim Newsome <tim@sifive.com>
3689             Albert Ou <a0u@eecs.berkeley.edu>
3690             Darius Rad <darius@bluespec.com>
3691
3692         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3693         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3694         (ALLDEPFILES): Add riscv-tdep.c
3695         * configure.tgt: Add riscv support.
3696         * riscv-tdep.c: New file.
3697         * riscv-tdep.h: New file.
3698         * NEWS: Mention new target.
3699         * MAINTAINERS: Add entry for riscv.
3700
3701 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3702
3703         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3704         fields within aggregates.
3705
3706 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
3707
3708         * record-btrace.c (btrace_print_lines): Change type of flags to
3709         gdb_disassembly_flags.
3710
3711 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
3712
3713         * fbsd-nat.c: Include "inf-ptrace.h".
3714         (USE_SIGTRAP_SIGINFO): Conditionally define.
3715         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3716         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3717         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3718         function.
3719         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3720         Likewise.
3721         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3722         Likewise.
3723         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3724         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3725         "supports_stopped_by_hw_breakpoint" target methods.
3726
3727 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
3728
3729         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3730         * fbsd-nat.c (debug_fbsd_nat): New variable.
3731         (show_fbsd_nat_debug): New function.
3732         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3733         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3734
3735 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
3736
3737         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3738         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3739         prototype.
3740         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3741         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3742         method.
3743
3744 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3745
3746         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
3747         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
3748
3749 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3750
3751         * charset.c (struct charset_vector): New.
3752         (charsets): Change type to charset_vector.
3753         (find_charset_names): Adjust.
3754         (add_one): Adjust.
3755         (_initialize_charset): Adjust.
3756
3757 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3758
3759         * progspace.h (struct program_space) <deleted_solibs>: Change
3760         type to std::vector<std::string>.
3761         * progspace.c (clear_program_space_solib_cache): Adjust.
3762         * breakpoint.c (print_solib_event): Adjust.
3763         (check_status_catch_solib): Adjust.
3764         * solib.c (update_solib_list): Adjust.
3765         * ui-out.h (class ui_out) <field_string>: New overload.
3766         * ui-out.c (ui_out::field_string): New overload.
3767
3768 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3769
3770         * progspace.h (struct program_space): Add constructor and
3771         destructor, initialize fields.
3772         (add_program_space): Remove.
3773         * progspace.c (add_program_space): Rename to...
3774         (program_space::program_space): ... this.
3775         (release_program_space): Rename to...
3776         (program_space::~program_space): ... this.
3777         (delete_program_space): Use delete to delete program_space.
3778         (initialize_progspace): Use new to allocate program_space.
3779         * inferior.c (add_inferior_with_spaces): Likewise.
3780         (clone_inferior_command): Likewise.
3781         * infrun.c (follow_fork_inferior): Likewise.
3782         (handle_vfork_child_exec_or_exit): Likewise.
3783
3784 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3785
3786         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
3787         (delim_string_to_char_ptr_vec): Return std::vector of
3788         gdb::unique_xmalloc_ptr.
3789         (dirnames_to_char_ptr_vec_append): Take std::vector of
3790         gdb::unique_xmalloc_ptr.
3791         (dirnames_to_char_ptr_vec): Return std::vector of
3792         gdb::unique_xmalloc_ptr.
3793         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
3794         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
3795         (delim_string_to_char_ptr_vec): Return an std::vector of
3796         gdb::unique_xmalloc_ptr, adjust the code.
3797         (dirnames_to_char_ptr_vec_append): Take an std::vector of
3798         gdb::unique_xmalloc_ptr, adjust the code.
3799         (dirnames_to_char_ptr_vec): Return an std::vector of
3800         gdb::unique_xmalloc_ptr, adjust the code.
3801         * auto-load.c (auto_load_safe_path_vec): Change type to
3802         std::vector of gdb::unique_xmalloc_ptr.
3803         (auto_load_expand_dir_vars): Return an std::vector of
3804         gdb::unique_xmalloc_ptr, adjust the code.
3805         (auto_load_safe_path_vec_update): Adjust.
3806         (filename_is_in_auto_load_safe_path_vec): Adjust.
3807         (auto_load_objfile_script_1): Adjust.
3808         * build-id.c (build_id_to_debug_bfd): Adjust.
3809         * linux-thread-db.c (thread_db_load_search): Adjust.
3810         * source.c (add_path): Adjust.
3811         (openp): Adjust.
3812         * symfile.c (find_separate_debug_file): Adjust.
3813         * utils.c (do_free_char_ptr_vec): Remove.
3814         (make_cleanup_free_char_ptr_vec): Remove.
3815
3816 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
3817
3818         PR gdb/22907
3819         * common/pathstuff.c: Conditionally include "<windows.h>".
3820
3821 2018-03-01  Georg Sauthoff  <mail@georg.so>
3822
3823         PR gdb/22888
3824         * gcore.in: Quote variables and switch interpreter to bash.
3825
3826 2018-03-01  Tom Tromey  <tom@tromey.com>
3827
3828         * dwarf2read.c (alloc_discriminant_info): Fix default_index
3829         assertion.  Add assertion for discriminant_index.
3830         (quirk_rust_enum): Use correct base type name in univariant case.
3831
3832 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
3833
3834         * record.c (get_call_history_modifiers): Return a
3835         record_print_flags.
3836         (cmd_record_call_history): Adjust.
3837         * record-btrace.c (record_btrace_call_history): Adjust.
3838         (record_btrace_call_history_range): Adjust.
3839         (record_btrace_call_history_from): Adjust.
3840         * target-debug.h (target_debug_print_record_print_flags): New.
3841         * target-delegates.c: Re-generate.
3842         * target.c (target_call_history): Change flags type.
3843         (target_call_history_from): Likewise.
3844         (target_call_history_range): Likewise.
3845         * target.h (struct target_ops) <target_call_history>: Likewise.
3846         (target_call_history_from): Likewise.
3847         (target_call_history_range): Likewise.
3848
3849 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
3850             Simon Marchi  <simon.marchi@polymtl.ca>
3851
3852         * common/common-utils.c: Include "sys/stat.h".
3853         (is_regular_file): Move here from "source.c"; change return
3854         type to "bool".
3855         * common/common-utils.h (is_regular_file): New prototype.
3856         * common/pathstuff.c (contains_dir_separator): New function.
3857         * common/pathstuff.h (contains_dir_separator): New prototype.
3858         * source.c: Don't include "sys/stat.h".
3859         (is_regular_file): Move to "common/common-utils.c".
3860
3861 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
3862
3863         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
3864         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
3865         * auto-load.c: Include "common/pathstuff.h".
3866         * common/common-def.h (current_directory): Move here.
3867         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
3868         function.
3869         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
3870         prototype.
3871         * common/pathstuff.c: New file.
3872         * common/pathstuff.h: New file.
3873         * compile/compile.c: Include "common/pathstuff.h".
3874         * defs.h (current_directory): Move to "common/common-defs.h".
3875         * dwarf2read.c: Include "common/pathstuff.h".
3876         * exec.c: Likewise.
3877         * guile/scm-safe-call.c: Likewise.
3878         * linux-thread-db.c: Likewise.
3879         * main.c: Likewise.
3880         * nto-tdep.c: Likewise.
3881         * objfiles.c: Likewise.
3882         * source.c: Likewise.
3883         * symtab.c: Likewise.
3884         * utils.c: Include "common/pathstuff.h".
3885         (gdb_realpath): Move to "common/pathstuff.c".
3886         (gdb_realpath_keepfile): Likewise.
3887         (gdb_abspath): Likewise.
3888         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
3889         (gdb_realpath_keepfile): Likewise.
3890         (gdb_abspath): Likewise.
3891
3892 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
3893
3894         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
3895         wildcard process pid for super_resume for kernels with a
3896         specific bug.
3897
3898 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
3899
3900         * compile/compile.c (get_args): Add additional comments
3901         explaining function.
3902
3903 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
3904             Tom Tromey  <tom@tromey.com>
3905
3906         * target.h (memory_write_request_s): Remove typedef.  Don't define
3907         VEC.
3908         (target_write_memory_blocks): Change argument to std::vector.
3909         (struct memory_write_request): Add constructor.
3910         * target-memory.c (compare_block_starting_address): Return bool.
3911         Change argument types.
3912         (claim_memory): Change arguments to use std::vector.
3913         (split_regular_and_flash_blocks, blocks_to_erase)
3914         (compute_garbled_blocks): Likewise.
3915         (cleanup_request_data, cleanup_write_requests_vector): Remove.
3916         (target_write_memory_blocks): Change argument to std::vector.
3917         * symfile.c (struct load_section_data): Add constructor and
3918         destructor.  Use std::vector for "requests".
3919         (struct load_progress_data): Add initializers.
3920         (load_section_callback): Update.  Use "new".
3921         (clear_memory_write_data): Remove.
3922         (generic_load): Update.
3923
3924 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
3925
3926         * arch/aarch64.h: Use common/tdesc.h.
3927
3928 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
3929
3930         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
3931         architecture with a 64-bit ABI.
3932
3933 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
3934
3935         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
3936         ahead of target description loading.
3937
3938 2018-02-26  Tom Tromey  <tom@tromey.com>
3939
3940         * stack.c (backtrace_command_1): Update.
3941         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
3942         of "flags".
3943         * python/py-framefilter.c (py_print_frame)
3944         (gdbpy_apply_frame_filter): Change type of "flags".
3945         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
3946         of "flags".
3947         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
3948         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
3949         * extension.h (enum frame_filter_flag): Rename from
3950         frame_filter_flags.
3951         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
3952         (apply_ext_lang_frame_filter): Change type of "flags".
3953         * extension.c (apply_ext_lang_frame_filter): Change type of
3954         "flags".
3955         * extension-priv.h (struct extension_language_ops)
3956         <apply_frame_filter>: Change type of "flags".
3957
3958 2018-02-26  Tom Tromey  <tom@tromey.com>
3959
3960         PR python/16497:
3961         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
3962         off-by-one in py_end computation.
3963         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
3964         PRINT_MORE_FRAMES.
3965         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
3966         constant.
3967
3968 2018-02-26  Tom Tromey  <tom@tromey.com>
3969
3970         * dwarf2read.c (struct variant_field): New.
3971         (struct nextfield) <variant>: New field.
3972         (dwarf2_add_field): Handle DW_TAG_variant_part.
3973         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
3974         discriminated union.
3975         (read_structure_type): Handle DW_TAG_variant_part.
3976         (handle_struct_member_die): New function, extracted from
3977         process_structure_scope.  Handle DW_TAG_variant.
3978         (process_structure_scope): Handle discriminated unions.  Call
3979         handle_struct_member_die.
3980
3981 2018-02-26  Tom Tromey  <tom@tromey.com>
3982
3983         * rust-lang.h (rust_last_path_segment): Declare.
3984         * rust-lang.c (rust_last_path_segment): Now public.  Change
3985         contract.
3986         (struct disr_info): Remove.
3987         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
3988         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
3989         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
3990         (rust_enum_p, rust_enum_variant): New function.
3991         (rust_underscore_fields): Remove "offset" parameter.
3992         (rust_print_enum): New function.
3993         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
3994         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
3995         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
3996         enums.
3997         (rust_internal_print_type): New function, from rust_print_type.
3998         Remove enum code.
3999         (rust_print_type): Call rust_internal_print_type.
4000         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4001         Update enum handling.
4002         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4003         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4004         (rust_union_quirks): New functions.
4005         (process_full_comp_unit, process_full_type_unit): Call
4006         rust_union_quirks.
4007         (process_structure_scope): Update rust_unions if necessary.
4008
4009 2018-02-26  Tom Tromey  <tom@tromey.com>
4010
4011         * value.h (value_union_variant): Declare.
4012         * valops.c (value_union_variant): New function.
4013         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4014         (struct discriminant_info): New.
4015         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4016         enumerator.
4017         (struct main_type) <flag_discriminated_union>: New field.
4018
4019 2018-02-26  Tom Tromey  <tom@tromey.com>
4020
4021         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4022         unittests/unpack-selftests.c.
4023         * unittests/unpack-selftests.c: New file.
4024         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4025
4026 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4027
4028         * dwarf2read.c (struct partial_die_info) <read>: New method.
4029         (read_partial_die): Remove the declaration.
4030         (load_partial_dies): Update.
4031         (partial_die_info::partial_die_info):
4032         (read_partial_die): Change it to partial_die_info::read.
4033
4034 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4035
4036         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4037         (fixup_partial_die): Remove declaration.
4038         (scan_partial_symbols): Update.
4039         (partial_die_parent_scope): Likewise.
4040         (partial_die_full_name): Likewise.
4041         (fixup_partial_die): Change it to partial_die_info::fixup.
4042
4043 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4044
4045         * dwarf2read.c (read_partial_die): Update the declaration.
4046         (load_partial_dies): Caller update.
4047         (read_partial_die): Remove one argument abbrev_len.
4048
4049 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4050
4051         * dwarf2read.c (struct partial_die_info): Add ctor, delete
4052         assignment operator.
4053         (load_partial_dies): Use ctor and copy ctor.
4054         (read_partial_die): Update.
4055         (dwarf2_cu::find_partial_die): Use ctor.
4056
4057 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4058
4059         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4060         (find_partial_die_in_comp_unit): Change it to
4061         dwarf2_cu::find_partial_die.
4062         (find_partial_die): Update.
4063
4064 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4065
4066         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4067         is NULL.
4068
4069 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4070
4071         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4072
4073 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
4074
4075         * arch/amd64.h: Use common/tdesc.h.
4076         * arch/i386.c: Likewise.
4077         * arch/i386.h: Likewise.
4078         * arch/tic6x.c: Likewise.
4079         * arch/tdesc.h: Move file from here...
4080         * common/tdesc.h: ...to here.
4081         * features/aarch64-core.c: Regenerate.
4082         * features/aarch64-fpu.c: Regenerate.
4083         * features/i386/32bit-avx.c: Regenerate.
4084         * features/i386/32bit-avx512.c: Regenerate.
4085         * features/i386/32bit-core.c: Regenerate.
4086         * features/i386/32bit-linux.c: Regenerate.
4087         * features/i386/32bit-mpx.c: Regenerate.
4088         * features/i386/32bit-pkeys.c: Regenerate.
4089         * features/i386/32bit-sse.c: Regenerate.
4090         * features/i386/64bit-avx.c: Regenerate.
4091         * features/i386/64bit-avx512.c: Regenerate.
4092         * features/i386/64bit-core.c: Regenerate.
4093         * features/i386/64bit-linux.c: Regenerate.
4094         * features/i386/64bit-mpx.c: Regenerate.
4095         * features/i386/64bit-pkeys.c: Regenerate.
4096         * features/i386/64bit-segments.c: Regenerate.
4097         * features/i386/64bit-sse.c: Regenerate.
4098         * features/i386/x32-core.c: Regenerate.
4099         * features/tic6x-c6xp.c: Regenerate.
4100         * features/tic6x-core.c: Regenerate.
4101         * features/tic6x-gp.c: Regenerate.
4102         * target-descriptions.c: Use common/tdesc.h.
4103         * target-descriptions.h: Likewise.
4104
4105 2018-02-24  Tom Tromey  <tom@tromey.com>
4106
4107         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4108         (try_thread_db_load_from_dir, thread_db_load_search): Use
4109         std::string.
4110         (info_auto_load_libthread_db_compare): Return bool.  Change
4111         argument types.
4112         (info_auto_load_libthread_db): Use std::vector, std::string.
4113         Remove cleanups.
4114
4115 2018-02-24  Tom Tromey  <tom@tromey.com>
4116
4117         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4118         std::string.
4119         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4120         std::string*.
4121         * gdbarch.c: Rebuild.
4122         * gdbarch.h: Rebuild.
4123         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4124         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4125         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4126         std::string*.
4127
4128 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
4129
4130         * gdbtypes.h (sect_offset): Change type to uint64_t.
4131         (sect_offset_str): New function.
4132         * dwarf2read.c (create_addrmap_from_aranges): Use
4133         sect_offset_str.
4134         (error_check_comp_unit_head): Likewise.
4135         (create_debug_type_hash_table): Likewise.
4136         (read_cutu_die_from_dwo): Likewise.
4137         (init_cutu_and_read_dies): Likewise.
4138         (init_cutu_and_read_dies_no_follow): Likewise.
4139         (process_psymtab_comp_unit_reader): Likewise.
4140         (partial_die_parent_scope): Likewise.
4141         (peek_die_abbrev): Likewise.
4142         (process_queue): Likewise.
4143         (dwarf2_physname): Likewise.
4144         (read_namespace_alias): Likewise.
4145         (read_import_statement): Likewise.
4146         (create_dwo_cu_reader): Likewise.
4147         (create_cus_hash_table): Likewise.
4148         (lookup_dwo_cutu): Likewise.
4149         (inherit_abstract_dies): Likewise.
4150         (read_func_scope): Likewise.
4151         (read_call_site_scope): Likewise.
4152         (dwarf2_add_member_fn): Likewise.
4153         (read_common_block): Likewise.
4154         (read_module_type): Likewise.
4155         (read_typedef): Likewise.
4156         (read_subrange_type): Likewise.
4157         (load_partial_dies): Likewise.
4158         (read_partial_die): Likewise.
4159         (find_partial_die): Likewise.
4160         (read_str_index): Likewise.
4161         (dwarf2_string_attr): Likewise.
4162         (build_error_marker_type): Likewise.
4163         (lookup_die_type): Likewise.
4164         (dump_die_shallow): Likewise.
4165         (follow_die_ref): Likewise.
4166         (dwarf2_fetch_die_loc_sect_off): Likewise.
4167         (dwarf2_fetch_constant_bytes): Likewise.
4168         (follow_die_sig): Likewise.
4169         (get_signatured_type): Likewise.
4170         (get_DW_AT_signature_type): Likewise.
4171         (dwarf2_find_containing_comp_unit): Likewise.
4172         (set_die_type): Likewise.
4173
4174 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
4175
4176         * arch/aarch64.c: Include "common-defs.h".
4177         * arch/amd64.c: Likewise.
4178         * arch/i386.c: Likewise.
4179
4180 2018-02-21  Tom Tromey  <tom@tromey.com>
4181
4182         * value.h: (extract_field_op): Update.
4183         * eval.c (extract_field_op): Return a const char *.
4184         * expression.h (parse_expression_for_completion): Update.
4185         * completer.c (complete_expression): Update.
4186         (add_struct_fields): Make fieldname const.
4187         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4188         (mark_completion_tag, parse_exp_in_context_1): Update.
4189         (parse_expression_for_completion): Change "name" to
4190         unique_xmalloc_ptr*.
4191
4192 2018-02-21  Tom Tromey  <tom@tromey.com>
4193
4194         * infcall.c (call_function_by_hand_dummy): Use std::vector.
4195
4196 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4197
4198         * avr-tdep.c (avr_read_pc): Change parameter type to
4199         readable_regcache.
4200         * gdbarch.sh (read_pc): Likewise.
4201         * gdbarch.c: Re-generated.
4202         * gdbarch.h: Re-generated.
4203         * hppa-tdep.c (hppa_read_pc): Change parameter type to
4204         readable_regcache.
4205         * ia64-tdep.c (ia64_read_pc): Likewise.
4206         * mips-tdep.c (mips_read_pc): Likewise.
4207         * spu-tdep.c (spu_read_pc): Likewise.
4208
4209 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4210
4211         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4212         * regcache-dump.c: New file.
4213         * regcache.c: Move register_dump to regcache-dump.c.
4214         (maintenance_print_registers): Likewise.
4215         (maintenance_print_raw_registers): Likewise.
4216         (maintenance_print_cooked_registers): Likewise.
4217         (maintenance_print_register_groups): Likewise.
4218         (maintenance_print_remote_registers): Likewise.
4219         (_initialize_regcache): Likewise.
4220         * regcache.h (register_dump): Moved from regcache.c.
4221
4222 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4223
4224         * regcache.c (regcache::regcache): Update.
4225         (regcache::invalidate): Move it to detached_regcache::invalidate.
4226         (get_thread_arch_aspace_regcache): Update.
4227         (regcache::raw_update): Update.
4228         (regcache::cooked_read): Remove some code.
4229         (regcache::cooked_read_value): Likewise.
4230         (regcache::raw_write): Remove assert on m_readonly_p.
4231         (regcache::raw_supply_integer): Move it to
4232         detached_regcache::raw_supply_integer.
4233         (regcache::raw_supply_zeroed): Likewise.
4234         * regcache.h (detached_regcache) <raw_supply_integer>: New
4235         declaration.
4236         <raw_supply_zeroed, invalidate>: Likewise.
4237         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4238         <invalidate>: Likewise.
4239         <m_readonly_p>: Removed.
4240
4241 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4242
4243         * infcmd.c (get_return_value): Let stop_regs point to
4244         get_current_regcache.
4245         * regcache.c (regcache::regcache): Remove.
4246         (register_dump_reg_buffer): New class.
4247         (regcache_print): Adjust.
4248         * regcache.h (regcache): Remove constructors.
4249
4250 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4251
4252         * regcache.c (class register_dump): New class.
4253         (register_dump_regcache, register_dump_none): New class.
4254         (register_dump_remote, register_dump_groups): New class.
4255         (regcache_print): Update.
4256         * regcache.h (regcache_dump_what): Move it to regcache.c.
4257         (regcache) <dump>: Remove.
4258
4259 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4260
4261         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4262          reg_buffer_rw *.
4263         (jit_unwind_reg_set_impl): Call raw_supply.
4264         (jit_frame_sniffer): Use reg_buffer_rw.
4265         * record-full.c (record_full_core_regbuf): Change its type.
4266         (record_full_core_open_1): Use reg_buffer_rw.
4267         (record_full_close): Likewise.
4268         (record_full_core_fetch_registers): Use regcache->raw_supply.
4269         (record_full_core_store_registers): Likewise.
4270         * regcache.c (regcache::get_register_status): Move it to
4271         reg_buffer.
4272         (regcache_raw_set_cached_value): Remove.
4273         (regcache::raw_set_cached_value): Remove.
4274         (regcache::raw_write): Call raw_supply.
4275         (regcache::raw_supply): Move it to reg_buffer_rw.
4276         * regcache.h (regcache_raw_set_cached_value): Remove.
4277         (reg_buffer_rw): New class.
4278
4279 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4280
4281         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4282         readonly_detached_regcache.
4283         (dummy_frame_prev_register): Use regcache->cooked_read.
4284         * frame.c (frame_save_as_regcache): Change return type.
4285         (frame_pop): Update.
4286         * frame.h (frame_save_as_regcache): Update declaration.
4287         * inferior.h (get_infcall_suspend_state_regcache): Update
4288         declaration.
4289         * infrun.c (infcall_suspend_state) <registers>: use
4290         readonly_detached_regcache.
4291         (save_infcall_suspend_state): Don't use regcache_dup.
4292         (get_infcall_suspend_state_regcache): Change return type.
4293         * linux-fork.c (struct fork_info) <savedregs>: Change to
4294         readonly_detached_regcache.
4295         <pc>: New field.
4296         (fork_save_infrun_state): Don't use regcache_dup.
4297         (info_checkpoints_command): Adjust.
4298         * mi/mi-main.c (register_changed_p): Update declaration.
4299         (mi_cmd_data_list_changed_registers): Use
4300         readonly_detached_regcache.
4301         (register_changed_p): Change parameter type to
4302         readonly_detached_regcache.
4303         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4304         readonly_detached_regcache.
4305         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4306         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4307         New.
4308         (regcache::save): Move it to reg_buffer.
4309         (regcache::restore): Change parameter type.
4310         (regcache_dup): Remove.
4311         * regcache.h (reg_buffer) <save>: New method.
4312         (readonly_detached_regcache): New class.
4313         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4314         readonly_detached_regcache.
4315         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4316
4317 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4318
4319         * frame.c (frame_save_as_regcache): Use regcache method save.
4320         (frame_pop): Use regcache method restore.
4321         * infrun.c (restore_infcall_suspend_state): Likewise.
4322         * linux-fork.c (fork_load_infrun_state): Likewise.
4323         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4324         save.
4325         * regcache.c (regcache_save): Remove.
4326         (regcache::restore): More asserts.
4327         (regcache_cpy): Remove.
4328         * regcache.h (regcache_save): Remove the declaration.
4329         (regcache::restore): Move from private to public.
4330         Remove the friend declaration of regcache_cpy.
4331         (regcache_cpy): Remove declaration.
4332
4333 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4334
4335         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4336         parameter type to 'readable_regcache *'.
4337         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4338         * arm-tdep.c (arm_neon_quad_read): Likewise.
4339         (arm_pseudo_read): Likewise.
4340         * avr-tdep.c (avr_pseudo_register_read): Likewise.
4341         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4342         * frv-tdep.c (frv_pseudo_register_read): Likewise.
4343         * gdbarch.c: Re-generated.
4344         * gdbarch.h: Re-generated.
4345         * gdbarch.sh (pseudo_register_read): Change parameter type to
4346         'readable_regcache *'.
4347         (pseudo_register_read_value): Likewise.
4348         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4349         (h8300_pseudo_register_read): Likewise.
4350         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4351         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4352         (i386_pseudo_register_read_into_value): Likewise.
4353         (i386_pseudo_register_read_value): Likewise.
4354         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4355         declaration.
4356         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4357         * m32c-tdep.c (m32c_raw_read): Likewise.
4358         (m32c_read_flg): Likewise.
4359         (m32c_banked_register): Likewise.
4360         (m32c_banked_read): Likewise.
4361         (m32c_sb_read): Likewise.
4362         (m32c_part_read): Likewise.
4363         (m32c_cat_read): Likewise.
4364         (m32c_r3r2r1r0_read): Likewise.
4365         (m32c_pseudo_register_read): Likewise.
4366         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4367         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4368         (mep_pseudo_cr64_read): Likewise.
4369         (mep_pseudo_register_read): Likewise.
4370         * mips-tdep.c (mips_pseudo_register_read): Likewise.
4371         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4372         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4373         * regcache.c (regcache::raw_read): Move it to readable_regcache.
4374         (regcache::cooked_read): Likewise.
4375         (regcache::cooked_read_value): Likewise.
4376         (regcache_cooked_read_signed):
4377         (regcache::cooked_read): Likewise.
4378         * regcache.h (readable_regcache): New class.
4379         (regcache): Inherit readable_regcache.  Move some methods to
4380         readable_regcache.
4381         * rl78-tdep.c (rl78_pseudo_register_read): Change
4382         parameter type to 'readable_regcache *'.
4383         * rs6000-tdep.c (do_regcache_raw_read): Remove.
4384         (e500_pseudo_register_read): Change parameter type to
4385         'readable_regcache *'.
4386         (dfp_pseudo_register_read): Likewise.
4387         (vsx_pseudo_register_read): Likewise.
4388         (efpr_pseudo_register_read): Likewise.
4389         * s390-tdep.c (s390_pseudo_register_read): Likewise.
4390         * sh-tdep.c (sh_pseudo_register_read): Likewise.
4391         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4392         (sh64_pseudo_register_read): Likewise.
4393         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4394         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4395         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4396         (spu_pseudo_register_read): Likewise.
4397         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4398         (xtensa_pseudo_register_read): Likewise.
4399
4400 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4401
4402         * regcache.c (regcache::regcache): Call reg_buffer ctor.
4403         (regcache::arch): Move it to reg_buffer::arch.
4404         (regcache::register_buffer): Likewise.
4405         (regcache::assert_regnum): Likewise.
4406         (regcache::num_raw_registers): Likewise.
4407         * regcache.h (reg_buffer): New class.
4408         (regcache): Inherit reg_buffer.
4409
4410 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4413         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4414
4415 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
4416
4417         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4418
4419 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
4420
4421         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4422         (SFILES): Remove common/*.c files.
4423         (COMMON_OBS): Remove some *.o files built from common/*.c files.
4424         * common/common.host: Add common reference.
4425         * configure.ac: Likewise.
4426         * configure: Regenerate.
4427
4428 2018-02-16  Yao Qi  <yao.qi@linaro.org>
4429
4430         * block.c (block_namespace_info): Inherit allocate_on_obstack.
4431         (block_initialize_namespace): Use new.
4432         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4433         (dwarf2_free_objfile): Use delete.
4434         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4435         (copy_type_recursive): Use new.
4436         * gdb_obstack.h (allocate_on_obstack): New.
4437
4438 2018-02-15  Yao Qi  <yao.qi@linaro.org>
4439
4440         PR gdb/22849
4441         * inferior.c (exit_inferior_1): Reset inf->control.
4442
4443 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
4444
4445         * ada-lang.c (ada_to_fixed_value_create): Delete advance
4446         declaration.
4447
4448 2018-02-14  Pedro Alves  <palves@redhat.com>
4449
4450         * frame-unwind.c (frame_unwind_try_unwinder): Always call
4451         frame_cleanup_after_sniffer on exception.
4452
4453 2018-02-14  Tom Tromey  <tom@tromey.com>
4454
4455         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4456         const.
4457         (solib_bfd_open): Make pathname const.
4458         * solib.c (solib_bfd_open): Make pathname const.
4459         * solib-spu.c (spu_bfd_fopen): Make name const.
4460         (spu_bfd_open): Make pathname const.
4461         * solib-darwin.c (darwin_bfd_open): Make pathname const.
4462         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4463
4464 2018-02-14  Tom Tromey  <tom@tromey.com>
4465
4466         * symfile.c (symfile_bfd_open): Update.
4467         * source.h (openp, source_full_path_of, find_and_open_source):
4468         Change argument type to unique_xmalloc_ptr.
4469         * source.c (openp): Take a unique_xmalloc_ptr.
4470         (source_full_path_of, find_and_open_source): Likewise.
4471         (open_source_file, symtab_to_fullname): Update.
4472         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4473         unique_xmalloc_ptr.
4474         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4475         (exec_file_find): Update.
4476         * psymtab.c (psymtab_to_fullname): Update.
4477         * nto-tdep.h (nto_find_and_open_solib): Update.
4478         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4479         unique_xmalloc_ptr.
4480         * exec.c (exec_file_attach): Update.
4481         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4482         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4483
4484 2018-02-14  Tom Tromey  <tom@tromey.com>
4485
4486         * solib.c: Include source.h.
4487         * nto-tdep.c: Include source.h.
4488         * mi/mi-cmd-env.c: Include source.h.
4489         * infcmd.c: Include source.h.
4490         * exec.c: Include source.h.
4491         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4492         (add_path, directory_switch, source_path, init_source_path): Move
4493         declarations...
4494         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4495         (add_path, directory_switch, source_path, init_source_path):
4496         ...here.
4497
4498 2018-02-14  Tom Tromey  <tom@tromey.com>
4499
4500         * solist.h (exec_file_find, solib_find): Return
4501         unique_xmalloc_ptr.
4502         (solib_bfd_fopen): Take a const char *.
4503         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4504         (exec_file_find, solib_find): Likewise.
4505         (solib_bfd_fopen): Do not take ownership of "pathname".
4506         (solib_bfd_open): Use unique_xmalloc_ptr.
4507         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4508         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4509         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4510         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4511
4512 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
4513
4514         * ada-lang.c (name_match_type_from_name): Remove reference to
4515         ada_name_for_lookup in function's documentation.
4516         * ada-lang.h (ada_name_for_lookup): Delete declaration.
4517
4518 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
4519
4520         * defs.h (enum openp_flags): New enum.
4521         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4522         Move to enum openp_flags.
4523         (openp_flags): New enum flags.
4524         (openp): Change parameter type to openp_flags.
4525         * source.c (openp): Change parameter type to openp_flags.
4526         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4527         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4528
4529 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
4530
4531         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4532         per-command.
4533
4534 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4535
4536         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4537         into...
4538         (class dwarf2_queue_guard): ...the destructor of this new class.
4539         (dw2_do_instantiate_symtab): Create instance of the new class
4540         dwarf2_queue_guard, remove cleanup.
4541
4542 2018-02-09  Tom Tromey  <tom@tromey.com>
4543
4544         * source.c (find_source_lines): Don't reference past the end of
4545         the vector.
4546
4547 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4548
4549         * remote.c (remote_btrace_maybe_reopen): Change error message.
4550         * btrace.c (btrace_enable): Likewise.
4551         (parse_xml_btrace): Likewise.
4552         (parse_xml_btrace_conf): Likewise.
4553
4554 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4555
4556         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4557         (linux_enable_pt, linux_enable_bts): Call
4558         diagnose_perf_event_open_fail.
4559
4560 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4561
4562         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4563         Remove parameter and change return type.  Update callers.  Move it.
4564         (linux_enable_bts, linux_enable_pt): Improve error message.
4565         (linux_enable_pt): Remove zero buffer size check.
4566         (linux_enable_btrace): Improve error messages.  Remove NULL return
4567         check.
4568
4569 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4570
4571         * btrace.c (btrace_enable): Remove target_supports_btrace call.
4572         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4573         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4574         (linux_supports_pt, linux_supports_btrace): Remove.
4575         (linux_enable_bts): Call cpu_supports_bts.
4576         * nat/linux-btrace.h (linux_supports_btrace): Remove.
4577         * remote.c (remote_supports_btrace): Remove.
4578         (init_remote_ops): Remove remote_supports_btrace.
4579         * target-delegates.c: Regenerated.
4580         * target.c (target_supports_btrace): Remove.
4581         * target.h (target_ops) <to_supports_btrace>: Remove
4582         (target_supports_btrace): Remove.
4583         * x86-linux-nat.c (x86_linux_create_target): Remove
4584         linux_supports_btrace.
4585
4586 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4587
4588         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4589         btrace failed.
4590         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4591         exception and use message in own exception.
4592
4593 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4594
4595         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4596         (perf_event_pt_event_type): Use gdb_file_up.
4597         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4598         scoped_fd, and scoped_mmap.
4599
4600 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4601
4602         * common/scoped_mmap.h: New.
4603         * unittests/scoped_mmap-selftest.c: New.
4604         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4605         unittests/scoped_mmap-selftest.c.
4606
4607 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4608
4609         * common/scoped_fd.h: New.
4610         * unittests/scoped_fd-selftest.c: New.
4611         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4612         unittests/scoped_fd-selftest.c.
4613
4614 2018-02-09  Tom Tromey  <tom@tromey.com>
4615
4616         * auto-load.c (auto_load_section_scripts): Use
4617         gdb::unique_xmalloc_ptr.
4618
4619 2018-02-09  Tom Tromey  <tom@tromey.com>
4620
4621         * auto-load.c (execute_script_contents): Use std::string.
4622
4623 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
4624
4625         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4626         Python function, rather than a new command.
4627
4628 2018-02-08  Tom Tromey  <tom@tromey.com>
4629
4630         * solib.c (solib_find_1): Use std::string.
4631         (solib_bfd_fopen): Use unique_xmalloc_ptr.
4632
4633 2018-02-08  Tom Tromey  <tom@tromey.com>
4634
4635         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4636
4637 2018-02-08  Tom Tromey  <tom@tromey.com>
4638
4639         * source.c (find_source_lines): Use gdb::def_vector.
4640
4641 2018-02-08  Tom Tromey  <tom@tromey.com>
4642
4643         * macrocmd.c (struct temporary_macro_definition): New.
4644         (macro_define_command): Use temporary_macro_definition.  Remove
4645         cleanups.
4646         (free_macro_definition_ptr): Remove.
4647
4648 2018-02-08  Tom Tromey  <tom@tromey.com>
4649
4650         * macroexp.c (maybe_expand): Use std::string.
4651
4652 2018-02-08  Tom Tromey  <tom@tromey.com>
4653
4654         * macroexp.c (struct macro_buffer): Add initializers for some
4655         members.
4656         (init_buffer, init_shared_buffer, free_buffer)
4657         (free_buffer_return_text): Remove.
4658         (macro_buffer): New constructors.
4659         (~macro_buffer): New destructor.
4660         (macro_buffer::set_shared): New method.
4661         (macro_buffer::resize_buffer, macro_buffer::appendc)
4662         (macro_buffer::appendmem): Now methods, not free functions.
4663         (set_token, append_tokens_without_splicing, stringify)
4664         (macro_stringify): Update.
4665         (gather_arguments): Change return type.  Remove argc_p argument,
4666         add args_ptr argument.  Use std::vector.
4667         (substitute_args): Remove argc argument.  Accept std::vector.
4668         (expand): Update.  Use std::vector.
4669         (scan, macro_expand, macro_expand_next): Update.
4670
4671 2018-02-08  Tom Tromey  <tom@tromey.com>
4672
4673         * symtab.c (default_collect_symbol_completion_matches_break_on):
4674         Use unique_xmalloc_ptr.
4675         * macroscope.h: (sal_macro_scope, user_macro_scope)
4676         (default_macro_scope): Return unique_xmalloc_ptr.
4677         * macroscope.c (sal_macro_scope, user_macro_scope)
4678         (default_macro_scope): Return unique_xmalloc_ptr.
4679         * macroexp.h (macro_expand, macro_expand_once): Return
4680         unique_xmalloc_ptr.
4681         * macroexp.c (macro_expand, macro_expand_once): Return
4682         unique_xmalloc_ptr.
4683         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4684         (info_macro_command, info_macros_command): Use
4685         unique_xmalloc_ptr.
4686         * compile/compile-c-support.c (write_macro_definitions): Use
4687         unique_xmalloc_ptr.
4688         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4689
4690 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
4691
4692         * value.c (value_static_field): Assign field type instead of
4693         containing type when returning an optimized out value.
4694
4695 2018-02-06  Yao Qi  <yao.qi@linaro.org>
4696
4697         * ft32-tdep.c (ft32_read_pc): Remove.
4698         (ft32_write_pc): Remove.
4699         (ft32_gdbarch_init): Update.
4700         * m32r-tdep.c (m32r_read_pc): Remove.
4701         (m32r_gdbarch_init): Update.
4702         * mep-tdep.c (mep_read_pc): Remove.
4703         (mep_gdbarch_init): Update.
4704         * microblaze-tdep.c (microblaze_write_pc): Remove.
4705         (microblaze_gdbarch_init): Update.
4706         * mn10300-tdep.c (mn10300_read_pc): Remove.
4707         (mn10300_write_pc): Remove.
4708         (mn10300_gdbarch_init): Update.
4709         * moxie-tdep.c (moxie_read_pc): Remove.
4710         (moxie_write_pc): Remove.
4711         (moxie_gdbarch_init): Update.
4712
4713 2018-02-06  Yao Qi  <yao.qi@linaro.org>
4714
4715         * expprint.c (print_subexp_standard): Handle
4716         OP_F77_UNDETERMINED_ARGLIST.
4717         (dump_subexp_body_standard): Likewise.
4718
4719 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
4720
4721         * target-descriptions.c (tdesc_element_visitor) Add empty
4722         implementations.
4723         (tdesc_type): Move make_gdb_type from here.
4724         (tdesc_type_builtin): Likewise.
4725         (tdesc_type_vector): Likewise.
4726         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4727         (make_gdb_type_struct): Move from tdesc_type_with_fields.
4728         (make_gdb_type_union): Likewise.
4729         (make_gdb_type_flags): Likewise.
4730         (make_gdb_type_enum): Likewise.
4731         (make_gdb_type): New function.
4732         (tdesc_register_type): Use static make_gdb_type.
4733
4734 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
4735
4736         * infcmd.c (default_print_one_register_info): Align natural-format
4737         column values consistently one under another.
4738         (pad_to_column): New function.
4739
4740 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
4741
4742         * dwarf2read.c (dwarf2_physname): Move commment.
4743
4744 2018-02-01  Leszek Swirski  <leszeks@google.com>
4745
4746         * varobj.c (varobj_formatted_print_options): Allow recursive
4747         pretty printing if pretty printing is enabled.
4748
4749 2018-02-01  Leszek Swirski  <leszeks@google.com>
4750
4751         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
4752         names after a structop as a filename.
4753
4754 2018-02-01  Yao Qi  <yao.qi@linaro.org>
4755
4756         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
4757         (arm_record_coproc_data_proc): Likewise.
4758
4759 2018-02-01  Yao Qi  <yao.qi@linaro.org>
4760
4761         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
4762
4763 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
4764
4765         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
4766         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
4767
4768 2018-01-31  Pedro Alves  <palves@redhat.com>
4769
4770         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
4771         * inflow.c (child_terminal_save_inferior): Wrap reference to
4772         tcgetpgrp in HAVE_TERMIOS_H.
4773         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
4774         _WIN32.
4775         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
4776         always iterate over all inferiors.
4777         (gdbsim_cntrl_c): Adjust.
4778         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
4779
4780 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
4781
4782         * gdbtypes.c (lookup_array_range_type): Make sure the array's
4783         index type is objfile-owned if the element type is as well.
4784
4785 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
4786
4787         GDB 8.1 released.
4788
4789 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4790
4791         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
4792         "features/s390x-linux64.c".
4793         (_initialize_s390_linux_tdep): Remove initialization of tdescs
4794         s390_linux32 and s390x_linux64.
4795         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
4796         default tdesc.
4797         * s390-tdep.c: Include "features/s390-linux32.c" and
4798         "features/s390x-linux64.c".
4799         (s390_tdesc_valid): Add check for tdesc_has_registers.
4800         (s390_gdbarch_init): Make sure there is always a valid tdesc.
4801         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
4802         tdesc_s390x_linux64.
4803         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
4804         tdesc_s390x_linux64 to...
4805         * s390-tdep.h: ...here.
4806
4807 2018-01-30  Pedro Alves  <palves@redhat.com>
4808
4809         PR gdb/13211
4810         * config.in, configure: Regenerate.
4811         * configure.ac: Check for getpgid.
4812         * go32-nat.c (go32_pass_ctrlc): New.
4813         (go32_target): Install it.
4814         * inf-child.c (inf_child_target): Install
4815         child_terminal_save_inferior, child_pass_ctrlc and
4816         child_interrupt.
4817         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
4818         (inf_ptrace_target): No longer install it.
4819         * infcmd.c (interrupt_target_1): Adjust.
4820         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
4821         (child_interrupt): Declare.
4822         (inferior::terminal_state): New.
4823         * inflow.c (struct terminal_info): Update comments.
4824         (inferior_process_group): Delete.
4825         (terminal_is_ours): Delete.
4826         (gdb_tty_state): New.
4827         (child_terminal_init): Adjust.
4828         (is_gdb_terminal, sharing_input_terminal_1)
4829         (sharing_input_terminal): New functions.
4830         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
4831         Set the process's actual process group in the foreground if
4832         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
4833         mark terminal as the inferior's if not sharing GDB's terminal.
4834         Don't check attach_flag.
4835         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
4836         pass down a target_terminal_state.
4837         (child_terminal_save_inferior): New, factored out from ...
4838         (child_terminal_ours_1): ... this.  Handle
4839         target_terminal_state::is_ours_for_output.
4840         (child_interrupt, child_pass_ctrlc): New.
4841         (inflow_inferior_exit): Clear the inferior's terminal_state.
4842         (copy_terminal_info): Copy the inferior's terminal state.
4843         (_initialize_inflow): Remove reference to terminal_is_ours.
4844         * inflow.h (inferior_process_group): Delete.
4845         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
4846         * procfs.c (procfs_target): Don't install procfs_interrupt.
4847         (procfs_interrupt): Delete.
4848         * remote.c (remote_serial_quit_handler): Adjust.
4849         (remote_interrupt): Remove ptid parameter.  Adjust.
4850         * target-delegates.c: Regenerate.
4851         * target.c: Include "terminal.h".
4852         (target_terminal::terminal_state): Rename to ...
4853         (target_terminal::m_terminal_state): ... this.
4854         (target_terminal::init): Adjust.
4855         (target_terminal::inferior): Adjust to per-inferior
4856         terminal_state.
4857         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
4858         (target_terminal::ours, target_terminal::ours_for_output): Use
4859         target_terminal_is_ours_kind.
4860         (target_interrupt): Remove ptid parameter.  Adjust.
4861         (default_target_pass_ctrlc): Adjust.
4862         * target.h (target_ops::to_terminal_save_inferior): New field.
4863         (target_ops::to_interrupt): Remove ptid_t parameter.
4864         (target_interrupt): Remove ptid_t parameter.  Update comment.
4865         (target_pass_ctrlc): Update comment.
4866         * target/target.h (target_terminal_state): New scoped enum,
4867         factored out of ...
4868         (target_terminal::terminal_state): ... here.
4869         (target_terminal::inferior): Update comments.
4870         (target_terminal::restore_inferior): New.
4871         (target_terminal::is_inferior, target_terminal::is_ours)
4872         (target_terminal::is_ours_for_output): Adjust.
4873         (target_terminal::scoped_restore_terminal_state): Adjust to
4874         rename, and call restore_inferior() instead of inferior().
4875         (target_terminal::scoped_restore_terminal_state::m_state): Change
4876         type.
4877         (target_terminal::terminal_state): Rename to ...
4878         (target_terminal::m_terminal_state): ... this and change type.
4879
4880 2018-01-30  Pedro Alves  <palves@redhat.com>
4881
4882         * linux-nat.c (wait_for_signal): New function.
4883         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
4884         directly.
4885         (async_terminal_is_ours)
4886         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
4887         (linux_nat_add_target): Don't override
4888         to_terminal_inferior/to_terminal_ours.
4889
4890 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4891
4892         * remote.c (remote_follow_fork): Don't call "detach_inferior".
4893
4894 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
4895
4896         * dwarf2read.c (free_dwo_files): Add forward-declaration.
4897         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
4898         dwarf2_per_objfile_free here.
4899         (dwarf2_per_objfile_free): Remove.
4900         (_initialize_dwarf2_read): Don't register
4901         dwarf2_per_objfile_free as a registry cleanup.
4902
4903 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
4904
4905         Avoid compilation errors in MinGW native builds
4906
4907         The error is triggered by including python-internal.h, and the
4908         error message is:
4909
4910              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
4911                       from build-gnulib/import/math.h:27,
4912                       from d:/usr/Python26/include/pyport.h:235,
4913                       from d:/usr/Python26/include/Python.h:58,
4914                       from python/python-internal.h:94,
4915                       from python/py-arch.c:24:
4916              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
4917         using ::hypot;
4918                 ^~~~~
4919
4920         This happens because Python headers define 'hypot' to expand t
4921         '_hypot' in the Windows builds.
4922         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
4923         'hypoth'.  This avoids a compilation error.
4924
4925 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
4926
4927         * MAINTAINERS (Write After Approval): Fix ordering.
4928
4929 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
4930
4931         * MAINTAINERS (Write After Approval): Add Alan Hayward.
4932
4933 2018-01-26  Alan Modra  <amodra@gmail.com>
4934
4935         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
4936         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
4937         Remove nop.  Make const.  Comment.
4938         (powerpc32_plt_stub_so_2): New.
4939         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
4940         Correct count.  Update uses.
4941         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
4942         Move common code reading PLT entry word.  Correct
4943         powerpc32_plt_stub PLT address calculation.
4944         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
4945         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
4946         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
4947         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
4948         (ppc64_standard_linkage8): Likewise.
4949         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
4950         Correct insns description.
4951         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
4952
4953 2018-01-24  Pedro Alves  <palves@redhat.com>
4954
4955         GCC PR libstdc++/83906
4956         * gdbtypes.c (operator==(const dynamic_prop &,
4957         const dynamic_prop &)): New.
4958         (operator==(const range_bounds &, const range_bounds &)): New.
4959         (check_types_equal): Use them instead of memcmp.
4960         * gdbtypes.h (operator==(const dynamic_prop &,
4961         const dynamic_prop &)): Declare.
4962         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
4963         (operator==(const range_bounds &, const range_bounds &)): Declare.
4964         (operator!=(const range_bounds &, const range_bounds &)): Declare.
4965
4966 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4967
4968         * s390-linux-tdep.c (s390_record_address_mask)
4969         (s390_record_calc_disp_common, s390_record_calc_disp)
4970         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
4971         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
4972         (s390_process_record): Move to s390-tdep.c.
4973         (s390_linux_init_abi_any): Adjust.
4974         * s390-tdep.c (s390_record_address_mask)
4975         (s390_record_calc_disp_common, s390_record_calc_disp)
4976         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
4977         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
4978         (s390_process_record): Moved from s390-linux-tdep.c
4979         (s390_gdbarch_init): Adjust.
4980
4981 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4982
4983         * s390-linux-nat.c (s390-tdep.h): New include.
4984         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
4985         (HFILES_NO_SRCDIR): Add s390-tdep.h.
4986         (ALLDEPFILES): Add s390-tdep.c.
4987         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
4988         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
4989         * s390-tdep.h: ...this.  New file.
4990         * s390-linux-tdep.c (s390-tdep.h): New include.
4991         (_initialize_s390_tdep): Rename to...
4992         (_initialize_s390_linux_tdep): ...this and adjust.
4993         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
4994         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
4995         s390-tdep.h.
4996         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
4997         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
4998         (s390_is_partial_instruction, s390_software_single_step)
4999         (is_non_branch_ril, s390_displaced_step_copy_insn)
5000         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5001         (s390_prologue_data, s390_addr, s390_store, s390_load)
5002         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5003         (s390_register_call_saved, s390_guess_tracepoint_registers)
5004         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5005         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5006         (s390_pseudo_register_name, s390_pseudo_register_type)
5007         (s390_pseudo_register_read, s390_pseudo_register_write)
5008         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5009         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5010         (s390_addr_bits_remove, s390_address_class_type_flags)
5011         (s390_address_class_type_flags_to_name)
5012         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5013         (s390_function_arg_float, s390_function_arg_vector)
5014         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5015         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5016         (s390_frame_align, s390_register_return_value, s390_return_value)
5017         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5018         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5019         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5020         (s390_trad_frame_prev_register, s390_unwind_cache)
5021         (s390_prologue_frame_unwind_cache)
5022         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5023         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5024         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5025         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5026         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5027         (s390_frame_base_address, s390_local_base_address)
5028         (s390_frame_base, s390_gcc_target_options)
5029         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5030         (s390_validate_reg_range, s390_tdesc_valid)
5031         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5032         * s390-tdep.c: ...this.  New file.
5033
5034 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5035
5036         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5037         (s390_process_record, s390_gdbarch_tdep_alloc)
5038         (s390_linux_init_abi_any): Use/set new hook.
5039
5040 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5041
5042         * s390-linux-tdep.c (osabi.h): New include.
5043         (s390_linux_init_abi_31, s390_linux_init_abi_64)
5044         (s390_linux_init_abi_any): New functions.
5045         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5046
5047 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5048
5049         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5050         tdesc_has_registers check
5051
5052 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5053
5054         * s390-linux-tdep.c (s390_tdesc_valid): New function.
5055         (s390_validate_reg_range): New macro.
5056         (s390_gdbarch_init): Adjust.
5057
5058 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5059
5060         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5061         (s390_gdbarch_tdep_alloc): Adjust.
5062         (s390_gdbarch_init): Adjust.
5063
5064 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5065
5066         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5067         <have_tdb>: Change type to bool.
5068         (s390_gdbarch_tdep_alloc): Adjust.
5069         (s390_gdbarch_init): Adjust.
5070
5071 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5072
5073         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5074         (gdbarch_tdep) <have_upper, have_vx>: New fields.
5075         (s390_gdbarch_tdep_alloc): New function.
5076         (s390_gdbarch_init): Allocate tdep at start and use its fields
5077         instead of separate variables.
5078
5079 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5080
5081         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5082         when looking for cached gdbarch and add comment for remaining.
5083
5084 2018-01-22  Pedro Alves  <palves@redhat.com>
5085             Sergio Durigan Junior  <sergiodj@redhat.com>
5086
5087         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5088         case.
5089
5090 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
5091
5092         * MAINTAINERS: Update my company e-mail address.
5093
5094 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5095
5096         * regcache.c (cooked_write_test): New function.
5097         (_initialize_regcache): Register the test.
5098
5099 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5100
5101         * ia64-tdep.c (ia64_pseudo_register_read): Call
5102         regcache->cooked_read instead of regcache_cooked_read_unsigned.
5103         * m32c-tdep.c (m32c_cat_read): Likewise.
5104         (m32c_r3r2r1r0_read): Likewise.
5105         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5106         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5107
5108 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5109
5110         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5111         method raw_read instead of regcache_raw_read.
5112         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5113         * arm-tdep.c (arm_neon_quad_read): Likewise.
5114         * avr-tdep.c (avr_pseudo_register_read): Likewise.
5115         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5116         * frv-tdep.c (frv_pseudo_register_read): Likewise.
5117         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5118         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5119         (i386_pseudo_register_read_into_value): Likewise.
5120         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5121         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5122         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5123         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5124         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5125         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
5126         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5127         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
5128         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5129
5130 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5131
5132         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5133         * configure.tgt: Remove target mt.
5134         * mt-tdep.c: Remove.
5135         * regcache.c (cooked_read_test): Remove the check for mt.
5136
5137 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5138
5139         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5140         instead of gdbarch_pseudo_register_read_value.
5141
5142 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
5143
5144         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5145         language is Ada.
5146
5147 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
5148
5149         * linespec.c (create_sals_line_offset): Remove code that preserved
5150         the symtab_and_line's line number.
5151
5152 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5153
5154         * varobj.c (varobj_create): Don't set valid_block when creating a
5155         floating varobj.
5156
5157 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5158
5159         * varobj.c (varobj_create): Remove out of date comment.
5160
5161 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5162
5163         PR mi/20395
5164         * ada-exp.y (write_var_from_sym): Pass extra parameter when
5165         updating innermost block.
5166         * parse.c (innermost_block_tracker::update): Take extra type
5167         parameter, and check types match before updating innermost block.
5168         (write_dollar_variable): Update innermost block for registers.
5169         * parser-defs.h (enum innermost_block_tracker_type): New enum.
5170         (innermost_block_tracker::innermost_block_tracker): Initialise
5171         m_types member.
5172         (innermost_block_tracker::reset): Take type parameter.
5173         (innermost_block_tracker::update): Take type parameter, and pass
5174         type through as needed.
5175         (innermost_block_tracker::m_types): New member.
5176         * varobj.c (varobj_create): Pass type when reseting innermost
5177         block.
5178
5179 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5180
5181         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5182         * ada-lang.c (resolve_subexp): Likewise.
5183         * breakpoint.c (set_breakpoint_condition) Likewise.
5184         (watch_command_1) Likewise.
5185         * c-exp.y (variable): Likewise.
5186         * d-exp.y (PrimaryExpression): Likewise.
5187         * f-exp.y (variable): Likewise.
5188         * go-exp.y (variable): Likewise.
5189         * m2-exp.y (variable): Likewise.
5190         * objfiles.c (objfile::~objfile): Likewise.
5191         * p-exp.y (variable): Likewise.
5192         * parse.c (innermost_block): Change type.
5193         * parser-defs.h (class innermost_block_tracker): New.
5194         (innermost_block): Change to innermost_block_tracker.
5195         * printcmd.c (display_command): Switch to innermost_block API.
5196         (do_one_display): Likewise.
5197         * rust-exp.y (do_one_display): Likewise.
5198         * symfile.c (clear_symtab_users): Likewise.
5199         * varobj.c (varobj_create): Switch to innermost_block API, replace
5200         use of innermost_block with block stored on varobj object.
5201
5202 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5203
5204         * expression.h (innermost_block): Remove declaration.
5205         * varobj.c: Add 'parser-defs.h' include.
5206
5207 2018-01-19  Tom Tromey  <tom@tromey.com>
5208
5209         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5210         symbols in the static and global blocks.
5211
5212 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
5213
5214         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5215         gdb_ptrace.h, and move including gdb_wait.h ...
5216         * nat/linux-ptrace.h: ... to here.
5217
5218 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
5219
5220         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5221         inf_ptrace_detach_success.
5222         (inf_ptrace_detach_success): Add inferior parameter, use it
5223         instead of inferior_ptid, pass it to detach_inferior.
5224         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5225         parameter.
5226         * inferior.c (detach_inferior): Add overload that takes an
5227         inferior object.
5228         * inferior.h (detach_inferior): Likewise.
5229         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5230         use inferior_ptid, adjust call to inf_ptrace_detach_success.
5231         * linux-thread-db.c (thread_db_detach): Use inf parameter.
5232
5233 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
5234
5235         * target.h (struct target_ops) <to_detach>: Add inferior
5236         parameter.
5237         (target_detach): Likewise.
5238         * target.c (dispose_inferior): Pass inferior down.
5239         (target_detach): Pass inferior down.  Assert that it is equal to
5240         the current inferior.
5241         * aix-thread.c (aix_thread_detach): Pass inferior down.
5242         * corefile.c (core_file_command): Pass current_inferior() down.
5243         * corelow.c (core_detach): Add inferior parameter.
5244         * darwin-nat.c (darwin_detach): Likewise.
5245         * gnu-nat.c (gnu_detach): Likewise.
5246         * inf-ptrace.c (inf_ptrace_detach): Likewise.
5247         * infcmd.c (detach_command): Pass current_inferior() down to
5248         target_detach.
5249         * infrun.c (follow_fork_inferior): Pass parent_inf to
5250         target_detach.
5251         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5252         target_detach.
5253         * linux-nat.c (linux_nat_detach): Add inferior parameter.
5254         * linux-thread-db.c (thread_db_detach): Likewise.
5255         * nto-procfs.c (procfs_detach): Likewise.
5256         * procfs.c (procfs_detach): Likewise.
5257         * record.c (record_detach): Likewise.
5258         * record.h (struct inferior): Forward-declare.
5259         (record_detach): Add inferior parameter.
5260         * remote-sim.c (gdbsim_detach): Likewise.
5261         * remote.c (remote_detach_1): Likewise.
5262         (remote_detach): Likewise.
5263         (extended_remote_detach): Likewise.
5264         * sol-thread.c (sol_thread_detach): Likewise.
5265         * target-debug.h (target_debug_print_inferior_p): New macro.
5266         * target-delegates.c: Re-generate.
5267         * top.c (kill_or_detach): Pass inferior down to target_detach.
5268         * windows-nat.c (windows_detach): Add inferior parameter.
5269
5270 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
5271
5272         * target.h (struct target_ops) <to_detach>: Remove args
5273         parameter.
5274         (target_detach): Likewise.
5275         * target.c (dispose_inferior): Adjust.
5276         (target_detach): Remove args parameter, adjust.
5277         * aix-thread.c (aix_thread_detach): Adjust.
5278         * corefile.c (core_file_command): Adjust.
5279         * corelow.c (core_detach): Adjust.
5280         * darwin-nat.c (darwin_detach): Adjust.
5281         * gnu-nat.c (gnu_detach): Adjust.
5282         * inf-ptrace.c (inf_ptrace_detach): Adjust.
5283         * infcmd.c (detach_command): Adjust
5284         * infrun.c (follow_fork_inferior): Adjust.
5285         (handle_vfork_child_exec_or_exit): Adjust.
5286         * linux-fork.c (linux_fork_detach): Remove args parameter.
5287         * linux-fork.h (linux_fork_detach): Likewise.
5288         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5289         * linux-thread-db.c (thread_db_detach): Likewise.
5290         * nto-procfs.c (procfs_detach): Likewise.
5291         * procfs.c (procfs_detach): Likewise.
5292         (do_detach): Remove signo parameter.
5293         * record.c (record_detach): Remove args parameter.
5294         * record.h (record_detach): Likewise.
5295         * remote-sim.c (gdbsim_detach): Likewise.
5296         * remote.c (remote_detach_1): Likewise.
5297         (remote_detach): Likewise.
5298         (extended_remote_detach): Likewise.
5299         * sol-thread.c (sol_thread_detach): Likewise.
5300         * target-delegates.c: Re-generate.
5301         * top.c (struct qt_args) <args>: Remove field.
5302         (kill_or_detach): Don't pass args.
5303         (quit_force): Don't set args.
5304         * windows-nat.c (windows_detach): Remove args parameter.
5305
5306 2018-01-19  Yao Qi  <yao.qi@linaro.org>
5307
5308         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5309         (arm_linux_init_abi): Install it.
5310
5311 2018-01-19  Yao Qi  <yao.qi@linaro.org>
5312
5313         * osabi.c (gdb_osabi_names): Extend the regexp for
5314         arm-linux-gnueabihf.
5315
5316 2018-01-18  Yao Qi  <yao.qi@linaro.org>
5317
5318         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5319         m_abbrevs.
5320         (abbrev_table::add_abbrev): Update.
5321         (abbrev_table::lookup_abbrev): Update.
5322
5323 2018-01-18  Yao Qi  <yao.qi@linaro.org>
5324
5325         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5326
5327 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
5328
5329         * compile/compile.c (compile_to_object): Convert "triplet_rx"
5330         to "std::string".
5331
5332 2018-01-17  Tom Tromey  <tom@tromey.com>
5333
5334         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
5335
5336 2018-01-17  Tom Tromey  <tom@tromey.com>
5337
5338         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5339         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5340         (create_array_type_with_stride): Update.
5341         * dwarf2read.c (set_die_type): Update.
5342
5343 2018-01-17  Tom Tromey  <tom@tromey.com>
5344
5345         * dwarf2read.c (delayed_method_info): Remove typedef.
5346         (dwarf2_cu::method_info): Now a std::vector.
5347         (add_to_method_list): Update.
5348         (free_delayed_list): Remove.
5349         (compute_delayed_physnames): Update.
5350         (process_full_comp_unit, process_full_type_unit): Clear the method
5351         list.  Remove cleanups.
5352         (psymtab_include_file_name): Add name_holder parameter.  Use
5353         unique_xmalloc_ptr.
5354         (dwarf_decode_lines): Update.
5355
5356 2018-01-17  Tom Tromey  <tom@tromey.com>
5357             Simon Marchi  <simon.marchi@ericsson.com>
5358
5359         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5360         (dwarf2_per_objfile::free_cached_comp_units)
5361         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5362         (init_cutu_and_read_dies_no_follow): Update.
5363         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5364         (dwarf2_cu::~dwarf2_cu): New.
5365         (free_heap_comp_unit, free_stack_comp_unit): Remove.
5366         (age_cached_comp_units, free_one_cached_comp_unit): Update.
5367
5368 2018-01-17  Tom Tromey  <tom@tromey.com>
5369             Simon Marchi  <simon.marchi@ericsson.com>
5370
5371         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5372         (struct die_reader_specs) <abbrev_table>: New member.
5373         (struct abbrev_table): Add constructor.
5374         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5375         <abbrev_obstack>: Now an auto_obstack.
5376         (abbrev_table_up): New typedef.
5377         (init_cu_die_reader): Add abbrev_table parameter.
5378         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5379         Add result_dwo_abbrev_table.
5380         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5381         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5382         Update.
5383         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5384         parameter.
5385         (skip_children): Update.
5386         (abbrev_table::alloc_abbrev): Rename from
5387         abbrev_table_alloc_abbrev.
5388         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5389         (abbrev_table::lookup_abbrev): Rename from
5390         abbrev_table_lookup_abbrev.
5391         (abbrev_table_read_table): Return abbrev_table_up.
5392         (abbrev_table_free, abbrev_table_free_cleanup)
5393         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5394         (load_partial_dies): Update.
5395
5396 2018-01-17  Tom Tromey  <tom@tromey.com>
5397
5398         * dwarf2read.c (dwarf2_compute_name): Update comment.
5399         (read_func_scope, read_variable): Update.
5400         (new_symbol): Remove.
5401         (new_symbol_full): Rename to new_symbol.
5402
5403 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
5404
5405         PR gdb/16577
5406         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5407         a warning instead of throwing an error, set section size to 0 and return
5408         NULL.
5409         * gdb_bfd.h (gdb_bfd_map_section): Update description.
5410
5411 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
5412
5413         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5414         std::string.
5415         (linux_ptrace_attach_fail_reason_string): Likewise.
5416         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5417         Likewise.
5418         (linux_ptrace_attach_fail_reason_string): Likewise.
5419         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5420
5421 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
5422
5423         * linux-nat.c (linux_nat_attach): Remove xstrdup.
5424
5425 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
5426
5427         PR gdb/21559
5428         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5429         checking for fs_base/gs_base fields in struct user_regs_struct.
5430         * configure: Regenerate.
5431
5432 2018-01-17  Yao Qi  <yao.qi@linaro.org>
5433
5434         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5435         function.
5436         (aarch64_linux_init_abi): Install it to gdbarch hook
5437         gcc_target_options.
5438
5439 2018-01-15  Pedro Alves  <palves@redhat.com>
5440
5441         * common/signals-state-save-restore.c
5442         (save_original_signals_state): Fix typos.
5443
5444 2017-01-12  Tom Tromey  <tom@tromey.com>
5445             Sergio Durigan Junior  <sergiodj@redhat.com>
5446
5447         * Makefile.in (install-only): Install gdb-add-index.
5448
5449 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
5450
5451         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5452
5453 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5454
5455         * infrun.c (keep_going_pass_signal): Clear step-over info when
5456         insert_breakpoints fails.
5457
5458 2018-01-11  Pedro Alves  <palves@redhat.com>
5459
5460         PR gdb/22583
5461         * infrun.c (resume): Rename to ...
5462         (resume_1): ... this.
5463         (resume): Reimplement as wrapper around resume_1.
5464
5465 2018-01-11  Pedro Alves  <palves@redhat.com>
5466
5467         PR remote/22597
5468         * remote.c (remote_parse_stop_reply): Default to the last-set
5469         general thread instead of to 'magic_null_ptid'.
5470
5471 2018-01-10  Pedro Alves  <palves@redhat.com>
5472
5473         * language.h (language_get_symbol_name_matcher): Rename ...
5474         (get_symbol_name_matcher): ... this.
5475         * language.c (language_get_symbol_name_matcher): Ditto.
5476         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5477         callers adjusted.
5478
5479 2018-01-10  Pedro Alves  <palves@redhat.com>
5480
5481         PR gdb/22670
5482         * dwarf2read.c
5483         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5484         Adjust to use language_get_symbol_name_matcher instead of
5485         language_defn::la_get_symbol_name_matcher.
5486         * language.c (language_get_symbol_name_matcher): If in Ada mode
5487         and the lookup name is a verbatim match, return Ada's matcher.
5488         * language.h (language_get_symbol_name_matcher): Adjust comment.
5489         (ada_lookup_name_info::verbatim_p):: New method.
5490
5491 2018-01-10  Pedro Alves  <palves@redhat.com>
5492
5493         PR gdb/22670
5494         * ada-lang.c (ada_collect_symbol_completion_matches): If the
5495         minsym's language is language_auto or language_cplus, pass down
5496         language_ada instead.
5497         * symtab.c (compare_symbol_name): Don't frob symbol language here.
5498
5499 2018-01-10  Pedro Alves  <palves@redhat.com>
5500
5501         PR gdb/22670
5502         * minsyms.c (linkage_name_str): New function.
5503         (iterate_over_minimal_symbols): Use it.
5504
5505 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5506
5507         * NEWS: Document that 'info proc' now works on FreeBSD.
5508
5509 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5510
5511         * configure.ac: Check for kinfo_getfile in libutil.
5512         * configure: Regenerate.
5513         * config.in: Regenerate.
5514         * fbsd-nat.c: Include "fbsd-tdep.h".
5515         (fbsd_fetch_cmdline): New.
5516         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5517         rather than calling error.
5518         (fbsd_info_proc): New.
5519         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5520         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5521         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5522
5523 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5524
5525         * fbsd-nat.c (struct free_deleter): Remove.
5526         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5527
5528 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5529
5530         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5531         NULL for an empty pathname.
5532
5533 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5534
5535         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5536         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5537         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5538         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5539         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5540         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5541         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5542         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5543         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5544         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5545         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5546         (fbsd_core_fetch_timeval, fbsd_print_sigset)
5547         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5548         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
5549         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5550
5551 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
5552
5553         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5554         (gnu_xfer_auxv): New function.
5555         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5556         TARGET_OBJECT_AUXV.
5557
5558 2018-01-08  Yao Qi  <yao.qi@linaro.org>
5559             Simon Marchi  <simon.marchi@ericsson.com>
5560
5561         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5562         common/selftest.c.
5563         (COMMON_OBS): Remove selftest.o.
5564         * configure.ac: Append selftest-arch.c and common/selftest.c to
5565         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
5566         * configure: Re-generated.
5567         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5568         GDB_SELF_TEST.
5569         (maintenance_info_selftests): Likewise.
5570
5571 2018-01-08  Xavier Roirand  <roirand@adacore.com>
5572
5573         * ada-valprint.c (val_print_packed_array_elements): Use
5574         proper number of elements when printing an array indexed
5575         by an enumeration type.
5576
5577 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
5578
5579         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5580         (dw2_get_file_names_reader): Adjust.
5581         (lookup_dwo_signatured_type): Adjust.
5582         (lookup_dwp_signatured_type): Adjust.
5583         (lookup_signatured_type): Adjust.
5584         (create_type_unit_group): Adjust.
5585         (get_type_unit_group): Adjust.
5586         (process_psymtab_comp_unit_reader): Adjust.
5587         (build_type_psymtabs_reader): Adjust.
5588         (scan_partial_symbols): Adjust.
5589         (add_partial_symbol): Adjust.
5590         (add_partial_subprogram): Adjust.
5591         (peek_die_abbrev): Adjust.
5592         (fixup_go_packaging): Adjust.
5593         (process_imported_unit_die): Adjust.
5594         (dwarf2_compute_name): Adjust.
5595         (dwarf2_physname): Adjust.
5596         (read_import_statement): Adjust.
5597         (handle_DW_AT_stmt_list): Adjust.
5598         (read_file_scope): Adjust.
5599         (read_func_scope): Adjust.
5600         (read_lexical_block_scope): Adjust.
5601         (read_call_site_scope): Adjust.
5602         (read_variable): Adjust.
5603         (dwarf2_rnglists_process): Adjust.
5604         (dwarf2_ranges_process): Adjust.
5605         (dwarf2_ranges_read): Adjust.
5606         (dwarf2_get_pc_bounds): Adjust.
5607         (dwarf2_record_block_ranges): Adjust.
5608         (dwarf2_add_field): Adjust.
5609         (dwarf2_add_member_fn): Adjust.
5610         (read_structure_type): Adjust.
5611         (process_structure_scope): Adjust.
5612         (read_enumeration_type): Adjust.
5613         (read_array_type): Adjust.
5614         (mark_common_block_symbol_computed): Adjust.
5615         (read_common_block): Adjust.
5616         (read_namespace_type): Adjust.
5617         (read_namespace): Adjust.
5618         (read_module_type): Adjust.
5619         (read_tag_pointer_type): Adjust.
5620         (read_tag_ptr_to_member_type): Adjust.
5621         (read_tag_string_type): Adjust.
5622         (read_subroutine_type): Adjust.
5623         (read_typedef): Adjust.
5624         (read_base_type): Adjust.
5625         (attr_to_dynamic_prop): Adjust.
5626         (read_subrange_type): Adjust.
5627         (read_unspecified_type): Adjust.
5628         (dwarf2_read_abbrevs): Adjust.
5629         (load_partial_dies): Adjust.
5630         (read_partial_die): Adjust.
5631         (find_partial_die): Adjust.
5632         (guess_partial_die_structure_name): Adjust.
5633         (fixup_partial_die): Adjust.
5634         (read_attribute_value): Adjust.
5635         (read_addr_index): Adjust.
5636         (read_addr_index_from_leb128): Adjust.
5637         (read_str_index): Adjust.
5638         (dwarf2_string_attr): Adjust.
5639         (get_debug_line_section): Adjust.
5640         (dwarf_decode_line_header): Adjust.
5641         (lnp_state_machine::check_line_address): Adjust.
5642         (dwarf_decode_lines_1): Adjust.
5643         (dwarf_decode_lines): Adjust.
5644         (dwarf2_start_symtab): Adjust.
5645         (var_decode_location): Adjust.
5646         (new_symbol_full): Adjust.
5647         (dwarf2_const_value_data): Adjust.
5648         (dwarf2_const_value_attr): Adjust.
5649         (dwarf2_const_value): Adjust.
5650         (die_type): Adjust.
5651         (die_containing_type): Adjust.
5652         (build_error_marker_type): Adjust.
5653         (lookup_die_type): Adjust.
5654         (guess_full_die_structure_name): Adjust.
5655         (anonymous_struct_prefix): Adjust.
5656         (determine_prefix): Adjust.
5657         (dwarf2_name): Adjust.
5658         (follow_die_ref_or_sig): Adjust.
5659         (follow_die_offset): Adjust.
5660         (follow_die_ref): Adjust.
5661         (follow_die_sig_1): Adjust.
5662         (follow_die_sig): Adjust.
5663         (get_signatured_type): Adjust.
5664         (get_DW_AT_signature_type): Adjust.
5665         (decode_locdesc): Adjust.
5666         (dwarf_decode_macros): Adjust.
5667         (cu_debug_loc_section): Adjust.
5668         (fill_in_loclist_baton): Adjust.
5669         (dwarf2_symbol_mark_computed): Adjust.
5670         (init_one_comp_unit): Don't assign
5671         dwarf2_cu::dwarf2_per_objfile.
5672         (set_die_type): Adjust.
5673
5674 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5675
5676         * dwarf2read.c (struct mapped_debug_names): Add constructor.
5677         <dwarf2_per_objfile>: New field.
5678         (dwarf2_per_objfile): Remove global.
5679         (get_dwarf2_per_objfile): New function.
5680         (set_dwarf2_per_objfile): New function.
5681         (dwarf2_build_psymtabs_hard): Change objfile parameter to
5682         dwarf2_per_objfile.
5683         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5684         (read_abbrev_offset): Likewise.
5685         (read_indirect_string): Likewise.
5686         (read_indirect_line_string): Likewise.
5687         (read_indirect_string_at_offset): Likewise.
5688         (read_indirect_string_from_dwz): Likewise.
5689         (dwarf2_find_containing_comp_unit): Change objfile parameter to
5690         dwarf2_per_objfile.
5691         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5692         (create_all_comp_units): Change objfile parameter to
5693         dwarf2_per_objfile.
5694         (create_all_type_units): Likewise.
5695         (process_queue): Add dwarf2_per_objfile parameter.
5696         (read_and_check_comp_unit_head): Likewise.
5697         (lookup_dwo_unit_in_dwp): Likewise.
5698         (get_dwp_file): Likewise.
5699         (process_cu_includes): Likewise.
5700         (struct free_dwo_file_cleanup_data): New struct.
5701         (dwarf2_has_info): Use get_dwarf2_per_objfile and
5702         set_dwarf2_per_objfile.
5703         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5704         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5705         context, adjust calls.
5706         (dw2_instantiate_symtab): Likewise.
5707         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5708         (dw2_get_cu): Likewise.
5709         (create_cu_from_index_list): Change objfile parameter to
5710         dwarf2_per_objfile.
5711         (create_cus_from_index_list): Get dwarf2_per_objfile from
5712         context, adjust calls.
5713         (create_cus_from_index): Likewise.
5714         (create_signatured_type_table_from_index): Change objfile
5715         parameter to dwarf2_per_objfile.
5716         (create_signatured_type_table_from_debug_names): Change objfile
5717         parameter to dwarf2_per_objfile.
5718         (create_addrmap_from_index): Likewise.
5719         (create_addrmap_from_aranges): Likewise.
5720         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5721         (dw2_setup): Remove.
5722         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5723         context.
5724         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5725         get_dwarf2_per_objfile.
5726         (dw2_forget_cached_source_info): Likewise.
5727         (dw2_map_symtabs_matching_filename): Likewise.
5728         (struct dw2_symtab_iterator) <index>: Remove.
5729         <dwarf2_per_objfile>: New field.
5730         (dw2_symtab_iter_init): Replace index parameter with
5731         dwarf2_per_objfile.
5732         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5733         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5734         (dw2_print_stats): Likewise.
5735         (dw2_dump): Likewise.
5736         (dw2_expand_symtabs_for_function): Likewise.
5737         (dw2_expand_all_symtabs): Likewise.
5738         (dw2_expand_symtabs_with_fullname): Likewise.
5739         (dw2_expand_marked_cus): Replace index and objfile parameters
5740         with dwarf2_per_objfile.
5741         (dw_expand_symtabs_matching_file_matcher): Add
5742         dwarf2_per_objfile parameter and adjust calls.
5743         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
5744         adjust calls.
5745         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
5746         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
5747         adjust calls.
5748         (create_cus_from_debug_names_list): Replace objfile parameter
5749         with dwarf2_per_objfile and adjust calls.
5750         (create_cus_from_debug_names): Likewise.
5751         (dwarf2_read_debug_names): Likewise.
5752         (mapped_debug_names::namei_to_name): Adjust call.
5753         (dw2_debug_names_iterator::next): Likewise.
5754         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
5755         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
5756         (dw2_debug_names_dump): Likewise.
5757         (dw2_debug_names_expand_symtabs_for_function): Likewise.
5758         (dw2_debug_names_expand_symtabs_matching): Likewise.
5759         (dwarf2_initialize_objfile): Likewise.
5760         (dwarf2_build_psymtabs): Likewise.
5761         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
5762         this_cu.
5763         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
5764         (read_and_check_comp_unit_head): Likewise.
5765         (read_abbrev_offset): Likewise.
5766         (create_debug_type_hash_table): Likewise.
5767         (create_debug_types_hash_table): Likewise.
5768         (create_all_type_units): Replace objfile parameter with
5769         dwarf2_per_objfile.
5770         (add_type_unit): Add dwarf2_per_objfile parameter.
5771         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
5772         with dwarf2_per_objfile.
5773         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
5774         (lookup_dwp_signatured_type): Likewise.
5775         (lookup_signatured_type): Likewise.
5776         (read_cutu_die_from_dwo): Likewise.
5777         (init_tu_and_read_dwo_dies): Likewise.
5778         (init_cutu_and_read_dies): Likewise.
5779         (init_cutu_and_read_dies_no_follow): Likewise.
5780         (allocate_type_unit_groups_table): Add objfile parameter.
5781         (create_type_unit_group): Use dwarf2_per_objfile from cu.
5782         (get_type_unit_group): Likewise.
5783         (process_psymtab_comp_unit): Update call.
5784         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
5785         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
5786         (print_tu_stats): Likewise.
5787         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
5788         in void* parameter.
5789         (build_type_psymtabs): Change objfile parameter to
5790         dwarf2_per_objfile.
5791         (process_skeletonless_type_unit): Use dwarf2_per_objfile
5792         passed in void* parameter.
5793         (process_skeletonless_type_units): Change objfile parameter to
5794         dwarf2_per_objfile.
5795         (set_partial_user): Likewise.
5796         (dwarf2_build_psymtabs_hard): Likewise.
5797         (read_comp_units_from_section): Likewise.
5798         (create_all_comp_units): Likewise.
5799         (scan_partial_symbols): Update calls.
5800         (add_partial_symbol): Likewise.
5801         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
5802         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
5803         (process_queue): Add dwarf2_per_objfile parameter.
5804         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
5805         (compute_compunit_symtab_includes): Likewise.
5806         (process_cu_includes): Add dwarf2_per_objfile parameter.
5807         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
5808         (process_full_type_unit): Likewise.
5809         (process_imported_unit_die): Update call.
5810         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
5811         (read_file_scope): Likewise.
5812         (allocate_dwo_file_hash_table): Add objfile parameter.
5813         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
5814         (create_cus_hash_table): Likewise.
5815         (create_dwp_hash_table): Likewise.
5816         (create_dwo_unit_in_dwp_v1): Likewise.
5817         (create_dwp_v2_section): Likewise.
5818         (create_dwo_unit_in_dwp_v2): Likewise.
5819         (lookup_dwo_unit_in_dwp): Likewise.
5820         (try_open_dwop_file): Likewise.
5821         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
5822         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
5823         cleanup to include a reference to dwarf2_per_objfile.
5824         (open_dwp_file): Add dwarf2_per_objfile parameter.
5825         (open_and_init_dwp_file): Likewise.
5826         (get_dwp_file): Likewise.
5827         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
5828         (queue_and_load_all_dwo_tus): Update call.
5829         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
5830         data.
5831         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
5832         (dwarf2_ranges_process): Likewise.
5833         (dwarf2_get_pc_bounds): Likewise.
5834         (mark_common_block_symbol_computed): Likewise.
5835         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5836         (dwarf2_read_abbrevs): Update call.
5837         (read_partial_die): Use dwarf2_per_objfile from cu.
5838         (find_partial_die): Likewise.
5839         (fixup_partial_die): Likewise.
5840         (read_attribute_value): Likewise.
5841         (read_indirect_string_at_offset_from): Add objfile parameter.
5842         (read_indirect_string_at_offset): Add dwarf2_per_objfile
5843         parameter.
5844         (read_indirect_string_from_dwz): Add objfile parameter.
5845         (read_indirect_string): Add objfile parameter.
5846         (read_addr_index_1): Add dwarf2_per_objfile parameter.
5847         (read_addr_index): Use dwarf2_per_objfile from cu.
5848         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
5849         call dw2_setup.
5850         (read_str_index): Use dwarf2_per_objfile from cu.
5851         (get_debug_line_section): Likewise.
5852         (read_formatted_entries): Add dwarf2_per_objfile parameter.
5853         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
5854         (new_symbol_full): Use dwarf2_per_objfile from cu.
5855         (build_error_marker_type): Likewise.
5856         (lookup_die_type): Likewise.
5857         (determine_prefix): Likewise.
5858         (follow_die_offset): Likewise.
5859         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
5860         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
5861         (dwarf2_fetch_die_type_sect_off): Likewise.
5862         (dwarf2_get_die_type): Likewise.
5863         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
5864         (get_signatured_type): Likewise.
5865         (get_DW_AT_signature_type): Likewise.
5866         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
5867         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
5868         (cu_debug_loc_section): Likewise.
5869         (fill_in_loclist_baton): Likewise.
5870         (dwarf2_symbol_mark_computed): Likewise.
5871         (dwarf2_find_containing_comp_unit): Change objfile parameter to
5872         dwarf2_per_objfile.
5873         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
5874         parameter.
5875         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5876         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
5877         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
5878         (set_die_type): Use dwarf2_free_objfile from cu.
5879         (get_die_type_at_offset): Likewise.
5880         (dwarf2_per_objfile_free): Don't assign global variable.
5881         (debug_names) <constructor>: Add dwarf2_per_objfile
5882         parameter, update m_debugstrlookup construction.
5883         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
5884         parameter.
5885         <m_dwarf2_per_objfile>: New field.
5886         <lookup>: Use m_dwarf2_per_objfile.
5887         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
5888         (psyms_seen_size): Likewise.
5889         (write_gdbindex): Replace objfile parameter with
5890         dwarf2_per_objfile.
5891         (write_debug_names): Likewise.
5892         (write_psymtabs_to_index): Likewise.
5893         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
5894         calls.
5895
5896 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5897
5898         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
5899         <dwarf2_per_objfile>: New field.
5900         (struct dwarf2_per_cu_data) <objfile>: Remove.
5901         <dwarf2_per_objfile>: New field.
5902         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
5903         of objfile.
5904         (create_signatured_type_table_from_index): Likewise.
5905         (create_debug_type_hash_table): Likewise.
5906         (fill_in_sig_entry_from_dwo_entry): Likewise.
5907         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
5908         (create_type_unit_group): Assign dwarf2_per_objfile instead of
5909         objfile.
5910         (create_partial_symtab): Access objfile through
5911         dwarf2_per_objfile.
5912         (process_psymtab_comp_unit_reader): Likewise.
5913         (read_comp_units_from_section): Likewise.
5914         (scan_partial_symbols): Likewise.
5915         (add_partial_symbol): Likewise.
5916         (add_partial_subprogram): Likewise.
5917         (peek_die_abbrev): Likewise.
5918         (fixup_go_packaging): Likewise.
5919         (process_full_comp_unit): Likewise.
5920         (process_full_type_unit): Likewise.
5921         (process_imported_unit_die): Likewise.
5922         (dwarf2_compute_name): Likewise.
5923         (dwarf2_physname): Likewise.
5924         (read_import_statement): Likewise.
5925         (create_cus_hash_table): Assign dwarf2_physname instead of
5926         objfile.
5927         (read_func_scope): Access objfile through dwarf2_per_objfile.
5928         (read_lexical_block_scope): Likewise.
5929         (read_call_site_scope): Likewise.
5930         (read_variable): Likewise.
5931         (dwarf2_rnglists_process): Likewise.
5932         (dwarf2_ranges_process): Likewise.
5933         (dwarf2_ranges_read): Likewise.
5934         (dwarf2_record_block_ranges): Likewise.
5935         (dwarf2_add_field): Likewise.
5936         (dwarf2_add_member_fn): Likewise.
5937         (read_structure_type): Likewise.
5938         (process_structure_scope): Likewise.
5939         (read_enumeration_type): Likewise.
5940         (read_array_type): Likewise.
5941         (read_common_block): Likewise.
5942         (read_namespace_type): Likewise.
5943         (read_namespace): Likewise.
5944         (read_module_type): Likewise.
5945         (read_tag_pointer_type): Likewise.
5946         (read_tag_ptr_to_member_type): Likewise.
5947         (read_tag_string_type): Likewise.
5948         (read_subroutine_type): Likewise.
5949         (read_typedef): Likewise.
5950         (read_base_type): Likewise.
5951         (attr_to_dynamic_prop): Likewise.
5952         (read_subrange_type): Likewise.
5953         (read_unspecified_type): Likewise.
5954         (load_partial_dies): Likewise.
5955         (read_partial_die): Likewise.
5956         (find_partial_die): Likewise.
5957         (guess_partial_die_structure_name): Likewise.
5958         (fixup_partial_die): Likewise.
5959         (read_attribute_value): Likewise.
5960         (read_addr_index_from_leb128): Likewise.
5961         (dwarf2_read_addr_index): Likewise.
5962         (dwarf2_string_attr): Likewise.
5963         (lnp_state_machine::check_line_address): Likewise.
5964         (dwarf_decode_lines_1): Likewise.
5965         (dwarf_decode_lines): Likewise.
5966         (dwarf2_start_symtab): Likewise.
5967         (var_decode_location): Likewise.
5968         (new_symbol_full): Likewise.
5969         (dwarf2_const_value_data): Likewise.
5970         (dwarf2_const_value_attr): Likewise.
5971         (dwarf2_const_value): Likewise.
5972         (die_type): Likewise.
5973         (die_containing_type): Likewise.
5974         (lookup_die_type): Likewise.
5975         (guess_full_die_structure_name): Likewise.
5976         (anonymous_struct_prefix): Likewise.
5977         (dwarf2_name): Likewise.
5978         (follow_die_ref_or_sig): Likewise.
5979         (follow_die_offset): Likewise.
5980         (follow_die_ref): Likewise.
5981         (dwarf2_fetch_die_loc_sect_off): Likewise.
5982         (dwarf2_fetch_constant_bytes): Likewise.
5983         (dwarf2_fetch_die_type_sect_off): Likewise.
5984         (dwarf2_get_die_type): Likewise.
5985         (follow_die_sig): Likewise.
5986         (decode_locdesc): Likewise.
5987         (dwarf2_per_cu_objfile): Likewise.
5988         (dwarf2_per_cu_text_offset): Likewise.
5989         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
5990         objfile.
5991         (set_die_type): Access objfile through
5992         dwarf2_per_objfile.
5993
5994 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5995
5996         * valprint.c (converted_character_d): Remove typedef.
5997         (DEF_VEC_O (converted_character_d)): Remove.
5998         (count_next_character): Use std::vector.
5999         (print_converted_chars_to_obstack): Likewise.
6000         (generic_printstr): Likewise.
6001
6002 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6003
6004         * xml-support.h (struct gdb_xml_value): Add constructor.
6005         <value>: Change type to unique_xmalloc_ptr.
6006         (gdb_xml_value_s): Remove typedef.
6007         (DEF_VEC_O (gdb_xml_value_s)): Remove.
6008         (gdb_xml_element_start_handler): Change parameter type to
6009         std::vector.
6010         (xml_find_attribute): Likewise.
6011         * xml-support.c (xml_find_attribute): Change parameter type to
6012         std::vector and adjust.
6013         (gdb_xml_values_cleanup): Remove.
6014         (gdb_xml_parser::start_element): Adjust to std::vector.
6015         (xinclude_start_include): Change paraeter type to std::vector
6016         and adjust.
6017         * btrace.c (check_xml_btrace_version): Likewise.
6018         (parse_xml_btrace_block): Likewise.
6019         (parse_xml_btrace_pt_config_cpu): Likewise.
6020         (parse_xml_btrace_pt): Likewise.
6021         (parse_xml_btrace_conf_bts): Likewise.
6022         (parse_xml_btrace_conf_pt): Likewise.
6023         * memory-map.c (memory_map_start_memory): Likewise.
6024         (memory_map_start_property): Likewise.
6025         * osdata.c (osdata_start_osdata): Likewise.
6026         (osdata_start_item): Likewise.
6027         (osdata_start_column): Likewise.
6028         * remote.c (start_thread): Likewise.
6029         * solib-aix.c (library_list_start_library): Likewise.
6030         (library_list_start_list): Likewise.
6031         * solib-svr4.c (library_list_start_library): Likewise.
6032         (svr4_library_list_start_list): Likewise.
6033         * solib-target.c (library_list_start_segment): Likewise.
6034         (library_list_start_section): Likewise.
6035         (library_list_start_library): Likewise.
6036         (library_list_start_list): Likewise.
6037         * tracepoint.c (traceframe_info_start_memory): Likewise.
6038         (traceframe_info_start_tvar): Likewise.
6039         * xml-syscall.c (syscall_start_syscall): Likewise.
6040         * xml-tdesc.c (tdesc_start_target): Likewise.
6041         (tdesc_start_feature): Likewise.
6042         (tdesc_start_reg): Likewise.
6043         (tdesc_start_union): Likewise.
6044         (tdesc_start_struct): Likewise.
6045         (tdesc_start_flags): Likewise.
6046         (tdesc_start_enum): Likewise.
6047         (tdesc_start_field): Likewise.
6048         (tdesc_start_enum_value): Likewise.
6049         (tdesc_start_vector): Likewise.
6050
6051 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6052
6053         * extension.h (struct xmethod_worker) <clone>: Remove.
6054         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6055         Remove.
6056         (python_xmethod_worker::clone): Remove.
6057         * valops.c (find_overload_match): Use std::move instead of
6058         clone.
6059
6060 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6061
6062         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6063         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6064         <free_xmethod_worker_data>: Remove.
6065         <get_matching_xmethod_workers>: Chance VEC to std::vector.
6066         <get_xmethod_arg_types>: Remove.
6067         <get_xmethod_result_type>: Remove.
6068         <invoke_xmethod>: Remove.
6069         * extension.c (new_xmethod_worker): Remove.
6070         (clone_xmethod_worker): Remove.
6071         (get_matching_xmethod_workers): Return void, pass std::vector by
6072         pointer.
6073         (get_xmethod_arg_types): Rename to...
6074         (xmethod_worker::get_arg_types): ... this, and adjust.
6075         (get_xmethod_result_type): Rename to...
6076         (xmethod_worker::get_result_type): ... this, and adjust.
6077         (invoke_xmethod): Remove.
6078         (free_xmethod_worker): Remove.
6079         (free_xmethod_worker_vec): Remove.
6080         * extension.h (enum ext_lang_rc): Move here from
6081         extension-priv.h.
6082         (struct xmethod_worker): Add constructor and destructor.
6083         <data>: Remove.
6084         <value>: Remove.
6085         <invoke, clone, do_get_result_type, do_get_arg_types>: New
6086         virtual pure methods.
6087         <get_arg_types, get_result_type>: New methods.
6088         (xmethod_worker_ptr): Remove typedef.
6089         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6090         (xmethod_worker_vec): Remove typedef.
6091         (xmethod_worker_up): New typedef.
6092         (invoke_xmethod): Remove.
6093         (clone_xmethod_worker): Remove.
6094         (free_xmethod_worker): Remove.
6095         (free_xmethod_worker_vec): Remove.
6096         (get_xmethod_arg_types): Remove.
6097         (get_xmethod_result_type): Remove.
6098         * valops.c (find_method_list): Use std::vector, don't use
6099         intermediate vector.
6100         (value_find_oload_method_list): Use std::vector.
6101         (find_overload_match): Use std::vector.
6102         (find_oload_champ): Use std::vector.
6103         * value.c (value_free): Use operator delete.
6104         (value_of_xmethod): Rename to...
6105         (value_from_xmethod): ... this.  Don't assign
6106         xmethod_worker::value, take rvalue-reference.
6107         (result_type_of_xmethod): Adjust.
6108         (call_xmethod): Adjust.
6109         * value.h: Include extension.h.
6110         (struct xmethod_worker): Don't forward-declare.
6111         (value_of_xmethod): Rename to...
6112         (value_from_xmethod): ... this, take rvalue-reference.
6113         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6114         (struct python_xmethod_worker): ... this, add constructor and
6115         destructor.
6116         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6117         (gdbpy_free_xmethod_worker_data): Rename to...
6118         (python_xmethod_worker::~python_xmethod_worker): ... this and
6119         adjust.
6120         (gdbpy_clone_xmethod_worker_data): Rename to...
6121         (python_xmethod_worker::clone): ... this and adjust.
6122         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6123         temporary vector.
6124         (gdbpy_get_xmethod_arg_types): Rename to...
6125         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6126         (gdbpy_get_xmethod_result_type): Rename to...
6127         (python_xmethod_worker::do_get_result_type): ... this and
6128         adjust.
6129         (gdbpy_invoke_xmethod): Rename to...
6130         (python_xmethod_worker::invoke): ... this and adjust.
6131         (new_python_xmethod_worker): Rename to...
6132         (python_xmethod_worker::python_xmethod_worker): ... this and
6133         adjust.
6134         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6135         Remove.
6136         (gdbpy_free_xmethod_worker_data): Remove.
6137         (gdbpy_get_matching_xmethod_workers): Use std::vector.
6138         (gdbpy_get_xmethod_arg_types): Remove.
6139         (gdbpy_get_xmethod_result_type): Remove.
6140         (gdbpy_invoke_xmethod): Remove.
6141         * python/python.c (python_extension_ops): Remove obsolete
6142         callbacks.
6143
6144 2018-01-05  Pedro Alves  <palves@redhat.com>
6145
6146         PR gdb/18653
6147         * common/signals-state-save-restore.c
6148         (save_original_signals_state): New parameter 'quiet'.  Warn if we
6149         find a custom handler preinstalled, instead of internal erroring.
6150         But only warn if !quiet.
6151         * common/signals-state-save-restore.h
6152         (save_original_signals_state): New parameter 'quiet'.
6153         * main.c (captured_main_1): Move save_original_signals_state call
6154         after option handling, and pass QUIET.
6155
6156 2018-01-05  Pedro Alves  <palves@redhat.com>
6157
6158         * spu-tdep.c (spu_catch_start): Pass
6159         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6160
6161 2018-01-05  Pedro Alves  <palves@redhat.com>
6162
6163         PR gdb/22670
6164         * ada-lang.c (literal_symbol_name_matcher): New function.
6165         (ada_get_symbol_name_matcher): Use it for
6166         symbol_name_match_type::SEARCH_NAME.
6167         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
6168         it down instead of assuming symbol_name_match_type::FULL.
6169         * block.h (block_lookup_symbol): New parameter 'match_type'.
6170         * c-valprint.c (print_unpacked_pointer): Use
6171         lookup_symbol_search_name instead of lookup_symbol.
6172         * compile/compile-object-load.c (get_out_value_type): Pass down
6173         symbol_name_match_type::SEARCH_NAME.
6174         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6175         symbol_name_match_type::FULL.
6176         * cp-support.c (cp_get_symbol_name_matcher): Handle
6177         symbol_name_match_type::SEARCH_NAME.
6178         * infrun.c (insert_exception_resume_breakpoint): Use
6179         lookup_symbol_search_name.
6180         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6181         * psymtab.c (maintenance_check_psymtabs): Use
6182         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6183         * stack.c (print_frame_args): Use lookup_symbol_search_name and
6184         SYMBOL_SEARCH_NAME.
6185         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6186         if symbol_name_match_type::SEARCH_NAME.
6187         (lookup_symbol_in_language): Pass down
6188         symbol_name_match_type::FULL.
6189         (lookup_symbol_search_name): New.
6190         (lookup_language_this): Pass down
6191         symbol_name_match_type::SEARCH_NAME.
6192         (lookup_symbol_aux, lookup_local_symbol): New parameter
6193         'match_type'.  Pass it down.
6194         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6195         (lookup_symbol_search_name): New declaration.
6196         (lookup_symbol_in_block): New 'match_type' parameter.
6197
6198 2018-01-05  Pedro Alves  <palves@redhat.com>
6199
6200         PR gdb/22670
6201         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6202         ada_lookup_symbol.
6203         (ada_lookup_symbol): Reimplement in terms of
6204         ada_lookup_symbol_list, bits factored out from
6205         ada_lookup_encoded_symbol.
6206
6207 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6208
6209         * ada-exp.y (write_object_renaming): When subscripting an array
6210         using a symbol as the index, pass the block in call to
6211         ada_lookup_encoded_symbol when looking that symbol up.
6212
6213 2018-01-05  Jerome Guitton  <guitton@adacore.com>
6214
6215         * ada-lang.c (ada_array_length): Use ada_index_type instead of
6216         TYPE_INDEX_TYPE.
6217
6218 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6219
6220         * ada-lang.c (ada_to_fixed_value_create): Add handling of
6221         the case where VALUE_LVAL (val0) is not lval_memory.
6222
6223 2018-01-05  Xavier Roirand  <roirand@adacore.com>
6224
6225         * ada-valprint.c (print_optional_low_bound): Handle
6226         character-indexed array printing like boolean-indexed array
6227         printing.
6228
6229 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6230
6231         * NEWS: Create a new section for the next release branch.
6232         Rename the section of the current branch, now that it has
6233         been cut.
6234
6235 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6236
6237         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6238         * version.in: Bump version to 8.1.50.DATE-git.
6239
6240 2018-01-03  Xavier Roirand  <roirand@adacore.com>
6241
6242         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6243         Add field.
6244         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6245         Add field.
6246         (default_exception_support_info) <catch_handlers_sym>: Add field.
6247         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6248         (ada_exception_name_addr_1): Add "catch handlers" handling.
6249         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6250         Update all callers.
6251         (create_excep_cond_exprs) <ex>: Add parameter.
6252         (re_set_exception): Update create_excep_cond_exprs call.
6253         (print_it_exception, print_one_exception, print_mention_exception)
6254         (print_recreate_exception): Add "catch handler" handling.
6255         (allocate_location_catch_handlers, re_set_catch_handlers)
6256         (check_status_catch_handlers, print_it_catch_handlers)
6257         (print_one_catch_handlers, print_mention_catch_handlers)
6258         (print_recreate_catch_handlers): New function.
6259         (catch_handlers_breakpoint_ops): New variable.
6260         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6261         Add parameter.  Add "catch handler" handling.
6262         (ada_exception_sym_name, ada_exception_breakpoint_ops):
6263         Add "catch handler" handling.
6264         (ada_exception_catchpoint_cond_string): Add "catch handler"
6265         handling.
6266         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6267         call.
6268         (catch_ada_handlers_command): New function.
6269         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6270         operations structure.
6271         (_initialize_ada_language): Add "catch handlers" command entry.
6272         * NEWS: Document "catch handlers" feature.
6273
6274 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
6275
6276         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6277         account when creating the array type of the slice.
6278         (ada_value_slice): Likewise.
6279
6280 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
6281
6282         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6283         New enum value.
6284         (create_array_type_with_stride): Add byte_stride_prop parameter.
6285         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6286         New parameter.  Update all callers in this file.
6287         (array_type_has_dynamic_stride): New function.
6288         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6289         of arrays with dynamic byte strides.
6290         * dwarf2read.c (read_array_type): Add support for dynamic
6291         DW_AT_byte_stride attributes.
6292
6293 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
6294
6295         * dwarf2read.c (read_unspecified_type): Treat
6296         DW_TAG_enumeration_type DIEs from Ada units as stubs.
6297
6298 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6299
6300         Update copyright year range in all GDB files.
6301
6302 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6303
6304         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6305         and gdb/testsuite/gdb.base/step-line.c.
6306
6307 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6308
6309         * copyright.py (main): Dump the contents of
6310         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6311         even if BY_HAND is empty.
6312
6313 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6314
6315         * top.c (print_gdb_version): Update Copyright year in version
6316         message.
6317
6318 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6319
6320         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
6321
6322 For older changes see ChangeLog-2017.
6323 \f
6324 Local Variables:
6325 mode: change-log
6326 left-margin: 8
6327 fill-column: 74
6328 version-control: never
6329 coding: utf-8
6330 End: