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