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