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