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