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