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