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