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