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