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