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