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