8314945f1c7358579bf96741e90f5393cb71ee8d
[external/binutils.git] / gdb / ChangeLog
1 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4         (I387_MXCSR_INIT_VAL): New constant.
5         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6         buffer if it was supplied by the inferior.
7         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8         (i387_xsave_get_clear_bv): New function.
9         (i387_supply_xsave): Only read x87 control registers from the
10         xsave buffer if the feature is enabled, and the state will have
11         been written, otherwise, provide a suitable default.
12         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
13         including x87 control registers.  Update control registers if they
14         have changed from the default value, and mark features as enabled
15         as required.
16         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
17
18 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
19
20         * spu-tdep.c (info_spu_event_command): Fix output formatting.
21
22 2018-05-07  Tom Tromey  <tom@tromey.com>
23
24         * configure: Rebuild.
25         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
26
27 2018-05-07  Tom Tromey  <tom@tromey.com>
28
29         PR tdep/20362:
30         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
31         bit.  Use correct value for VDIV.
32
33 2018-05-04  Tom Tromey  <tom@tromey.com>
34
35         * configure: Rebuild.
36         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
37
38 2018-05-04  Tom Tromey  <tom@tromey.com>
39
40         * linux-record.c (record_linux_system_call) <case
41         RECORD_SYS_RECVFROM>: Add "break".
42
43 2018-05-04  Tom Tromey  <tom@tromey.com>
44
45         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
46         Add missing "break".
47         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
48         Add missing "break".
49
50 2018-05-04  Tom Tromey  <tom@tromey.com>
51
52         * rs6000-tdep.c (ppc_process_record_op4)
53         (ppc_process_record_op63): Add fall-through comment.
54
55 2018-05-04  Tom Tromey  <tom@tromey.com>
56
57         * i386-tdep.c (i386_process_record): Add fall-through comment.
58
59 2018-05-04  Tom Tromey  <tom@tromey.com>
60
61         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
62         comment.
63
64 2018-05-04  Tom Tromey  <tom@tromey.com>
65
66         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
67         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
68         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
69         comment.
70         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
71         comment.
72         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
73         comment.
74
75 2018-05-04  Tom Tromey  <tom@tromey.com>
76
77         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
78
79 2018-05-04  Tom Tromey  <tom@tromey.com>
80
81         * s390-tdep.c (s390_process_record): Fix fall-through comments.
82         * xcoffread.c (scan_xcoff_symtab): Move comment later.
83         * symfile.c (section_is_mapped): Fix fall-through comment.
84         * stabsread.c (define_symbol, read_member_functions): Fix
85         fall-through comment.
86         * s390-linux-tdep.c (s390_process_record): Fix fall-through
87         comment.
88         * remote.c (remote_wait_as): Fix fall-through comment.
89         * p-exp.y (yylex): Fix fall-through comment.
90         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
91         comment.
92         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
93         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
94         * jv-exp.y (yylex): Fix fall-through comment.
95         * go-exp.y (lex_one_token): Fix fall-through comment.
96         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
97         fall-through comment.
98         * f-exp.y (yylex): Fix fall-through comment.
99         * dwarf2read.c (process_die): Fix fall-through comments.
100         * dbxread.c (process_one_symbol): Fix fall-through comment.
101         * d-exp.y (lex_one_token): Fix fall-through comment.
102         * cp-name-parser.y (yylex): Fix fall-through comment.
103         * coffread.c (coff_symtab_read): Fix fall-through comment.
104         * c-exp.y (lex_one_token): Fix fall-through comment.
105         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
106         comment.
107         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
108         comment.
109
110 2018-05-04  Tom Tromey  <tom@tromey.com>
111
112         PR python/22730:
113         * NEWS: Mention gdb.execute change.
114         * gdbcmd.h (execute_control_command): Don't declare.
115         * python/python.c (execute_gdb_command): Use read_command_lines_1,
116         execute_control_commands, execute_control_commands_to_string.
117         * cli/cli-script.h (execute_control_commands)
118         (execute_control_commands_to_string): Declare.
119         (execute_control_command): Add from_tty parameter.
120         * cli/cli-script.c (execute_control_commands)
121         (execute_control_commands_to_string): New functions.
122         (execute_user_command): Use execute_control_commands.
123         (execute_control_command_1): Add "from_tty" parameter.  Update.
124         (execute_control_command): Likewise.
125
126 2018-05-04  Tom Tromey  <tom@tromey.com>
127
128         PR python/22731:
129         * NEWS: Mention that breakpoint commands are writable.
130         * python/py-breakpoint.c (bppy_set_commands): New function.
131         (breakpoint_object_getset) <"commands">: Use it.
132
133 2018-05-04  Tom Tromey  <tom@tromey.com>
134
135         * tracepoint.c (actions_command): Update.
136         * mi/mi-cmd-break.c (mi_command_line_array)
137         (mi_command_line_array_cnt, mi_command_line_array_ptr)
138         (mi_read_next_line): Remove.
139         (mi_cmd_break_commands): Update.
140         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
141         function_view.
142         * cli/cli-script.c (get_command_line): Update.
143         (process_next_line): Use function_view.  Constify.
144         (recurse_read_control_structure, read_command_lines)
145         (read_command_lines_1): Change argument types to function_view.
146         (do_define_command, document_command): Update.
147         * breakpoint.h (check_tracepoint_command): Don't declare.
148         * breakpoint.c (check_tracepoint_command): Remove.
149         (commands_command_1, create_tracepoint_from_upload): Update.
150
151 2018-05-04  Tom Tromey  <tom@tromey.com>
152
153         PR gdb/11750:
154         * cli/cli-script.h (enum command_control_type) <define_control>:
155         New constant.
156         * cli/cli-script.c (multi_line_command_p): Handle define_control.
157         (build_command_line, execute_control_command_1)
158         (process_next_line): Likewise.
159         (do_define_command): New function, extracted from define_command.
160         (define_command): Use it.
161
162 2018-05-04  Tom Tromey  <tom@tromey.com>
163
164         * tracepoint.c (actions_command): Update.
165         * cli/cli-script.h (read_command_lines): Update.
166         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
167         (MAX_TMPBUF): Remove define.
168         (define_command): Use string_printf.
169         (document_command): Likewise.
170         * breakpoint.c (commands_command_1): Update.
171
172 2018-05-04  Tom Tromey  <tom@tromey.com>
173
174         * top.c (execute_command): Update.
175         * cli/cli-script.h (print_command_lines): Now varargs.
176         * cli/cli-script.c (print_command_lines): Now varargs.
177         (execute_control_command_1) <case while_control, case if_control>:
178         Update.
179
180 2018-05-04  Tom Tromey  <tom@tromey.com>
181
182         * tracepoint.c (all_tracepoint_actions): Rename from
183         all_tracepoint_actions_and_cleanup.  Change return type.
184         (actions_command, encode_actions_1, encode_actions)
185         (trace_dump_actions, tdump_command): Update.
186         * remote.c (remote_download_command_source): Update.
187         * python/python.c (gdbpy_eval_from_control_command)
188         (python_command, python_interactive_command): Update.
189         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
190         * guile/guile.c (guile_command)
191         (gdbscm_eval_from_control_command, guile_command): Update.
192         * compile/compile.c (compile_code_command)
193         (compile_print_command, compile_to_object): Update.
194         * cli/cli-script.h (struct command_lines_deleter): New.
195         (counted_command_line): New typedef.
196         (struct command_line): Add constructor, destructor.
197         <body_list>: Remove.
198         <body_list_0, body_list_1>: New members.
199         (command_line_up): Remove typedef.
200         (read_command_lines, read_command_lines_1, get_command_line):
201         Update.
202         (copy_command_lines): Don't declare.
203         * cli/cli-script.c (build_command_line): Use "new".
204         (get_command_line): Return counted_command_line.
205         (print_command_lines, execute_user_command)
206         (execute_control_command_1, while_command, if_command): Update.
207         (realloc_body_list): Remove.
208         (process_next_line, recurse_read_control_structure): Update.
209         (read_command_lines, read_command_lines_1): Return counted_command_line.
210         (free_command_lines): Use "delete".
211         (copy_command_lines): Remove.
212         (define_command, document_command, show_user_1): Update.
213         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
214         a counted_command_line.
215         * breakpoint.h (counted_command_line): Remove typedef.
216         (breakpoint_set_commands): Update.
217         * breakpoint.c (check_no_tracepoint_commands)
218         (validate_commands_for_breakpoint): Update.
219         (breakpoint_set_commands): Change commands to be a
220         counted_command_line.
221         (commands_command_1, update_dprintf_command_list)
222         (create_tracepoint_from_upload): Update.
223
224 2018-05-04  Tom Tromey  <tom@tromey.com>
225
226         * cli/cli-decode.h (cmd_list_element): New constructor.
227         (~cmd_list_element): New destructor.
228         (struct cmd_list_element): Add initializers.
229         * cli/cli-decode.c (do_add_cmd): Use "new".
230         (delete_cmd): Use "delete".
231
232 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
233             Pedro Alves <palves@redhat.com>
234
235         PR breakpoints/19806 and support for PR external/20207.
236         * NEWS: Mention Aarch64 watchpoint improvements.
237         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
238         watchpoints and PR external/20207 watchpoints.
239         * nat/aarch64-linux-hw-point.c
240         (kernel_supports_any_contiguous_range): New.
241         (aarch64_watchpoint_offset): New.
242         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
243         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
244         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
245         (aarch64_align_watchpoint): New parameters aligned_offset_p and
246         next_addr_orig_p.  Support PR external/20207 watchpoints.
247         (aarch64_downgrade_regs): New.
248         (aarch64_dr_state_insert_one_point): New parameters offset and
249         addr_orig.
250         (aarch64_dr_state_remove_one_point): Likewise.
251         (aarch64_handle_breakpoint): Update caller.
252         (aarch64_handle_aligned_watchpoint): Likewise.
253         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
254         aligned_offset.
255         (aarch64_linux_set_debug_regs): Remove const from state.  Call
256         aarch64_downgrade_regs.
257         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
258         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
259         (DR_CONTROL_MASK): ... this.
260         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
261         (unsigned int aarch64_watchpoint_offset): New prototype.
262         (aarch64_linux_set_debug_regs): Remove const from state.
263         * utils.c (align_up, align_down): Move to ...
264         * common/common-utils.c (align_up, align_down): ... here.
265         * utils.h (align_up, align_down): Move to ...
266         * common/common-utils.h (align_up, align_down): ... here.
267
268 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
269
270         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
271         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
272         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
273         Re-implement to match the ABI as summarized in GCC's
274         gcc/config/sparc/sparc.c.  All callers updated.
275         (sparc32_store_arguments): Remove assertion.
276
277 2018-05-04  Tom Tromey  <tom@tromey.com>
278
279         * printcmd.c: Don't include tui.h.
280         (decode_format): Use skip_spaces.
281
282 2018-05-04  Tom Tromey  <tom@tromey.com>
283
284         PR gdb/22619:
285         * printcmd.c (last_count): New global.
286         (x_command): Use saved count when repeating.
287
288 2018-05-04  Tom Tromey  <tom@tromey.com>
289
290         * nto-procfs.c (do_closedir_cleanup): Remove.
291         (procfs_pidlist): Use gdb_dir_up.
292         * procfs.c (do_closedir_cleanup): Remove.
293         (proc_update_threads): Use gdb_dir_up.
294         * common/filestuff.h (struct gdb_dir_deleter): New.
295         (gdb_dir_up): New typedef.
296
297 2018-05-04  Tom Tromey  <tom@tromey.com>
298
299         * ada-lang.c (print_mention_exception): Use std::string.
300
301 2018-05-04  Tom Tromey  <tom@tromey.com>
302
303         * ada-lang.c (create_excep_cond_exprs): Update.
304         (ada_exception_catchpoint_cond_string): Use std::string.
305
306 2018-05-04  Tom Tromey  <tom@tromey.com>
307
308         * ada-lang.c (xget_renaming_scope): Return std::string.
309         (old_renaming_is_invisible): Update.
310
311 2018-05-04  Tom Tromey  <tom@tromey.com>
312
313         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
314         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
315
316 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
317
318         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
319
320 2018-05-04  Tom Tromey  <tom@tromey.com>
321
322         * remote.c (remote_query_supported_append): Change type.
323         (remote_check_symbols): Update.
324
325 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
326
327         PR gdb/11420
328         * configure.ac: Prepend libpython.
329         * python/python-config.py: Likewise.
330         * configure: Regenerate.
331
332 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
333
334         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
335
336 2018-05-03  Pedro Alves  <palves@redhat.com>
337
338         * s390-linux-nat.c
339         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
340         override.  Write 'true' instead of '1'.
341         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
342         declaration.
343
344 2018-05-02  Pedro Alves  <palves@redhat.com>
345
346         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
347         add_inf_child_target.
348         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
349         add_inf_child_target.
350         * aix-thread.c (aix_thread_target_info): New.
351         (aix_thread_target) <shortname, longname, doc>: Delete.
352         <info>: New.
353         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
354         add_inf_child_target.
355         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
356         add_inf_child_target.
357         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
358         add_inf_child_target.
359         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
360         add_inf_child_target.
361         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
362         add_inf_child_target.
363         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
364         add_inf_child_target.
365         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
366         add_inf_child_target.
367         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
368         add_inf_child_target.
369         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
370         add_inf_child_target.
371         * bfd-target.c (target_bfd_target_info): New.
372         (target_bfd) <shortname, longname, doc>: Delete.
373         <info>: New.
374         * bsd-kvm.c (bsd_kvm_target_info): New.
375         (bsd_kvm_target) <shortname, longname, doc>: Delete.
376         <info>: New.
377         (bsd_kvm_target::open): Rename to ...
378         (bsd_kvm_target_open): ... this.  Adjust.
379         * bsd-uthread.c (bsd_uthread_target_info): New.
380         (bsd_uthread_target) <shortname, longname, doc>: Delete.
381         <info>: New.
382         * corefile.c (core_file_command): Adjust.
383         * corelow.c (core_target_info): New.
384         (core_target) <shortname, longname, doc>: Delete.
385         <info>: New.
386         (core_target::open): Rename to ...
387         (core_target_open): ... this.  Adjust.
388         * ctf.c (ctf_target_info): New.
389         (ctf_target) <shortname, longname, doc>: Delete.
390         <info>: New.
391         (ctf_target::open): Rename to ...
392         (ctf_target_open): ... this.
393         (_initialize_ctf): Adjust.
394         * exec.c (exec_target_info): New.
395         (exec_target) <shortname, longname, doc>: Delete.
396         <info>: New.
397         (exec_target::open): Rename to ...
398         (exec_target_open): ... this.
399         * gdbcore.h (core_target_open): Declare.
400         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
401         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
402         add_inf_child_target.
403         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
404         add_inf_child_target.
405         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
406         add_inf_child_target.
407         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
408         add_inf_child_target.
409         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
410         add_inf_child_target.
411         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
412         add_inf_child_target.
413         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
414         add_inf_child_target.
415         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
416         add_inf_child_target.
417         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
418         add_inf_child_target.
419         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
420         add_inf_child_target.
421         * inf-child.c (inf_child_target_info): New.
422         (inf_child_target::info): New.
423         (inf_child_open_target): Remove 'target' parameter.  Use
424         get_native_target instead.
425         (inf_child_target::open): Delete.
426         (add_inf_child_target): New.
427         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
428         Delete.
429         <info>: New.
430         (add_inf_child_target): Declare.
431         (inf_child_open_target): Declare.
432         * linux-thread-db.c (thread_db_target_info): New.
433         (thread_db_target) <shortname, longname, doc>: Delete.
434         <info>: New.
435         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
436         add_inf_child_target.
437         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
438         add_inf_child_target.
439         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
440         add_inf_child_target.
441         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
442         add_inf_child_target.
443         * make-target-delegates (print_class): Adjust.
444         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
445         add_inf_child_target.
446         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
447         add_inf_child_target.
448         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
449         add_inf_child_target.
450         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
451         add_inf_child_target.
452         * nto-procfs.c (nto_native_target_info): New.
453         (nto_procfs_target_native) <shortname, longname, doc>:
454         Delete.
455         <info>: New.
456         (nto_procfs_target_info): New.
457         (nto_procfs_target_procfs) <shortname, longname, doc>:
458         Delete.
459         <info>: New.
460         (init_procfs_targets): Adjust.
461         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
462         add_inf_child_target.
463         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
464         add_inf_child_target.
465         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
466         add_inf_child_target.
467         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
468         add_inf_child_target.
469         * ravenscar-thread.c (ravenscar_target_info): New.
470         (ravenscar_thread_target) <shortname, longname, doc>:
471         Delete.
472         <info>: New.
473         * record-btrace.c (record_btrace_target_info):
474         (record_btrace_target) <shortname, longname, doc>: Delete.
475         <info>: New.
476         (record_btrace_target::open): Rename to ...
477         (record_btrace_target_open): ... this.  Adjust.
478         * record-full.c (record_longname, record_doc): New.
479         (record_full_base_target) <shortname, longname, doc>: Delete.
480         <info>: New.
481         (record_full_target_info): New.
482         (record_full_target): <shortname>: Delete.
483         <info>: New.
484         (record_full_core_open_1, record_full_open_1): Update comments.
485         (record_full_base_target::open): Rename to ...
486         (record_full_open): ... this.
487         (cmd_record_full_restore): Update.
488         (_initialize_record_full): Update.
489         * remote-sim.c (remote_sim_target_info): New.
490         (gdbsim_target) <shortname, longname, doc>: Delete.
491         <info>: New.
492         (gdbsim_target::open): Rename to ...
493         (gdbsim_target_open): ... this.
494         (_initialize_remote_sim): Adjust.
495         * remote.c (remote_doc): New.
496         (remote_target_info): New.
497         (remote_target) <shortname, longname, doc>: Delete.
498         <info>: New.
499         (extended_remote_target_info): New.
500         (extended_remote_target) <shortname, longname, doc>: Delete.
501         <info>: New.
502         (remote_target::open_1): Make static.  Adjust.
503         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
504         * s390-linux-nat.c (_initialize_s390_nat): Use
505         add_inf_child_target.
506         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
507         add_inf_child_target.
508         * sol-thread.c (thread_db_target_info): New.
509         (sol_thread_target) <shortname, longname, doc>: Delete.
510         <info>: New.
511         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
512         add_inf_child_target.
513         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
514         add_inf_child_target.
515         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
516         add_inf_child_target.
517         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
518         add_inf_child_target.
519         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
520         add_inf_child_target.
521         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
522         add_inf_child_target.
523         * spu-linux-nat.c (_initialize_spu_nat): Use
524         add_inf_child_target.
525         * spu-multiarch.c (spu_multiarch_target_info): New.
526         (spu_multiarch_target) <shortname, longname, doc>: Delete.
527         <info>: New.
528         * target-delegates.c: Regenerate.
529         * target.c: Include <unordered_map>.
530         (target_ops_p): Delete.
531         (DEF_VEC_P(target_ops_p)): Delete.
532         (target_factories): New.
533         (test_target_info): New.
534         (test_target_ops::info): New.
535         (open_target): Adjust to use target_factories.
536         (add_target_with_completer): Rename to ...
537         (add_target): ... this.  Change prototype.  Register target_info
538         and open callback in target_factories.  Register target_info in
539         command context instead of target_ops.
540         (add_target): Delete old implementation.
541         (add_deprecated_target_alias): Change prototype.  Adjust.
542         (the_native_target): New.
543         (set_native_target, get_native_target): New.
544         (find_default_run_target): Use the_native_target.
545         (find_attach_target, find_run_target): Simplify.
546         (target_ops::open): Delete.
547         (dummy_target_info): New.
548         (dummy_target::shortname, dummy_target::longname)
549         (dummy_target::doc): Delete.
550         (dummy_target::info): New.
551         (debug_target::shortname, debug_target::longname)
552         (debug_target::doc): Delete.
553         (debug_target::info): New.
554         * target.h (struct target_info): New.
555         (target_ops::~target_ops): Add comment.
556         (target_ops::info): New.
557         (target_ops::shortname, target_ops::longname, target_ops::doc): No
558         longer virtual.  Implement in terms of target_info.
559         (set_native_target, get_native_target): Declare.
560         (target_open_ftype): New.
561         (add_target, add_target_with_completer)
562         (add_deprecated_target_alias): Change prototype.
563         (test_target) <shortname, longname, doc>: Delete.
564         <info>: New.
565         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
566         add_inf_child_target.
567         * tracefile-tfile.c (tfile_target_info): New.
568         (tfile_target) <shortname, longname, doc>: Delete.
569         <info>: New.
570         (tfile_target::open): Rename to ...
571         (tfile_target_open): ... this.
572         (_initialize_tracefile_tfile): Adjust.
573         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
574         add_inf_child_target.
575         * windows-nat.c (_initialize_windows_nat): Use
576         add_inf_child_target.
577         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
578         add_inf_child_target.
579
580 2018-05-02  Pedro Alves  <palves@redhat.com>
581
582         * linux-nat.h (linux_nat_target) <low_new_thread,
583         low_delete_thread, low_new_fork, low_forget_process,
584         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
585         New virtual methods.
586         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
587         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
588         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
589         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
590         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
591         Delete.
592         * linux-fork.c (delete_fork): Adjust to call low method.
593         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
594         (linux_nat_new_fork, linux_nat_forget_process_hook)
595         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
596         (linux_nat_status_is_event):
597         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
598         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
599         to call low method.
600         (sigtrap_is_event): Rename to ...
601         (linux_nat_target::low_status_is_event): ... this.
602         (linux_nat_set_status_is_event): Delete.
603         (save_stop_reason, linux_nat_wait_1)
604         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
605         low methods.
606         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
607         (linux_nat_set_new_fork, linux_nat_set_forget_process)
608         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
609         (linux_nat_set_prepare_to_resume): Delete.
610         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
611         low virtual methods.
612         * amd64-linux-nat.c: Likewise.
613         * arm-linux-nat.c: Likewise.
614         * i386-linux-nat.c: Likewise.
615         * ia64-linux-nat.c: Likewise.
616         * mips-linux-nat.c: Likewise.
617         * ppc-linux-nat.c: Likewise.
618         * s390-linux-nat.c: Likewise.
619         * sparc64-linux-nat.c: Likewise.
620         * x86-linux-nat.c: Likewise.
621         * x86-linux-nat.h: Include "nat/x86-linux.h".
622         (x86_linux_nat_target) <low_new_fork, low_forget_process,
623         low_prepare_to_resume, low_new_thread, low_delete_thread>:
624         Override methods.
625
626 2018-05-02  Pedro Alves  <palves@redhat.com>
627
628         * target.h (target_ops)
629         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
630         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
631         stopped_by_watchpoint, have_continuable_watchpoint,
632         stopped_data_address, watchpoint_addr_within_range,
633         can_accel_watchpoint_condition, can_run, thread_alive,
634         has_all_memory, has_memory, has_stack, has_registers,
635         has_execution, can_async_p, is_async_p, supports_non_stop,
636         always_non_stop_p, can_execute_reverse, supports_multi_process,
637         supports_enable_disable_tracepoint,
638         supports_disable_randomization, supports_string_tracing,
639         supports_evaluation_of_breakpoint_conditions,
640         can_run_breakpoint_commands, filesystem_is_local,
641         can_download_tracepoint, get_trace_state_variable_value,
642         set_trace_notes, get_tib_address, use_agent, can_use_agent,
643         record_is_replaying, record_will_replay,
644         augmented_libraries_svr4_read>: Adjust to return bool.
645         * aarch64-linux-nat.c: All implementations adjusted.
646         * aix-thread.c: All implementations adjusted.
647         * arm-linux-nat.c: All implementations adjusted.
648         * breakpoint.c: All implementations adjusted.
649         * bsd-kvm.c: All implementations adjusted.
650         * bsd-uthread.c: All implementations adjusted.
651         * corelow.c: All implementations adjusted.
652         * ctf.c: All implementations adjusted.
653         * darwin-nat.c: All implementations adjusted.
654         * darwin-nat.h: All implementations adjusted.
655         * exec.c: All implementations adjusted.
656         * fbsd-nat.c: All implementations adjusted.
657         * fbsd-nat.h: All implementations adjusted.
658         * gnu-nat.c: All implementations adjusted.
659         * gnu-nat.h: All implementations adjusted.
660         * go32-nat.c: All implementations adjusted.
661         * ia64-linux-nat.c: All implementations adjusted.
662         * inf-child.c: All implementations adjusted.
663         * inf-child.h: All implementations adjusted.
664         * inf-ptrace.c: All implementations adjusted.
665         * inf-ptrace.h: All implementations adjusted.
666         * linux-nat.c: All implementations adjusted.
667         * linux-nat.h: All implementations adjusted.
668         * mips-linux-nat.c: All implementations adjusted.
669         * nto-procfs.c: All implementations adjusted.
670         * ppc-linux-nat.c: All implementations adjusted.
671         * procfs.c: All implementations adjusted.
672         * ravenscar-thread.c: All implementations adjusted.
673         * record-btrace.c: All implementations adjusted.
674         * record-full.c: All implementations adjusted.
675         * remote-sim.c: All implementations adjusted.
676         * remote.c: All implementations adjusted.
677         * s390-linux-nat.c: All implementations adjusted.
678         * sol-thread.c: All implementations adjusted.
679         * spu-multiarch.c: All implementations adjusted.
680         * target-delegates.c: All implementations adjusted.
681         * target.c: All implementations adjusted.
682         * target.h: All implementations adjusted.
683         * tracefile-tfile.c: All implementations adjusted.
684         * tracefile.c: All implementations adjusted.
685         * tracefile.h: All implementations adjusted.
686         * windows-nat.c: All implementations adjusted.
687         * x86-linux-nat.h: All implementations adjusted.
688         * x86-nat.h: All implementations adjusted.
689
690 2018-05-02  Pedro Alves  <palves@redhat.com>
691
692         * make-target-delegates (scan_target_h): Don't trim lines here.
693         Replace sequences of tabs and/or whitespace with a single
694         whitespace.
695         (top level, parsing methods): Trim each line before processing it
696         here.
697
698 2018-05-02  Pedro Alves  <palves@redhat.com>
699             John Baldwin  <jhb@freebsd.org>
700
701         * target.h (enum strata) <debug_stratum>: New.
702         (struct target_ops) <all delegation methods>: Replace by C++
703         virtual methods, and drop "to_" prefix.  All references updated
704         throughout.
705         <to_shortname, to_longname, to_doc, to_data,
706         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
707         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
708         virtual methods.  All references updated throughout.
709         <can_attach, supports_terminal_ours, can_create_inferior,
710         get_thread_control_capabilities, attach_no_wait>: New
711         virtual methods.
712         <insert_breakpoint, remove_breakpoint>: Now
713         TARGET_DEFAULT_NORETURN methods.
714         <info_proc>: Now returns bool.
715         <to_magic>: Delete.
716         (OPS_MAGIC): Delete.
717         (current_target): Delete.  All references replaced by references
718         to ...
719         (target_stack): ... this.  New.
720         (target_shortname, target_longname): Adjust.
721         (target_can_run): Now a function declaration.
722         (default_child_has_all_memory, default_child_has_memory)
723         (default_child_has_stack, default_child_has_registers)
724         (default_child_has_execution): Remove target_ops parameter.
725         (complete_target_initialization): Delete.
726         (memory_breakpoint_target): New template class.
727         (test_target_ops): Refactor as a C++ class with virtual methods.
728         * make-target-delegates (NAME_PART): Tighten.
729         (POINTER_PART, CP_SYMBOL): New.
730         (SIMPLE_RETURN_PART): Reimplement.
731         (VEC_RETURN_PART): Expect less.
732         (RETURN_PART, VIRTUAL_PART): New.
733         (METHOD): Adjust to C++ virtual methods.
734         (scan_target_h): Remove reference to C99.
735         (dname): Output "target_ops::" prefix.
736         (write_function_header): Adjust to output a C++ class method.
737         (write_declaration): New.
738         (write_delegator): Adjust to output a C++ class method.
739         (tdname): Output "dummy_target::" prefix.
740         (write_tdefault, write_debugmethod): Adjust to output a C++ class
741         method.
742         (tdefault_names, debug_names): Delete.
743         (return_types, tdefaults, styles, argtypes_array): New.
744         (top level): All methods are delegators.
745         (print_class): New.
746         (top level): Print dummy_target and debug_target classes.
747         * target-delegates.c: Regenerate.
748         * target-debug.h (target_debug_print_enum_info_proc_what)
749         (target_debug_print_thread_control_capabilities)
750         (target_debug_print_thread_info_p): New.
751         * target.c (dummy_target): Delete.
752         (the_dummy_target, the_debug_target): New.
753         (target_stack): Now extern.
754         (set_targetdebug): Push/unpush debug target.
755         (default_child_has_all_memory, default_child_has_memory)
756         (default_child_has_stack, default_child_has_registers)
757         (default_child_has_execution): Remove target_ops parameter.
758         (complete_target_initialization): Delete.
759         (add_target_with_completer): No longer call
760         complete_target_initialization.
761         (target_supports_terminal_ours): Use regular delegation.
762         (update_current_target): Delete.
763         (push_target): No longer check magic number.  Don't call
764         update_current_target.
765         (unpush_target): Don't call update_current_target.
766         (target_is_pushed): No longer check magic number.
767         (target_require_runnable): Skip for all stratums over
768         process_stratum.
769         (target_ops::info_proc): New.
770         (target_info_proc): Use find_target_at and
771         find_default_run_target.
772         (target_supports_disable_randomization): Use regular delegation.
773         (target_get_osdata): Use find_target_at.
774         (target_ops::open, target_ops::close, target_ops::can_attach)
775         (target_ops::attach, target_ops::can_create_inferior)
776         (target_ops::create_inferior, target_ops::can_run)
777         (target_can_run): New.
778         (default_fileio_target): Use regular delegation.
779         (target_ops::fileio_open, target_ops::fileio_pwrite)
780         (target_ops::fileio_pread, target_ops::fileio_fstat)
781         (target_ops::fileio_close, target_ops::fileio_unlink)
782         (target_ops::fileio_readlink): New.
783         (target_fileio_open_1, target_fileio_unlink)
784         (target_fileio_readlink): Always call the target method.  Handle
785         FILEIO_ENOSYS.
786         (return_zero, return_zero_has_execution): Delete.
787         (init_dummy_target): Delete.
788         (dummy_target::dummy_target, dummy_target::shortname)
789         (dummy_target::longname, dummy_target::doc)
790         (debug_target::debug_target, debug_target::shortname)
791         (debug_target::longname, debug_target::doc): New.
792         (target_supports_delete_record): Use regular delegation.
793         (setup_target_debug): Delete.
794         (maintenance_print_target_stack): Skip debug_stratum.
795         (initialize_targets): Instantiate the_dummy_target and
796         the_debug_target.
797         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
798         use target_stack.
799         (target_auxv_search, fprint_target_auxv): Adjust.
800         (info_auxv_command): Adjust to use target_stack.
801         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
802         * exceptions.c (print_flush): Handle a NULL target_stack.
803         * regcache.c (target_ops_no_register): Refactor as class with
804         virtual methods.
805
806         * exec.c (exec_target): New class.
807         (exec_ops): Now an exec_target.
808         (exec_open, exec_close_1, exec_get_section_table)
809         (exec_xfer_partial, exec_files_info, exec_has_memory)
810         (exec_make_note_section): Refactor as exec_target methods.
811         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
812         Delete.
813         (exec_target::find_memory_regions): New.
814         (_initialize_exec): Don't call init_exec_ops.
815         * gdbcore.h (exec_file_clear): Delete.
816
817         * corefile.c (core_target): Delete.
818         (core_file_command): Adjust.
819         * corelow.c (core_target): New class.
820         (the_core_target): New.
821         (core_close): Remove target_ops parameter.
822         (core_close_cleanup): Adjust.
823         (core_target::close): New.
824         (core_open, core_detach, get_core_registers, core_files_info)
825         (core_xfer_partial, core_thread_alive, core_read_description)
826         (core_pid_to_str, core_thread_name, core_has_memory)
827         (core_has_stack, core_has_registers, core_info_proc): Rework as
828         core_target methods.
829         (ignore, core_remove_breakpoint, init_core_ops): Delete.
830         (_initialize_corelow): Initialize the_core_target.
831         * gdbcore.h (core_target): Delete.
832         (the_core_target): New.
833
834         * ctf.c: (ctf_target): New class.
835         (ctf_ops): Now a ctf_target.
836         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
837         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
838         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
839         methods.
840         (init_ctf_ops): Delete.
841         (_initialize_ctf): Don't call it.
842         * tracefile-tfile.c (tfile_target): New class.
843         (tfile_ops): Now a tfile_target.
844         (tfile_open, tfile_close, tfile_files_info)
845         (tfile_get_tracepoint_status, tfile_trace_find)
846         (tfile_fetch_registers, tfile_xfer_partial)
847         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
848         Refactor as tfile_target methods.
849         (tfile_xfer_partial_features): Remove target_ops parameter.
850         (init_tfile_ops): Delete.
851         (_initialize_tracefile_tfile): Don't call it.
852         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
853         (tracefile_has_stack, tracefile_has_registers)
854         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
855         tracefile_target methods.
856         (init_tracefile_ops): Delete.
857         (tracefile_target::tracefile_target): New.
858         * tracefile.h: Include "target.h".
859         (tracefile_target): New class.
860         (init_tracefile_ops): Delete.
861
862         * spu-multiarch.c (spu_multiarch_target): New class.
863         (spu_ops): Now a spu_multiarch_target.
864         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
865         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
866         (spu_search_memory, spu_mourn_inferior): Refactor as
867         spu_multiarch_target methods.
868         (init_spu_ops): Delete.
869         (_initialize_spu_multiarch): Remove references to init_spu_ops,
870         complete_target_initialization.
871
872         * ravenscar-thread.c (ravenscar_thread_target): New class.
873         (ravenscar_ops): Now a ravenscar_thread_target.
874         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
875         (ravenscar_thread_alive, ravenscar_pid_to_str)
876         (ravenscar_fetch_registers, ravenscar_store_registers)
877         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
878         (ravenscar_stopped_by_hw_breakpoint)
879         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
880         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
881         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
882         methods.
883         (init_ravenscar_thread_ops): Delete.
884         (_initialize_ravenscar): Remove references to
885         init_ravenscar_thread_ops and complete_target_initialization.
886
887         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
888         (bsd_uthread_target): New class.
889         (bsd_uthread_ops): Now a bsd_uthread_target.
890         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
891         (bsd_uthread_close, bsd_uthread_mourn_inferior)
892         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
893         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
894         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
895         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
896         (bsd_uthread_target): Delete function.
897         (_initialize_bsd_uthread): Remove reference to
898         complete_target_initialization.
899
900         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
901         (target_bfd): ... this new class.
902         (target_bfd_xfer_partial, target_bfd_get_section_table)
903         (target_bfd_close): Refactor as target_bfd methods.
904         (target_bfd::~target_bfd): New.
905         (target_bfd_reopen): Adjust.
906         (target_bfd::close): New.
907
908         * record-btrace.c (record_btrace_target): New class.
909         (record_btrace_ops): Now a record_btrace_target.
910         (record_btrace_open, record_btrace_stop_recording)
911         (record_btrace_disconnect, record_btrace_close)
912         (record_btrace_async, record_btrace_info)
913         (record_btrace_insn_history, record_btrace_insn_history_range)
914         (record_btrace_insn_history_from, record_btrace_call_history)
915         (record_btrace_call_history_range)
916         (record_btrace_call_history_from, record_btrace_record_method)
917         (record_btrace_is_replaying, record_btrace_will_replay)
918         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
919         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
920         (record_btrace_store_registers, record_btrace_prepare_to_store)
921         (record_btrace_to_get_unwinder)
922         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
923         (record_btrace_commit_resume, record_btrace_wait)
924         (record_btrace_stop, record_btrace_can_execute_reverse)
925         (record_btrace_stopped_by_sw_breakpoint)
926         (record_btrace_supports_stopped_by_sw_breakpoint)
927         (record_btrace_stopped_by_hw_breakpoint)
928         (record_btrace_supports_stopped_by_hw_breakpoint)
929         (record_btrace_update_thread_list, record_btrace_thread_alive)
930         (record_btrace_goto_begin, record_btrace_goto_end)
931         (record_btrace_goto, record_btrace_stop_replaying_all)
932         (record_btrace_execution_direction)
933         (record_btrace_prepare_to_generate_core)
934         (record_btrace_done_generating_core): Refactor as
935         record_btrace_target methods.
936         (init_record_btrace_ops): Delete.
937         (_initialize_record_btrace): Remove reference to
938         init_record_btrace_ops.
939         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
940         the execution_direction global.
941         (record_full_base_target, record_full_target)
942         (record_full_core_target): New classes.
943         (record_full_ops): Now a record_full_target.
944         (record_full_core_ops): Now a record_full_core_target.
945         (record_full_target::detach, record_full_target::disconnect)
946         (record_full_core_target::disconnect)
947         (record_full_target::mourn_inferior, record_full_target::kill):
948         New.
949         (record_full_open, record_full_close, record_full_async): Refactor
950         as methods of the record_full_base_target class.
951         (record_full_resume, record_full_commit_resume): Refactor
952         as methods of the record_full_target class.
953         (record_full_wait, record_full_stopped_by_watchpoint)
954         (record_full_stopped_data_address)
955         (record_full_stopped_by_sw_breakpoint)
956         (record_full_supports_stopped_by_sw_breakpoint)
957         (record_full_stopped_by_hw_breakpoint)
958         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
959         methods of the record_full_base_target class.
960         (record_full_store_registers, record_full_xfer_partial)
961         (record_full_insert_breakpoint, record_full_remove_breakpoint):
962         Refactor as methods of the record_full_target class.
963         (record_full_can_execute_reverse, record_full_get_bookmark)
964         (record_full_goto_bookmark, record_full_execution_direction)
965         (record_full_record_method, record_full_info, record_full_delete)
966         (record_full_is_replaying, record_full_will_replay)
967         (record_full_goto_begin, record_full_goto_end, record_full_goto)
968         (record_full_stop_replaying): Refactor as methods of the
969         record_full_base_target class.
970         (record_full_core_resume, record_full_core_kill)
971         (record_full_core_fetch_registers)
972         (record_full_core_prepare_to_store)
973         (record_full_core_store_registers, record_full_core_xfer_partial)
974         (record_full_core_insert_breakpoint)
975         (record_full_core_remove_breakpoint)
976         (record_full_core_has_execution): Refactor
977         as methods of the record_full_core_target class.
978         (record_full_base_target::supports_delete_record): New.
979         (init_record_full_ops): Delete.
980         (init_record_full_core_ops): Delete.
981         (record_full_save): Refactor as method of the
982         record_full_base_target class.
983         (_initialize_record_full): Remove references to
984         init_record_full_ops and init_record_full_core_ops.
985
986         * remote.c (remote_target, extended_remote_target): New classes.
987         (remote_ops): Now a remote_target.
988         (extended_remote_ops): Now an extended_remote_target.
989         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
990         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
991         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
992         (remote_pass_signals, remote_set_syscall_catchpoint)
993         (remote_program_signals, )
994         (remote_thread_always_alive): Remove target_ops parameter.
995         (remote_thread_alive, remote_thread_name)
996         (remote_update_thread_list, remote_threads_extra_info)
997         (remote_static_tracepoint_marker_at)
998         (remote_static_tracepoint_markers_by_strid)
999         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1000         (remote_open): Refactor as methods of remote_target.
1001         (extended_remote_open, extended_remote_detach)
1002         (extended_remote_attach, extended_remote_post_attach):
1003         (extended_remote_supports_disable_randomization)
1004         (extended_remote_create_inferior): : Refactor as method of
1005         extended_remote_target.
1006         (remote_set_permissions, remote_open_1, remote_detach)
1007         (remote_follow_fork, remote_follow_exec, remote_disconnect)
1008         (remote_resume, remote_commit_resume, remote_stop)
1009         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1010         (remote_terminal_ours, remote_wait, remote_fetch_registers)
1011         (remote_prepare_to_store, remote_store_registers)
1012         (remote_flash_erase, remote_flash_done, remote_files_info)
1013         (remote_kill, remote_mourn, remote_insert_breakpoint)
1014         (remote_remove_breakpoint, remote_insert_watchpoint)
1015         (remote_watchpoint_addr_within_range)
1016         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1017         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1018         (remote_supports_stopped_by_sw_breakpoint)
1019         (remote_stopped_by_hw_breakpoint)
1020         (remote_supports_stopped_by_hw_breakpoint)
1021         (remote_stopped_by_watchpoint, remote_stopped_data_address)
1022         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1023         (remote_verify_memory): Refactor as methods of remote_target.
1024         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1025         parameter.
1026         (remote_xfer_partial, remote_get_memory_xfer_limit)
1027         (remote_search_memory, remote_rcmd, remote_memory_map)
1028         (remote_pid_to_str, remote_get_thread_local_address)
1029         (remote_get_tib_address, remote_read_description): Refactor as
1030         methods of remote_target.
1031         (remote_target::fileio_open, remote_target::fileio_pwrite)
1032         (remote_target::fileio_pread, remote_target::fileio_close): New.
1033         (remote_hostio_readlink, remote_hostio_fstat)
1034         (remote_filesystem_is_local, remote_can_execute_reverse)
1035         (remote_supports_non_stop, remote_supports_disable_randomization)
1036         (remote_supports_multi_process, remote_supports_cond_breakpoints)
1037         (remote_supports_enable_disable_tracepoint)
1038         (remote_supports_string_tracing)
1039         (remote_can_run_breakpoint_commands, remote_trace_init)
1040         (remote_download_tracepoint, remote_can_download_tracepoint)
1041         (remote_download_trace_state_variable, remote_enable_tracepoint)
1042         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1043         (remote_trace_start, remote_get_trace_status)
1044         (remote_get_tracepoint_status, remote_trace_stop)
1045         (remote_trace_find, remote_get_trace_state_variable_value)
1046         (remote_save_trace_data, remote_get_raw_trace_data)
1047         (remote_set_disconnected_tracing, remote_core_of_thread)
1048         (remote_set_circular_trace_buffer, remote_traceframe_info)
1049         (remote_get_min_fast_tracepoint_insn_len)
1050         (remote_set_trace_buffer_size, remote_set_trace_notes)
1051         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1052         (remote_disable_btrace, remote_teardown_btrace)
1053         (remote_read_btrace, remote_btrace_conf)
1054         (remote_augmented_libraries_svr4_read, remote_load)
1055         (remote_pid_to_exec_file, remote_can_do_single_step)
1056         (remote_execution_direction, remote_thread_handle_to_thread_info):
1057         Refactor as methods of remote_target.
1058         (init_remote_ops, init_extended_remote_ops): Delete.
1059         (remote_can_async_p, remote_is_async_p, remote_async)
1060         (remote_thread_events, remote_upload_tracepoints)
1061         (remote_upload_trace_state_variables): Refactor as methods of
1062         remote_target.
1063         (_initialize_remote): Remove references to init_remote_ops and
1064         init_extended_remote_ops.
1065
1066         * remote-sim.c (gdbsim_target): New class.
1067         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1068         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1069         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1070         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1071         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1072         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1073         Refactor as methods of gdbsim_target.
1074         (gdbsim_ops): Now a gdbsim_target.
1075         (init_gdbsim_ops): Delete.
1076         (gdbsim_cntrl_c): Adjust.
1077         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1078
1079         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1080         (the_amd64_linux_nat_target): New.
1081         (amd64_linux_fetch_inferior_registers)
1082         (amd64_linux_store_inferior_registers): Refactor as methods of
1083         amd64_linux_nat_target.
1084         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
1085         * i386-linux-nat.c: Don't include "linux-nat.h".
1086         (i386_linux_nat_target): New class.
1087         (the_i386_linux_nat_target): New.
1088         (i386_linux_fetch_inferior_registers)
1089         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1090         as methods of i386_linux_nat_target.
1091         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
1092         * inf-child.c (inf_child_ops): Delete.
1093         (inf_child_fetch_inferior_registers)
1094         (inf_child_store_inferior_registers): Delete.
1095         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1096         methods of inf_child_target.
1097         (inf_child_target::supports_terminal_ours)
1098         (inf_child_target::terminal_init)
1099         (inf_child_target::terminal_inferior)
1100         (inf_child_target::terminal_ours_for_output)
1101         (inf_child_target::terminal_ours, inf_child_target::interrupt)
1102         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1103         New.
1104         (inf_child_open, inf_child_disconnect, inf_child_close)
1105         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1106         (inf_child_post_startup_inferior, inf_child_can_run)
1107         (inf_child_pid_to_exec_file): Refactor as methods of
1108         inf_child_target.
1109         (inf_child_follow_fork): Delete.
1110         (inf_child_target::can_create_inferior)
1111         (inf_child_target::can_attach): New.
1112         (inf_child_target::has_all_memory, inf_child_target::has_memory)
1113         (inf_child_target::has_stack, inf_child_target::has_registers)
1114         (inf_child_target::has_execution): New.
1115         (inf_child_fileio_open, inf_child_fileio_pwrite)
1116         (inf_child_fileio_pread, inf_child_fileio_fstat)
1117         (inf_child_fileio_close, inf_child_fileio_unlink)
1118         (inf_child_fileio_readlink, inf_child_use_agent)
1119         (inf_child_can_use_agent): Refactor as methods of
1120         inf_child_target.
1121         (return_zero, inf_child_target): Delete.
1122         (inf_child_target::inf_child_target): New.
1123         * inf-child.h: Include "target.h".
1124         (inf_child_target): Delete function prototype.
1125         (inf_child_target): New class.
1126         (inf_child_open_target, inf_child_mourn_inferior)
1127         (inf_child_maybe_unpush_target): Delete.
1128         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1129         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1130         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1131         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1132         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1133         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1134         (inf_ptrace_wait, inf_ptrace_xfer_partial)
1135         (inf_ptrace_thread_alive, inf_ptrace_files_info)
1136         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1137         methods of inf_ptrace_target.
1138         (inf_ptrace_target): Delete function.
1139         * inf-ptrace.h: Include "inf-child.h".
1140         (inf_ptrace_target): Delete function declaration.
1141         (inf_ptrace_target): New class.
1142         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1143         * linux-nat.c (linux_target): New.
1144         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1145         (linux_nat_target::~linux_nat_target): New.
1146         (linux_child_post_attach, linux_child_post_startup_inferior)
1147         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1148         (linux_child_remove_fork_catchpoint)
1149         (linux_child_insert_vfork_catchpoint)
1150         (linux_child_remove_vfork_catchpoint)
1151         (linux_child_insert_exec_catchpoint)
1152         (linux_child_remove_exec_catchpoint)
1153         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1154         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1155         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1156         (linux_nat_stopped_data_address)
1157         (linux_nat_stopped_by_sw_breakpoint)
1158         (linux_nat_supports_stopped_by_sw_breakpoint)
1159         (linux_nat_stopped_by_hw_breakpoint)
1160         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1161         (linux_nat_kill, linux_nat_mourn_inferior)
1162         (linux_nat_xfer_partial, linux_nat_thread_alive)
1163         (linux_nat_update_thread_list, linux_nat_pid_to_str)
1164         (linux_nat_thread_name, linux_child_pid_to_exec_file)
1165         (linux_child_static_tracepoint_markers_by_strid)
1166         (linux_nat_is_async_p, linux_nat_can_async_p)
1167         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1168         (linux_nat_supports_multi_process)
1169         (linux_nat_supports_disable_randomization, linux_nat_async)
1170         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1171         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1172         (linux_nat_fileio_open, linux_nat_fileio_readlink)
1173         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1174         methods of linux_nat_target.
1175         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1176         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1177         parameter.
1178         (check_stopped_by_watchpoint): Adjust.
1179         (linux_xfer_partial): Delete.
1180         (linux_target_install_ops, linux_target, linux_nat_add_target):
1181         Delete.
1182         (linux_nat_target::linux_nat_target): New.
1183         * linux-nat.h: Include "inf-ptrace.h".
1184         (linux_nat_target): New.
1185         (linux_target, linux_target_install_ops, linux_nat_add_target):
1186         Delete function declarations.
1187         (linux_target): Declare global.
1188         * linux-thread-db.c (thread_db_target): New.
1189         (thread_db_target::thread_db_target): New.
1190         (thread_db_ops): Delete.
1191         (the_thread_db_target): New.
1192         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1193         (thread_db_update_thread_list, thread_db_pid_to_str)
1194         (thread_db_extra_thread_info)
1195         (thread_db_thread_handle_to_thread_info)
1196         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1197         (thread_db_resume): Refactor as methods of thread_db_target.
1198         (init_thread_db_ops): Delete.
1199         (_initialize_thread_db): Remove reference to init_thread_db_ops.
1200         * x86-linux-nat.c: Don't include "linux-nat.h".
1201         (super_post_startup_inferior): Delete.
1202         (x86_linux_nat_target::~x86_linux_nat_target): New.
1203         (x86_linux_child_post_startup_inferior)
1204         (x86_linux_read_description, x86_linux_enable_btrace)
1205         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1206         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1207         methods of x86_linux_nat_target.
1208         (x86_linux_create_target): Delete.  Bits folded ...
1209         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
1210         pointer.
1211         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1212         (x86_linux_nat_target): New class.
1213         (x86_linux_create_target): Delete.
1214         (x86_linux_add_target): Now takes a linux_nat_target pointer.
1215         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1216         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1217         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1218         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1219         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1220         make extern.
1221         (x86_use_watchpoints): Delete.
1222         * x86-nat.h: Include "breakpoint.h" and "target.h".
1223         (x86_use_watchpoints): Delete.
1224         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1225         (x86_stopped_by_watchpoint, x86_stopped_data_address)
1226         (x86_insert_watchpoint, x86_remove_watchpoint)
1227         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1228         (x86_stopped_by_hw_breakpoint): New declarations.
1229         (x86_nat_target): New template class.
1230
1231         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1232         (the_ppc_linux_nat_target): New.
1233         (ppc_linux_fetch_inferior_registers)
1234         (ppc_linux_can_use_hw_breakpoint)
1235         (ppc_linux_region_ok_for_hw_watchpoint)
1236         (ppc_linux_ranged_break_num_registers)
1237         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1238         (ppc_linux_insert_mask_watchpoint)
1239         (ppc_linux_remove_mask_watchpoint)
1240         (ppc_linux_can_accel_watchpoint_condition)
1241         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1242         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1243         (ppc_linux_watchpoint_addr_within_range)
1244         (ppc_linux_masked_watch_num_registers)
1245         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1246         (ppc_linux_read_description): Refactor as methods of
1247         ppc_linux_nat_target.
1248         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
1249
1250         * procfs.c (procfs_xfer_partial): Delete forward declaration.
1251         (procfs_target): New class.
1252         (the_procfs_target): New.
1253         (procfs_target): Delete function.
1254         (procfs_auxv_parse, procfs_attach, procfs_detach)
1255         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1256         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1257         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1258         (procfs_create_inferior, procfs_update_thread_list)
1259         (procfs_thread_alive, procfs_pid_to_str)
1260         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1261         (procfs_stopped_data_address, procfs_insert_watchpoint)
1262         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1263         (proc_find_memory_regions, procfs_info_proc)
1264         (procfs_make_note_section): Refactor as methods of procfs_target.
1265         (_initialize_procfs): Adjust.
1266         * sol-thread.c (sol_thread_target): New class.
1267         (sol_thread_ops): Now a sol_thread_target.
1268         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1269         (sol_thread_fetch_registers, sol_thread_store_registers)
1270         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1271         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1272         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1273         (init_sol_thread_ops): Delete.
1274         (_initialize_sol_thread): Adjust.  Remove references to
1275         init_sol_thread_ops and complete_target_initialization.
1276
1277         * windows-nat.c (windows_nat_target): New class.
1278         (windows_fetch_inferior_registers)
1279         (windows_store_inferior_registers, windows_resume, windows_wait)
1280         (windows_attach, windows_detach, windows_pid_to_exec_file)
1281         (windows_files_info, windows_create_inferior)
1282         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1283         (windows_close, windows_pid_to_str, windows_xfer_partial)
1284         (windows_get_tib_address, windows_get_ada_task_ptid)
1285         (windows_thread_name, windows_thread_alive): Refactor as
1286         windows_nat_target methods.
1287         (do_initial_windows_stuff): Adjust.
1288         (windows_target): Delete function.
1289         (_initialize_windows_nat): Adjust.
1290
1291         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1292         (darwin_mourn_inferior, darwin_kill_inferior)
1293         (darwin_create_inferior, darwin_attach, darwin_detach)
1294         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1295         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1296         (darwin_supports_multi_process): Refactor as darwin_nat_target
1297         methods.
1298         (darwin_resume_to, darwin_files_info): Delete.
1299         (_initialize_darwin_inferior): Rename to ...
1300         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
1301         * darwin-nat.h: Include "inf-child.h".
1302         (darwin_nat_target): New class.
1303         (darwin_complete_target): Delete.
1304         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1305         (darwin_target): New.
1306         (i386_darwin_fetch_inferior_registers)
1307         (i386_darwin_store_inferior_registers): Refactor as methods of
1308         darwin_nat_target.
1309         (darwin_complete_target): Delete, with ...
1310         (_initialize_i386_darwin_nat): ... bits factored out here.
1311
1312         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1313         (the_alpha_linux_nat_target): New.
1314         (alpha_linux_register_u_offset): Refactor as
1315         alpha_linux_nat_target method.
1316         (_initialize_alpha_linux_nat): Adjust.
1317         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1318         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1319         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1320         methods of linux_nat_trad_target.
1321         (linux_trad_target): Delete.
1322         * linux-nat-trad.h (linux_trad_target): Delete function.
1323         (linux_nat_trad_target): New class.
1324         * mips-linux-nat.c (mips_linux_nat_target): New class.
1325         (super_fetch_registers, super_store_registers, super_close):
1326         Delete.
1327         (the_mips_linux_nat_target): New.
1328         (mips64_linux_regsets_fetch_registers)
1329         (mips64_linux_regsets_store_registers)
1330         (mips64_linux_fetch_registers, mips64_linux_store_registers)
1331         (mips_linux_register_u_offset, mips_linux_read_description)
1332         (mips_linux_can_use_hw_breakpoint)
1333         (mips_linux_stopped_by_watchpoint)
1334         (mips_linux_stopped_data_address)
1335         (mips_linux_region_ok_for_hw_watchpoint)
1336         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1337         (mips_linux_close): Refactor as methods of mips_linux_nat.
1338         (_initialize_mips_linux_nat): Adjust to C++ification.
1339
1340         * aix-thread.c (aix_thread_target): New class.
1341         (aix_thread_ops): Now an aix_thread_target.
1342         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1343         (aix_thread_fetch_registers, aix_thread_store_registers)
1344         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1345         (aix_thread_thread_alive, aix_thread_pid_to_str)
1346         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1347         Refactor as methods of aix_thread_target.
1348         (init_aix_thread_ops): Delete.
1349         (_initialize_aix_thread): Remove references to init_aix_thread_ops
1350         and complete_target_initialization.
1351         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1352         (rs6000_nat_target): New class.
1353         (the_rs6000_nat_target): New.
1354         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1355         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1356         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1357         (super_create_inferior): Delete.
1358         (_initialize_rs6000_nat): Adjust to C++ification.
1359
1360         * arm-linux-nat.c (arm_linux_nat_target): New class.
1361         (the_arm_linux_nat_target): New.
1362         (arm_linux_fetch_inferior_registers)
1363         (arm_linux_store_inferior_registers, arm_linux_read_description)
1364         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1365         (arm_linux_remove_hw_breakpoint)
1366         (arm_linux_region_ok_for_hw_watchpoint)
1367         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1368         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1369         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1370         arm_linux_nat_target.
1371         (_initialize_arm_linux_nat): Adjust to C++ification.
1372
1373         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1374         (the_aarch64_linux_nat_target): New.
1375         (aarch64_linux_fetch_inferior_registers)
1376         (aarch64_linux_store_inferior_registers)
1377         (aarch64_linux_child_post_startup_inferior)
1378         (aarch64_linux_read_description)
1379         (aarch64_linux_can_use_hw_breakpoint)
1380         (aarch64_linux_insert_hw_breakpoint)
1381         (aarch64_linux_remove_hw_breakpoint)
1382         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1383         (aarch64_linux_region_ok_for_hw_watchpoint)
1384         (aarch64_linux_stopped_data_address)
1385         (aarch64_linux_stopped_by_watchpoint)
1386         (aarch64_linux_watchpoint_addr_within_range)
1387         (aarch64_linux_can_do_single_step): Refactor as methods of
1388         aarch64_linux_nat_target.
1389         (super_post_startup_inferior): Delete.
1390         (_initialize_aarch64_linux_nat): Adjust to C++ification.
1391
1392         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1393         (the_hppa_linux_nat_target): New.
1394         (hppa_linux_fetch_inferior_registers)
1395         (hppa_linux_store_inferior_registers): Refactor as methods of
1396         hppa_linux_nat_target.
1397         (_initialize_hppa_linux_nat): Adjust to C++ification.
1398
1399         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1400         (the_ia64_linux_nat_target): New.
1401         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1402         (ia64_linux_stopped_data_address)
1403         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1404         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1405         ia64_linux_nat_target methods.
1406         (super_xfer_partial): Delete.
1407         (_initialize_ia64_linux_nat): Adjust to C++ification.
1408
1409         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1410         (the_m32r_linux_nat_target): New.
1411         (m32r_linux_fetch_inferior_registers)
1412         (m32r_linux_store_inferior_registers): Refactor as
1413         m32r_linux_nat_target methods.
1414         (_initialize_m32r_linux_nat): Adjust to C++ification.
1415
1416         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1417         (the_m68k_linux_nat_target): New.
1418         (m68k_linux_fetch_inferior_registers)
1419         (m68k_linux_store_inferior_registers): Refactor as
1420         m68k_linux_nat_target methods.
1421         (_initialize_m68k_linux_nat): Adjust to C++ification.
1422
1423         * s390-linux-nat.c (s390_linux_nat_target): New class.
1424         (the_s390_linux_nat_target): New.
1425         (s390_linux_fetch_inferior_registers)
1426         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1427         (s390_insert_watchpoint, s390_remove_watchpoint)
1428         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1429         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1430         (s390_auxv_parse, s390_read_description): Refactor as methods of
1431         s390_linux_nat_target.
1432         (_initialize_s390_nat): Adjust to C++ification.
1433
1434         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1435         (the_sparc_linux_nat_target): New.
1436         (_initialize_sparc_linux_nat): Adjust to C++ification.
1437         * sparc-nat.c (sparc_fetch_inferior_registers)
1438         (sparc_store_inferior_registers): Remove target_ops parameter.
1439         * sparc-nat.h (sparc_fetch_inferior_registers)
1440         (sparc_store_inferior_registers): Remove target_ops parameter.
1441         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1442         (the_sparc64_linux_nat_target): New.
1443         (_initialize_sparc64_linux_nat): Adjust to C++ification.
1444
1445         * spu-linux-nat.c (spu_linux_nat_target): New class.
1446         (the_spu_linux_nat_target): New.
1447         (spu_child_post_startup_inferior, spu_child_post_attach)
1448         (spu_child_wait, spu_fetch_inferior_registers)
1449         (spu_store_inferior_registers, spu_xfer_partial)
1450         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1451         methods.
1452         (_initialize_spu_nat): Adjust to C++ification.
1453
1454         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1455         (the_tilegx_linux_nat_target): New.
1456         (fetch_inferior_registers, store_inferior_registers):
1457         Refactor as methods.
1458         (_initialize_tile_linux_nat): Adjust to C++ification.
1459
1460         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1461         (the_xtensa_linux_nat_target): New.
1462         (xtensa_linux_fetch_inferior_registers)
1463         (xtensa_linux_store_inferior_registers): Refactor as
1464         xtensa_linux_nat_target methods.
1465         (_initialize_xtensa_linux_nat): Adjust to C++ification.
1466
1467         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1468         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1469         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1470         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1471         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1472         (fbsd_stopped_by_sw_breakpoint)
1473         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1474         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1475         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1476         (fbsd_post_startup_inferior, fbsd_post_attach)
1477         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1478         (fbsd_set_syscall_catchpoint)
1479         (super_xfer_partial, super_resume, super_wait)
1480         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1481         (fbsd_handle_debug_trap): Remove target_ops parameter.
1482         (fbsd_nat_add_target): Delete.
1483         * fbsd-nat.h: Include "inf-ptrace.h".
1484         (fbsd_nat_add_target): Delete.
1485         (USE_SIGTRAP_SIGINFO): Define.
1486         (fbsd_nat_target): New class.
1487
1488         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1489         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1490         (amd64bsd_target): Delete.
1491         * amd64-bsd-nat.h: New file.
1492         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1493         "x86-bsd-nat.h".
1494         (amd64_fbsd_nat_target): New class.
1495         (the_amd64_fbsd_nat_target): New.
1496         (amd64fbsd_read_description): Refactor as method of
1497         amd64_fbsd_nat_target.
1498         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1499         (_initialize_amd64fbsd_nat): Adjust to C++ification.
1500         * amd64-nat.h (amd64bsd_target): Delete function declaration.
1501         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1502         (i386bsd_store_inferior_registers): Remove target_ops parameter.
1503         (i386bsd_target): Delete.
1504         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1505         (i386bsd_fetch_inferior_registers)
1506         (i386bsd_store_inferior_registers): Declare.
1507         (i386_bsd_nat_target): New class.
1508         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1509         (the_i386_fbsd_nat_target): New.
1510         (i386fbsd_resume, i386fbsd_read_description): Refactor as
1511         i386_fbsd_nat_target methods.
1512         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1513         (_initialize_i386fbsd_nat): Adjust to C++ification.
1514         * x86-bsd-nat.c (super_mourn_inferior): Delete.
1515         (x86bsd_mourn_inferior, x86bsd_target): Delete.
1516         (_initialize_x86_bsd_nat): Adjust to C++ification.
1517         * x86-bsd-nat.h: Include "x86-nat.h".
1518         (x86bsd_target): Delete declaration.
1519         (x86bsd_nat_target): New class.
1520
1521         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1522         (the_aarch64_fbsd_nat_target): New.
1523         (aarch64_fbsd_fetch_inferior_registers)
1524         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1525         aarch64_fbsd_nat_target.
1526         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1527         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1528         (the_alpha_bsd_nat_target): New.
1529         (alphabsd_fetch_inferior_registers)
1530         (alphabsd_store_inferior_registers): Refactor as
1531         alpha_bsd_nat_target methods.
1532         (_initialize_alphabsd_nat): Refactor as methods of
1533         alpha_bsd_nat_target.
1534         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1535         (the_amd64_nbsd_nat_target): New.
1536         (_initialize_amd64nbsd_nat): Adjust to C++ification.
1537         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1538         (the_amd64_obsd_nat_target): New.
1539         (_initialize_amd64obsd_nat): Adjust to C++ification.
1540         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1541         (the_arm_fbsd_nat_target): New.
1542         (arm_fbsd_fetch_inferior_registers)
1543         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1544         (_initialize_arm_fbsd_nat): Refactor as methods of
1545         arm_fbsd_nat_target.
1546         (_initialize_arm_fbsd_nat): Adjust to C++ification.
1547         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1548         (the_arm_netbsd_nat_target): New.
1549         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1550         arm_netbsd_nat_target.
1551         (_initialize_arm_netbsd_nat): Adjust to C++ification.
1552         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1553         (the_hppa_nbsd_nat_target): New.
1554         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1555         hppa_nbsd_nat_target methods.
1556         (_initialize_hppanbsd_nat): Adjust to C++ification.
1557         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1558         (the_hppa_obsd_nat_target): New.
1559         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1560         methods of hppa_obsd_nat_target.
1561         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
1562         add_target.
1563         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1564         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
1565         add_target.
1566         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1567         (_initialize_i386obsd_nat): Use add_target.
1568         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1569         (the_m68k_bsd_nat_target): New.
1570         (m68kbsd_fetch_inferior_registers)
1571         (m68kbsd_store_inferior_registers): Refactor as methods of
1572         m68k_bsd_nat_target.
1573         (_initialize_m68kbsd_nat): Adjust to C++ification.
1574         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1575         (the_mips_fbsd_nat_target): New.
1576         (mips_fbsd_fetch_inferior_registers)
1577         (mips_fbsd_store_inferior_registers): Refactor as methods of
1578         mips_fbsd_nat_target.
1579         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
1580         add_target.
1581         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1582         (the_mips_nbsd_nat_target): New.
1583         (mipsnbsd_fetch_inferior_registers)
1584         (mipsnbsd_store_inferior_registers): Refactor as methods of
1585         mips_nbsd_nat_target.
1586         (_initialize_mipsnbsd_nat): Adjust to C++ification.
1587         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1588         (the_mips64_obsd_nat_target): New.
1589         (mips64obsd_fetch_inferior_registers)
1590         (mips64obsd_store_inferior_registers): Refactor as methods of
1591         mips64_obsd_nat_target.
1592         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
1593         add_target.
1594         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1595         nbsd_nat_target.
1596         * nbsd-nat.h: Include "inf-ptrace.h".
1597         (nbsd_nat_target): New class.
1598         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1599         (obsd_wait): Refactor as methods of obsd_nat_target.
1600         (obsd_add_target): Delete.
1601         * obsd-nat.h: Include "inf-ptrace.h".
1602         (obsd_nat_target): New class.
1603         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1604         (the_ppc_fbsd_nat_target): New.
1605         (ppcfbsd_fetch_inferior_registers)
1606         (ppcfbsd_store_inferior_registers): Refactor as methods of
1607         ppc_fbsd_nat_target.
1608         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
1609         add_target.
1610         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1611         (the_ppc_nbsd_nat_target): New.
1612         (ppcnbsd_fetch_inferior_registers)
1613         (ppcnbsd_store_inferior_registers): Refactor as methods of
1614         ppc_nbsd_nat_target.
1615         (_initialize_ppcnbsd_nat): Adjust to C++ification.
1616         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1617         (the_ppc_obsd_nat_target): New.
1618         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1619         methods of ppc_obsd_nat_target.
1620         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
1621         add_target.
1622         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1623         (the_sh_nbsd_nat_target): New.
1624         (shnbsd_fetch_inferior_registers)
1625         (shnbsd_store_inferior_registers): Refactor as methods of
1626         sh_nbsd_nat_target.
1627         (_initialize_shnbsd_nat): Adjust to C++ification.
1628         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1629         (inf_ptrace_xfer_partial): Delete.
1630         (sparc_xfer_partial, sparc_target): Delete.
1631         * sparc-nat.h (sparc_fetch_inferior_registers)
1632         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1633         (sparc_target): Delete function declaration.
1634         (sparc_target): New template class.
1635         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1636         (_initialize_sparcnbsd_nat): Adjust to C++ification.
1637         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1638         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
1639         add_target.
1640         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1641         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1642         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1643         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
1644         add_target.
1645         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1646         (the_vax_bsd_nat_target): New.
1647         (vaxbsd_fetch_inferior_registers)
1648         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1649         methods.
1650         (_initialize_vaxbsd_nat): Adjust to C++ification.
1651
1652         * bsd-kvm.c (bsd_kvm_target): New class.
1653         (bsd_kvm_ops): Now a bsd_kvm_target.
1654         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1655         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1656         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1657         bsd_kvm_target.
1658         (bsd_kvm_return_one): Delete.
1659         (bsd_kvm_add_target): Adjust to C++ification.
1660
1661         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1662         (nto_procfs_target_procfs): New classes.
1663         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1664         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1665         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1666         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1667         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1668         (procfs_remove_hw_breakpoint, procfs_resume)
1669         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1670         (procfs_kill_inferior, procfs_store_registers)
1671         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1672         as methods of nto_procfs_target.
1673         (nto_procfs_ops): Now an nto_procfs_target_procfs.
1674         (nto_native_ops): Delete.
1675         (procfs_open, procfs_native_open): Delete.
1676         (nto_native_ops): Now an nto_procfs_target_native.
1677         (init_procfs_targets): Adjust to C++ification.
1678         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1679         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1680         Refactor as methods of nto_procfs_target.
1681
1682         * go32-nat.c (go32_nat_target): New class.
1683         (the_go32_nat_target): New.
1684         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1685         (go32_store_registers, go32_xfer_partial, go32_files_info)
1686         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1687         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1688         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1689         (go32_pid_to_str): Refactor as methods of go32_nat_target.
1690         (go32_target): Delete.
1691         (_initialize_go32_nat): Adjust to C++ification.
1692
1693         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1694         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1695         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1696         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1697         gnu_nat_target.
1698         (gnu_target): Delete.
1699         * gnu-nat.h (gnu_target): Delete.
1700         (gnu_nat_target): New class.
1701         * i386-gnu-nat.c (gnu_base_target): New.
1702         (i386_gnu_nat_target): New class.
1703         (the_i386_gnu_nat_target): New.
1704         (_initialize_i386gnu_nat): Adjust to C++ification.
1705
1706 2018-05-02  Pedro Alves  <palves@redhat.com>
1707
1708         * bfd-target.c (target_bfd_xclose): Rename to ...
1709         (target_bfd_close): ... this.
1710         (target_bfd_reopen): Adjust.
1711         * target.c (target_close): Remove references to to_xclose.
1712         * target.h (target_ops::to_xclose): Delete.
1713         (target_ops::to_close): Update comments.
1714
1715 2018-05-02  Pedro Alves  <palves@redhat.com>
1716
1717         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1718         "linux-nat.h".
1719         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1720         * inf-ptrace.c (inf_ptrace_register_u_offset)
1721         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1722         (inf_ptrace_store_register, inf_ptrace_store_registers)
1723         (inf_ptrace_trad_target): Move to ...
1724         * linux-nat-trad.c: ... this new file.
1725         * linux-nat-trad.h: New file.
1726         * linux-nat.c (linux_target_install_ops): Make extern.
1727         (linux_trad_target): Delete.
1728         * linux-nat.h (linux_trad_target): Delete declaration.
1729         (linux_target_install_ops): Declare.
1730         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1731         "linux-nat.h".
1732
1733 2018-05-02  Pedro Alves  <palves@redhat.com>
1734
1735         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1736         procfs_target/add_target here.
1737         * procfs.c (procfs_target): Make static.
1738         (_initialize_procfs): Call add_target here.
1739         * procfs.h (struct target_ops): Remove forward declaration.
1740         (procfs_target): Remove declaration.
1741         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1742
1743 2018-05-02  Pedro Alves  <palves@redhat.com>
1744
1745         * procfs.c (procfs_stopped_by_watchpoint)
1746         (procfs_insert_watchpoint, procfs_remove_watchpoint)
1747         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1748         Forward declare.
1749         (procfs_use_watchpoints): Delete, move contents...
1750         (procfs_target): ... here.
1751         * procfs.h (procfs_use_watchpoints): Delete declaration.
1752         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1753         procfs_use_watchpoints.
1754         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1755         procfs_use_watchpoints.
1756
1757 2018-05-02  Tom Tromey  <tom@tromey.com>
1758
1759         PR python/20084:
1760         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1761         and var_zuinteger_unlimited.
1762         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1763         and PARAM_ZUINTEGER_UNLIMITED.
1764         (set_parameter_value): Handle var_zuinteger and
1765         var_zuinteger_unlimited.
1766         (add_setshow_generic): Likewise.
1767         (parmpy_init): Likewise.
1768
1769 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
1770
1771         PR rust/23124
1772         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1773         pointer is not null before dereferencing it.
1774
1775 2018-04-30  Tom Tromey  <tom@tromey.com>
1776
1777         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1778         is_mi_like_p.
1779
1780 2018-04-30  Tom Tromey  <tom@tromey.com>
1781
1782         * breakpoint.c (mention): Remove use of is_mi_like_p.
1783         (print_mention_ranged_breakpoint): Likewise.
1784         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1785         of is_mi_like_p.
1786
1787 2018-04-30  Tom Tromey  <tom@tromey.com>
1788
1789         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1790
1791 2018-04-30  Tom Tromey  <tom@tromey.com>
1792
1793         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1794         (info_spu_event_command): Remove some uses of is_mi_like_p.
1795
1796 2018-04-30  Tom Tromey  <tom@tromey.com>
1797
1798         * python/py-framefilter.c (py_print_single_arg)
1799         (enumerate_locals, py_print_args, py_print_frame): Remove some
1800         uses of is_mi_like_p.
1801
1802 2018-04-30  Tom Tromey  <tom@tromey.com>
1803
1804         * ui-out.c: Update.
1805         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1806         * ui-out.h (ui_out::is_mi_like_p): Now const.
1807         (ui_out::do_is_mi_like_p): Now const.
1808         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1809
1810 2018-04-30  Tom Tromey  <tom@tromey.com>
1811
1812         * varobj.c (varobj_set_visualizer): Use new_reference.
1813         * python/python.c (gdbpy_decode_line): Use new_reference.
1814         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1815         new_reference.
1816
1817 2018-04-30  Tom Tromey  <tom@tromey.com>
1818
1819         * varobj.c (install_new_value): Use new_reference.
1820         * value.h (value_incref): Return void.  Swap intro comment with
1821         value_decref.
1822         * value.c (set_value_parent): Use new_reference.
1823         (value_incref): Return void.  Update intro comment.
1824         (release_value): Use new_reference.
1825         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1826
1827 2018-04-30  Tom Tromey  <tom@tromey.com>
1828
1829         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1830         * gdb_bfd.h (new_bfd_ref): Remove.
1831         (gdb_bfd_open): Update comment.
1832         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1833         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1834         (gdb_bfd_fdopenr): Use new_reference.
1835         * exec.c (exec_file_attach): Use new_reference.
1836
1837 2018-04-30  Tom Tromey  <tom@tromey.com>
1838
1839         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1840         method.
1841
1842 2018-04-30  Tom Tromey  <tom@tromey.com>
1843
1844         * jit.c (jit_read_code_entry): Use type_align.
1845         * i386-tdep.c (i386_gdbarch_init): Don't call
1846         set_gdbarch_long_long_align_bit.
1847         * gdbarch.sh: Remove long_long_align_bit.
1848         * gdbarch.c, gdbarch.h: Rebuild.
1849         * arc-tdep.c (arc_type_align): New function.
1850         (arc_gdbarch_init): Use arc_type_align.  Don't call
1851         set_gdbarch_long_long_align_bit.
1852
1853 2018-04-30  Tom Tromey  <tom@tromey.com>
1854
1855         * rust-lang.c (rust_type_alignment): Remove.
1856         (rust_composite_type): Use type_align.
1857
1858 2018-04-30  Tom Tromey  <tom@tromey.com>
1859
1860         * NEWS: Mention Type.align.
1861         * python/py-type.c (typy_get_alignof): New function.
1862         (type_object_getset): Add "alignof".
1863
1864 2018-04-30  Tom Tromey  <tom@tromey.com>
1865
1866         PR exp/17095:
1867         * NEWS: Update.
1868         * std-operator.def (UNOP_ALIGNOF): New operator.
1869         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1870         New.
1871         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1872         * c-lang.c (c_op_print_tab): Add alignof.
1873         * c-exp.y (ALIGNOF): New token.
1874         (exp): Add "ALIGNOF" production.
1875         (ident_tokens): Add _Alignof and alignof.
1876
1877 2018-04-30  Tom Tromey  <tom@tromey.com>
1878
1879         * i386-tdep.c (i386_type_align): New function.
1880         (i386_gdbarch_init): Update.
1881         * gdbarch.sh (type_align): New method.
1882         * gdbarch.c, gdbarch.h: Rebuild.
1883         * arch-utils.h (default_type_align): Declare.
1884         * arch-utils.c (default_type_align): New function.
1885         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1886         (struct type) <align_log2>: New field.
1887         <instance_flags>: Now a bitfield.
1888         (TYPE_RAW_ALIGN): New macro.
1889         (type_align, type_raw_align, set_type_align): Declare.
1890         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1891         functions.
1892         * dwarf2read.c (quirk_rust_enum): Set type alignment.
1893         (get_alignment, maybe_set_alignment): New functions.
1894         (read_structure_type, read_enumeration_type, read_array_type)
1895         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1896         (read_subrange_type, read_base_type): Set type alignment.
1897
1898 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
1899
1900         * dwarf2read.c (read_index_from_section): Use bool.
1901
1902 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
1903
1904         PR gdb/22950
1905         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1906         with #ifdef.
1907
1908 2018-04-29  John Reiser  <jreiser@BitWagon.com>
1909
1910         PR build/22873
1911         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1912         last step, and do it atomically.
1913
1914 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
1915
1916         * compile/compile-c-types.c (convert_int, convert_float):
1917         Update for C FE v1.
1918
1919 2018-04-27  Tom Tromey  <tom@tromey.com>
1920
1921         PR rust/22545:
1922         * rust-lang.c (rust_inclusive_range_type_p): New function.
1923         (rust_range): Handle inclusive ranges.
1924         (rust_compute_range): Likewise.
1925         * rust-exp.y (struct rust_op) <inclusive>: New field.
1926         (DOTDOTEQ): New constant.
1927         (range_expr): Add "..=" productions.
1928         (operator_tokens): Add "..=" token.
1929         (ast_range): Add "inclusive" parameter.
1930         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1931         ranges.
1932         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1933         bounds values.
1934         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1935         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1936         Update comments.
1937         * expprint.c (print_subexp_standard): Handle new bounds values.
1938         (dump_subexp_body_standard): Likewise.
1939
1940 2018-04-27  Tom Tromey  <tom@tromey.com>
1941
1942         * configure: Rebuild.
1943         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1944         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1945         "OVERRIDE".
1946         (class symbol_needs_eval_context): Likewise.
1947         * dwarf2read.c (mock_mapped_index::symbol_name_count)
1948         (mock_mapped_index::symbol_name_at): Use "override".  Remove
1949         "virtual".
1950         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1951         "override".
1952         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1953         * aarch64-tdep.c (instruction_reader::read): Use "override".
1954         (instruction_reader_test::read): Likewise.
1955         * arm-tdep.c (instruction_reader::read): Use "override".
1956         (instruction_reader_thumb::read): Likewise.
1957
1958 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
1959
1960         PR remote/9665
1961         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1962         instead of remote_send.
1963         (remote_send): Remove.
1964
1965 2018-04-26  Pedro Alves  <palves@redhat.com>
1966
1967         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1968         find_function_start_sal instead of find_pc_line.
1969
1970 2018-04-26  Pedro Alves  <palves@redhat.com>
1971
1972         * breakpoint.c (set_breakpoint_location_function): Handle
1973         mst_data_gnu_ifunc.
1974         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1975         * elfread.c (elf_symtab_read): Give data symbols with
1976         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1977         (elf_rel_plt_read): Update comment.
1978         * linespec.c (convert_linespec_to_sals): Handle
1979         mst_data_gnu_ifunc.
1980         (minsym_found): Handle mst_data_gnu_ifunc.
1981         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1982         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1983         * parse.c (find_minsym_type_and_address): Handle
1984         mst_data_gnu_ifunc.
1985         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1986         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1987         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1988         comment.
1989         <mst_data_gnu_ifunc>: New enumerator.
1990
1991 2018-04-26  Pedro Alves  <palves@redhat.com>
1992
1993         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1994         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
1995         'want_trampoline' parameter by a lookup_msym_prefer parameter.
1996         Handle it.
1997         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1998         (lookup_minimal_symbol_by_pc): Adjust.
1999         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2000         (lookup_solib_trampoline_symbol_by_pc): Adjust.
2001         * minsyms.h (lookup_msym_prefer): New enum.
2002         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2003         parameter by a lookup_msym_prefer parameter.
2004
2005 2018-04-26  Pedro Alves  <palves@redhat.com>
2006
2007         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2008         ends in "@plt" instead of looking at the symbol's section.
2009
2010 2018-04-26  Pedro Alves  <palves@redhat.com>
2011
2012         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
2013         all references.
2014         (find_pc_partial_function_gnu_ifunc): Rename to ...
2015         (find_pc_partial_function): ... this, and remove references to
2016         'is_gnu_ifunc_p'.
2017         (find_pc_partial_function): Delete old implementation.
2018         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2019
2020 2018-04-26  Pedro Alves  <palves@redhat.com>
2021
2022         * linespec.c (struct bound_minimal_symbol_search_key): New.
2023         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
2024         skip first line if we found a GNU ifunc minimal symbol by name.
2025         (compare_msymbols): Change parameters to work with a destructured
2026         lhs minsym.
2027         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2028         functions.
2029
2030 2018-04-26  Pedro Alves  <palves@redhat.com>
2031
2032         * breakpoint.c (set_breakpoint_location_function): Don't resolve
2033         ifunc targets here.  Instead, if we have an ifunc minsym, use its
2034         address/name.
2035         (add_location_to_breakpoint): Store the minsym and the objfile in
2036         the breakpoint location.
2037         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2038         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2039         Record the minsym in the sal.
2040         * symtab.h (symtab_and_line) <msymbol>: New field.
2041
2042 2018-04-26  Pedro Alves  <palves@redhat.com>
2043
2044         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2045         unless we actually resolved the ifunc.
2046
2047 2018-04-26  Pedro Alves  <palves@redhat.com>
2048
2049         * c-exp.y (variable production): Prefer ifunc minsyms over
2050         regular function symbols.
2051         * symtab.c (find_gnu_ifunc): New function.
2052         * minsyms.h (lookup_msym_prefer): New enum.
2053         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2054         parameter by a lookup_msym_prefer parameter.
2055         * symtab.h (find_gnu_ifunc): New declaration.
2056
2057 2018-04-26  Pedro Alves  <palves@redhat.com>
2058
2059         * blockframe.c (find_gnu_ifunc_target_type): New function.
2060         (find_function_type): New.
2061         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2062         return a value with a memory address.
2063         (eval_call): For calls to GNU ifunc functions, try to find the
2064         type of the target function from the type that the resolver
2065         returns.
2066         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2067         symbols.
2068         * infcall.c (find_function_return_type): Delete.
2069         (find_function_addr): Add 'function_type' parameter.  For calls to
2070         GNU ifunc functions, try to find the type of the target function
2071         from the type that the resolver returns, and return it via
2072         FUNCTION_TYPE.
2073         (call_function_by_hand_dummy): Adjust to use the function type
2074         returned by find_function_addr.
2075         (find_function_addr): Add 'function_type' parameter and move
2076         description here.
2077         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2078         declarations.
2079
2080 2018-04-26  Pedro Alves  <palves@redhat.com>
2081
2082         * c-exp.y (variable production): Skip finding an alias for ifunc
2083         symbols.
2084
2085 2018-04-26  Pedro Alves  <palves@redhat.com>
2086
2087         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2088
2089 2018-04-25  Pedro Alves  <palves@redhat.com>
2090
2091         * infcmd.c (kill_command): Print the pid as string, not the whole
2092         thread's ptid.  Add comment.  s/has been killed/killed/ in output
2093         message.
2094         * remote.c (remote_detach_1): Print the pid as string, not the
2095         whole thread's ptid.
2096
2097 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
2098             Sergio Durigan Junior  <sergiodj@redhat.com>
2099             Pedro Alves  <palves@redhat.com>
2100
2101         * infcmd.c (kill_command): Print message when inferior has
2102         been killed.
2103         * inferior.c (print_inferior_events): Remove 'static'.  Set as
2104         '1'.
2105         (add_inferior): Improve message printed when
2106         'print_inferior_events' is on.
2107         (exit_inferior): Remove message printed when
2108         'print_inferior_events' is on.
2109         (detach_inferior): Improve message printed when
2110         'print_inferior_events' is on.
2111         (initialize_inferiors): Use 'add_inferior_silent' to set
2112         'current_inferior_'.
2113         * inferior.h (print_inferior_events): Declare here as
2114         'extern'.
2115         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2116         '[Detaching...]' messages when 'print_inferior_events' is on.
2117         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
2118         as prefix/suffix for messages.  Remove periods.  Fix erroneous
2119         'Detaching after fork from child...', replace it by '... from
2120         parent...'.
2121         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2122         prefix/suffix when printing 'Detaching...' messages.  Print
2123         them when 'print_inferior_events' is on.
2124         * remote.c (remote_detach_1): Print message when detaching
2125         from inferior and '!is_fork_parent'.
2126
2127 2018-04-24  Tom Tromey  <tom@tromey.com>
2128
2129         * cli-out.h: Reindent.
2130
2131 2018-04-24  Tom Tromey  <tom@tromey.com>
2132
2133         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2134         (cli_ui_out::do_field_string): Use fputs_filtered.
2135         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2136
2137 2018-04-23  Tom Tromey  <tom@tromey.com>
2138
2139         * guile/scm-frame.c (gdbscm_frame_read_var): Use
2140         gdb::unique_xmalloc_ptr.
2141
2142 2018-04-23  Tom Tromey  <tom@tromey.com>
2143
2144         * configure: Rebuild.
2145
2146 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
2147
2148         PR gdb/23095
2149         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2150         prepare_for_testing.  Set normal_bp to r_debug_state if target
2151         is bsd.
2152
2153 2018-04-21  Pedro Alves  <palves@redhat.com>
2154             Rajendra SY  <rajendra.sy@gmail.com>
2155
2156         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2157         * remote.c (extended_remote_attach): In all-stop mode, mark the
2158         thread as executing.
2159
2160 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2161
2162         * thread.c (thread_apply_all_command): Fix comment.
2163         (thread_command): Fix comment.
2164
2165 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
2166
2167         * common/tdesc.h (tdesc_create_feature): Remove xml filename
2168         parameter.
2169         * features/aarch64-core.c (create_feature_aarch64_core):
2170         Regenerate.
2171         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2172         Likewise.
2173         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2174         Likewise.
2175         * features/i386/32bit-avx512.c
2176         (create_feature_i386_32bit_avx512): Likewise.
2177         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2178         Likewise.
2179         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2180         Likewise.
2181         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2182         Likewise.
2183         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2184         Likewise.
2185         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2186         Likewise.
2187         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2188         Likewise.
2189         * features/i386/64bit-avx512.c
2190         (create_feature_i386_64bit_avx512): Likewise.
2191         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2192         Likewise.
2193         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2194         Likewise.
2195         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2196         Likewise.
2197         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2198         Likewise.
2199         * features/i386/64bit-segments.c
2200         (create_feature_i386_64bit_segments): Likewise.
2201         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2202         Likewise.
2203         * features/i386/x32-core.c
2204         (create_feature_i386_x32_core): Likewise.
2205         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2206         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2207         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2208         * target-descriptions.c: In generated code, don't pass xml
2209         filename.
2210
2211 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2212
2213         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2214         (print_xml_feature::visit_post): Likewise.
2215         (print_xml_feature::visit): Likewise.
2216         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2217         (print_xml_feature): Add new class.
2218         * regformats/regdat.sh: Null xmltarget on feature targets.
2219         * target-descriptions.c (struct target_desc): Add xmltarget.
2220         (maintenance_check_tdesc_xml_convert): Add unittest function.
2221         (tdesc_get_features_xml): Add function to get xml.
2222         (maintenance_check_xml_descriptions): Test xml generation.
2223         * xml-tdesc.c (string_read_description_xml): Add function.
2224         * xml-tdesc.h (string_read_description_xml): Add declaration.
2225
2226 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2227
2228         * features/Makefile: Add feature marker to targets with new style
2229         target descriptions.
2230         * regformats/aarch64.dat: Regenerate.
2231         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2232         * regformats/i386/amd64-avx-linux.dat: Likewise.
2233         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2234         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2235         * regformats/i386/amd64-linux.dat: Likewise.
2236         * regformats/i386/amd64-mpx-linux.dat: Likewise.
2237         * regformats/i386/amd64.dat: Likewise.
2238         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2239         * regformats/i386/i386-avx-linux.dat: Likewise.
2240         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2241         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2242         * regformats/i386/i386-linux.dat: Likewise.
2243         * regformats/i386/i386-mmx-linux.dat: Likewise.
2244         * regformats/i386/i386-mpx-linux.dat: Likewise.
2245         * regformats/i386/i386.dat: Likewise.
2246         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2247         * regformats/i386/x32-avx-linux.dat: Likewise.
2248         * regformats/i386/x32-linux.dat: Likewise.
2249         * regformats/tic6x-c62x-linux.dat: Likewise.
2250         * regformats/tic6x-c64x-linux.dat: Likewise.
2251         * regformats/tic6x-c64xp-linux.dat: Likewise.
2252         * regformats/regdat.sh: Parse feature marker.
2253
2254 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2255
2256         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2257         (tdesc_osabi_name): Likewise.
2258         * target-descriptions.c (tdesc_architecture_name): Add new
2259         function.
2260         (tdesc_osabi_name): Likewise.
2261
2262 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2263
2264         * common/tdesc.c (tdesc_predefined_type): Move to here.
2265         (tdesc_named_type): Likewise.
2266         (tdesc_create_vector): Likewise.
2267         (tdesc_create_struct): Likewise.
2268         (tdesc_set_struct_size): Likewise.
2269         (tdesc_create_union): Likewise.
2270         (tdesc_create_flags): Likewise.
2271         (tdesc_create_enum): Likewise.
2272         (tdesc_add_field): Likewise.
2273         (tdesc_add_typed_bitfield): Likewise.
2274         (tdesc_add_bitfield): Likewise.
2275         (tdesc_add_flag): Likewise.
2276         (tdesc_add_enum_value): Likewise.
2277         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2278         (struct tdesc_type_vector): Likewise.
2279         (struct tdesc_type_field): Likewise.
2280         (struct tdesc_type_with_fields): Likewise.
2281         (tdesc_create_enum): Add declaration.
2282         (tdesc_add_typed_bitfield): Likewise.
2283         (tdesc_add_enum_value): Likewise.
2284         * target-descriptions.c (tdesc_type_field): Move from here.
2285         (tdesc_type_builtin): Likewise.
2286         (tdesc_type_vector): Likewise.
2287         (tdesc_type_with_fields): Likewise.
2288         (tdesc_predefined_types): Likewise.
2289         (tdesc_named_type): Likewise.
2290         (tdesc_create_vector): Likewise.
2291         (tdesc_create_struct): Likewise.
2292         (tdesc_set_struct_size): Likewise.
2293         (tdesc_create_union): Likewise.
2294         (tdesc_create_flags): Likewise.
2295         (tdesc_create_enum): Likewise.
2296         (tdesc_add_field): Likewise.
2297         (tdesc_add_typed_bitfield): Likewise.
2298         (tdesc_add_bitfield): Likewise.
2299         (tdesc_add_flag): Likewise.
2300         (tdesc_add_enum_value): Likewise.
2301         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2302         (tdesc_add_typed_bitfield): Likewise.
2303         (tdesc_add_enum_value): Likewise.
2304
2305 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2306
2307         * common/tdesc.c (tdesc_feature::accept): Move to here.
2308         (tdesc_feature::operator==): Likewise.
2309         (tdesc_create_reg): Likewise.
2310         * common/tdesc.h (tdesc_type_kind): Likewise.
2311         (struct tdesc_type): Likewise.
2312         (struct tdesc_feature): Likewise.
2313         * regformats/regdat.sh: Create a feature.
2314         * target-descriptions.c (tdesc_type_kind): Move from here.
2315         (tdesc_type): Likewise.
2316         (tdesc_type_up): Likewise.
2317         (tdesc_feature): Likewise.
2318         (tdesc_create_reg): Likewise.
2319
2320 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
2321
2322         * Makefile.in: Add arch/tdesc.c
2323         * common/tdesc.c: New file.
2324         * common/tdesc.h (tdesc_element_visitor): Move to here.
2325         (tdesc_element): Likewise.
2326         (tdesc_reg): Likewise.
2327         (tdesc_reg_up): Likewise.
2328         * regformats/regdef.h (reg): Add offset to constructors.
2329         * target-descriptions.c (tdesc_element_visitor): Move from here.
2330         (tdesc_element): Likewise.
2331         (tdesc_reg): Likewise.
2332         (tdesc_reg_up): Likewise.
2333
2334 2018-04-17  Tom Tromey  <tom@tromey.com>
2335
2336         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2337         discriminant field.
2338
2339 2018-04-17  Tom Tromey  <tom@tromey.com>
2340
2341         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2342
2343 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2344
2345         * symtab.c (print_symbol_info): Skip printing filename and line
2346         number when `last' is NULL.
2347         (symtab_symbol_info): Use empty string instead of NULL for first
2348         invocation of print_symbol_info.
2349         (rbreak_command): Pass NULL to `last' parameter of
2350         print_symbol_info.
2351
2352 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
2353
2354         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2355         instead of nullptr.
2356
2357 2018-04-16  Pedro Alves  <palves@redhat.com>
2358
2359         * MAINTAINERS (sh): Remove.
2360         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2361         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2362         (ALLDEPFILES): Remove sh64-tdep.c.
2363         * NEWS: Mentions that support for SH-5/SH64 is removed.
2364         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2365         (sh*-*-openbsd*): Ditto.
2366         (sh64-*-elf*): Remove.
2367         (sh*): Remove.
2368         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2369         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2370         * sh-tdep.c: No longer include "sh64-tdep.h".
2371         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2372         * sh64-tdep.c, sh64-tdep.h: Remove files.
2373
2374 2018-04-16  Pedro Alves  <palves@redhat.com>
2375
2376         * MAINTAINERS: Remove m88k.
2377         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2378         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2379         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2380         * NEWS: Mention that support for m88k was removed.
2381         * configure.host (m88*-*-*): Remove support.
2382         * configure.nat (m88k-*-*): Remove support.
2383         * configure.tgt (m88*-*-openbsd*): Remove.
2384         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2385
2386 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
2387
2388         * configure.tgt (x86_tobjs): New variable.
2389         (amd64_tobjs, i386_tobjs): Use it.
2390
2391 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2392
2393         * symtab.c (print_symbol_info): Precede the symbol definition by
2394         the line number when available.
2395         * NEWS: Advertise this enhancement.
2396
2397 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2398
2399         * NEWS (New options): announce set/show record btrace cpu.
2400         * btrace.c: Include record-btrace.h.
2401         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2402         the vendor is unknown.
2403         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
2404         Maybe overwrite the btrace configuration's cpu.
2405         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
2406         (btrace_fetch): Add cpu parameter.  Update callers.
2407         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2408         Maybe overwrite the btrace configuration's cpu.  Skip enabling
2409         errata workarounds if the vendor is unknown.
2410         * python/py-record-btrace.c: Include record-btrace.h.
2411         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2412         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2413         * record-btrace.c (record_btrace_cpu_state_kind): New.
2414         (record_btrace_cpu): New.
2415         (set_record_btrace_cpu_cmdlist): New.
2416         (record_btrace_get_cpu): New.
2417         (require_btrace_thread, record_btrace_info)
2418         (record_btrace_resume_thread): Call record_btrace_get_cpu.
2419         (cmd_set_record_btrace_cpu_none): New.
2420         (cmd_set_record_btrace_cpu_auto): New.
2421         (cmd_set_record_btrace_cpu): New.
2422         (cmd_show_record_btrace_cpu): New.
2423         (_initialize_record_btrace): Initialize set/show record btrace cpu
2424         commands.
2425         * record-btrace.h (record_btrace_get_cpu): New.
2426
2427 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2428
2429         * record.c (set_record_command): Fix typo in message.
2430
2431 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2432
2433         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2434
2435 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
2436
2437         * infrun.c (process_event_stop_test): Call
2438         gdbarch_in_indirect_branch_thunk.
2439         * gdbarch.sh (in_indirect_branch_thunk): New.
2440         * gdbarch.c: Regenerated.
2441         * gdbarch.h: Regenerated.
2442         * x86-tdep.h: New.
2443         * x86-tdep.c: New.
2444         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2445         (HFILES_NO_SRCDIR): Add x86-tdep.h.
2446         (ALLDEPFILES): Add x86-tdep.c.
2447         * arch-utils.h (default_in_indirect_branch_thunk): New.
2448         * arch-utils.c (default_in_indirect_branch_thunk): New.
2449         * i386-tdep: Include x86-tdep.h.
2450         (i386_in_indirect_branch_thunk): New.
2451         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2452         function.
2453         * amd64-tdep: Include x86-tdep.h.
2454         (amd64_in_indirect_branch_thunk): New.
2455         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2456
2457 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
2458
2459         PR gdb/23053
2460         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2461         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2462         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2463         regression.
2464
2465 2018-04-12  Tom Tromey  <tom@tromey.com>
2466
2467         * rust-lang.c (rust_print_struct_def): Remove univariant code.
2468         (rust_evaluate_subexp): Likewise.
2469
2470 2018-04-12  Pedro Alves  <palves@redhat.com>
2471
2472         * procfs.c (procfs_detach): Make forward declaration's prototype
2473         match definition's protototype.
2474         (proc_get_LDT_entry): Remove stale do_cleanups call.
2475
2476 2018-04-12  Pedro Alves  <palves@redhat.com>
2477
2478         * target.h (target_ops::to_has_exited): Delete.
2479         (target_has_exited): Delete.
2480         * target-delegates.c: Regenerate.
2481
2482 2018-04-11  Pedro Alves  <palves@redhat.com>
2483
2484         * target.c (fileio_fh_t::t): Add comment.
2485         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2486         (target_fileio_close): Handle a NULL target.
2487         (invalidate_fileio_fh): New.
2488         (target_close): Call it.
2489         * remote.c (remote_hostio_send_command): No longer check whether
2490         remote_desc is open.
2491
2492 2018-04-11  Pedro Alves  <palves@redhat.com>
2493
2494         * target.c (fileio_fh_t): Make it a named struct instead of a
2495         typedef.
2496         (fileio_fh_t::is_closed): New method.
2497         (DEF_VEC_O (fileio_fh_t)): Remove.
2498         (fileio_fhandles): Now a std::vector.
2499         (is_closed_fileio_fh): Delete.
2500         (acquire_fileio_fd): Adjust.  Rename parameters.
2501         (release_fileio_fd): Adjust.
2502         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2503         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2504         (target_fileio_close): Adjust.
2505
2506 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
2507
2508         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2509         index.
2510
2511 2018-04-10  Pedro Alves  <palves@redhat.com>
2512
2513         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2514         (scoped_finish_thread_state): New class.
2515         * infcmd.c (run_command_1): Use it instead of finish_thread_state
2516         cleanup.
2517         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2518         (fetch_inferior_event, normal_stop): Likewise.
2519         * thread.c (finish_thread_state_cleanup): Delete.
2520
2521 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2522             Pedro Alves  <palves@redhat.com>
2523
2524         * value.c: Include "selftest.h" and "common/array-view.h".
2525         (struct range) <operator ==>: New.
2526         (test_ranges_contain): New.
2527         (check_ranges_vector): New.
2528         (test_insert_into_bit_range_vector): New.
2529         (_initialize_values): Register selftests.
2530         * common/array-view.h (operator==, operator!=): New.
2531
2532 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2533
2534         * common/gdb_vecs.h (unordered_remove): Add overload that takes
2535         an iterator.
2536         * inline-frame.c: Include <algorithm>.
2537         (struct inline_state): Add constructor.
2538         (inline_state_s): Remove.
2539         (DEF_VEC_O(inline_state_s)): Remove.
2540         (inline_states): Change type to std::vector.
2541         (find_inline_frame_state): Adjust to std::vector.
2542         (allocate_inline_frame_state): Remove.
2543         (clear_inline_frame_state): Adjust to std::vector.
2544         (skip_inline_frames): Adjust to std::vector.
2545
2546 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2547
2548         * tracepoint.h (struct trace_state_variable): Add constructor.
2549         <name>: Change type to std::string.
2550         * tracepoint.c (tsv_s): Remove.
2551         (DEF_VEC_O(tsv_s)): Remove.
2552         (tvariables): Change to std::vector.
2553         (create_trace_state_variable): Adjust to std::vector.
2554         (find_trace_state_variable): Likewise.
2555         (find_trace_state_variable_by_number): Likewise.
2556         (delete_trace_state_variable): Likewise.
2557         (trace_variable_command): Adjust to std::string.
2558         (delete_trace_variable_command): Likewise.
2559         (tvariables_info_1): Adjust to std::vector.
2560         (save_trace_state_variables): Likewise.
2561         (start_tracing): Likewise.
2562         (merge_uploaded_trace_state_variables): Adjust to std::vector
2563         and std::string.
2564         * target.h (struct target_ops)
2565         <to_download_trace_state_variable>: Pass reference to
2566         trace_state_variable.
2567         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2568         * target-delegates.c: Re-generate.
2569         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2570         (mi_tsv_deleted): Likewise.
2571         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2572         * remote.c (remote_download_trace_state_variable): Change
2573         pointer to reference and adjust.
2574         * make-target-delegates (parse_argtypes): Handle references.
2575         (write_function_header): Likewise.
2576         (munge_type): Likewise.
2577
2578 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2579
2580         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2581         string_view-selftests.c.
2582         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2583         testsuite.
2584         * unittests/basic_string_view/cons/char/1.cc: Likewise.
2585         * unittests/basic_string_view/cons/char/2.cc: Likewise.
2586         * unittests/basic_string_view/cons/char/3.cc: Likewise.
2587         * unittests/basic_string_view/element_access/char/1.cc:
2588         Likewise.
2589         * unittests/basic_string_view/element_access/char/empty.cc:
2590         Likewise.
2591         * unittests/basic_string_view/element_access/char/front_back.cc:
2592         Likewise.
2593         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2594         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2595         Likewise.
2596         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2597         Likewise.
2598         * unittests/basic_string_view/modifiers/swap/char/1.cc:
2599         Likewise.
2600         * unittests/basic_string_view/operations/compare/char/1.cc:
2601         Likewise.
2602         * unittests/basic_string_view/operations/compare/char/13650.cc:
2603         Likewise.
2604         * unittests/basic_string_view/operations/copy/char/1.cc:
2605         Likewise.
2606         * unittests/basic_string_view/operations/data/char/1.cc:
2607         Likewise.
2608         * unittests/basic_string_view/operations/find/char/1.cc:
2609         Likewise.
2610         * unittests/basic_string_view/operations/find/char/2.cc:
2611         Likewise.
2612         * unittests/basic_string_view/operations/find/char/3.cc:
2613         Likewise.
2614         * unittests/basic_string_view/operations/find/char/4.cc:
2615         Likewise.
2616         * unittests/basic_string_view/operations/rfind/char/1.cc:
2617         Likewise.
2618         * unittests/basic_string_view/operations/rfind/char/2.cc:
2619         Likewise.
2620         * unittests/basic_string_view/operations/rfind/char/3.cc:
2621         Likewise.
2622         * unittests/basic_string_view/operations/substr/char/1.cc:
2623         Likewise.
2624         * unittests/basic_string_view/operators/char/2.cc: Likewise.
2625         * unittests/string_view-selftests.c: New file.
2626
2627 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2628
2629         * unittests/basic_string_view/capacity/1.cc: New file.
2630         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2631         * unittests/basic_string_view/cons/char/1.cc: New file.
2632         * unittests/basic_string_view/cons/char/2.cc: New file.
2633         * unittests/basic_string_view/cons/char/3.cc: New file.
2634         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2635         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2636         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2637         * unittests/basic_string_view/element_access/char/1.cc: New file.
2638         * unittests/basic_string_view/element_access/char/2.cc: New file.
2639         * unittests/basic_string_view/element_access/char/empty.cc: New file.
2640         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2641         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2642         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2643         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2644         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2645         * unittests/basic_string_view/include.cc: New file.
2646         * unittests/basic_string_view/inserters/char/1.cc: New file.
2647         * unittests/basic_string_view/inserters/char/2.cc: New file.
2648         * unittests/basic_string_view/inserters/char/3.cc: New file.
2649         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2650         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2651         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2652         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2653         * unittests/basic_string_view/literals/types.cc: New file.
2654         * unittests/basic_string_view/literals/values.cc: New file.
2655         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2656         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2657         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2658         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2659         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2660         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2661         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2662         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2663         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2664         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2665         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2666         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2667         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2668         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2669         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2670         * unittests/basic_string_view/operations/data/char/1.cc: New file.
2671         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2672         * unittests/basic_string_view/operations/find/char/1.cc: New file.
2673         * unittests/basic_string_view/operations/find/char/2.cc: New file.
2674         * unittests/basic_string_view/operations/find/char/3.cc: New file.
2675         * unittests/basic_string_view/operations/find/char/4.cc: New file.
2676         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2677         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2678         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2679         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2680         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2681         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2682         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2683         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2684         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2685         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2686         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2687         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2688         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2689         * unittests/basic_string_view/operators/char/2.cc: New file.
2690         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2691         * unittests/basic_string_view/range_access/char/1.cc: New file.
2692         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2693         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2694         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2695         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2696         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2697         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2698         * unittests/basic_string_view/requirements/typedefs.cc: New file.
2699         * unittests/basic_string_view/typedefs.cc: New file.
2700         * unittests/basic_string_view/types/1.cc: New file.
2701
2702 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2703
2704         * common/gdb_string_view.h: Remove libstdc++ implementation
2705         details, adjust to gdb reality.
2706         * common/gdb_string_view.tcc: Likewise.
2707         * cli/cli-script.c (struct string_view): Remove.
2708         (user_args) <m_args>: Change element type to gdb::string_view.
2709         (user_args::insert_args): Adjust.
2710
2711 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2712
2713         * common/gdb_string_view.h: New file.
2714         * common/gdb_string_view.tcc: New file.
2715
2716 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2717
2718         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2719         * configure: Re-generate.
2720
2721 2018-04-09  Pedro Alves  <palves@redhat.com>
2722
2723         * gdbarch.sh: Include "observable.h" instead of "observer.h".
2724         (set_target_gdbarch): Call
2725         gdb::observers::architecture_changed.notify instead of
2726         observer_notify_architecture_changed.
2727
2728 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2729
2730         * tracepoint.c (struct current_traceframe_cleanup): Remove.
2731         (do_restore_current_traceframe_cleanup): Remove.
2732         (restore_current_traceframe_cleanup_dtor): Remove.
2733         (make_cleanup_restore_current_traceframe): Remove.
2734         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2735         New.
2736         * tracepoint.h (struct scoped_restore_current_traceframe): New.
2737         * infrun.c (fetch_inferior_event): Use
2738         scoped_restore_current_traceframe.
2739
2740 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2741
2742         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2743         Remove.
2744         <n_allocated_type_units>: Remove.
2745         <all_type_units>: Change to std::vector.
2746         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2747         to std::vector change.
2748         (dwarf2_per_objfile::get_cutu): Likewise.
2749         (dwarf2_per_objfile::get_tu): Likewise.
2750         (create_signatured_type_table_from_index): Likewise.
2751         (create_signatured_type_table_from_debug_names): Likewise.
2752         (dw2_symtab_iter_next): Likewise.
2753         (dw2_print_stats): Likewise.
2754         (dw2_expand_all_symtabs): Likewise.
2755         (dw2_expand_marked_cus): Likewise.
2756         (dw2_debug_names_iterator::next): Likewise.
2757         (dwarf2_initialize_objfile): Likewise.
2758         (add_signatured_type_cu_to_table): Likewise.
2759         (create_all_type_units): Likewise.
2760         (add_type_unit): Likewise.
2761         (struct tu_abbrev_offset): Add constructor.
2762         (build_type_psymtabs_1): Adjust to std::vector change.
2763         (print_tu_stats): Likewise.
2764         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2765         (write_debug_names): Likewise.
2766
2767 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2768
2769         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2770         Make an std::vector.
2771         <n_comp_units>: Remove.
2772         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2773         to std::vector change.
2774         (dwarf2_per_objfile::get_cutu): Likewise.
2775         (dwarf2_per_objfile::get_cu): Likewise.
2776         (create_cus_from_index): Likewise.
2777         (create_addrmap_from_index): Likewise.
2778         (create_addrmap_from_aranges): Likewise.
2779         (dwarf2_read_index): Likewise.
2780         (dw2_find_last_source_symtab): Likewise.
2781         (dw2_map_symtabs_matching_filename): Likewise.
2782         (dw2_symtab_iter_next): Likewise.
2783         (dw2_print_stats): Likewise.
2784         (dw2_expand_all_symtabs): Likewise.
2785         (dw2_expand_symtabs_with_fullname): Likewise.
2786         (dw2_expand_marked_cus): Likewise.
2787         (dw2_map_symbol_filenames): Likewise.
2788         (create_cus_from_debug_names): Likewise.
2789         (dwarf2_read_debug_names): Likewise.
2790         (dw2_debug_names_iterator::next): Likewise.
2791         (dwarf2_initialize_objfile): Likewise.
2792         (set_partial_user): Likewise.
2793         (dwarf2_build_psymtabs_hard): Likewise.
2794         (read_comp_units_from_section): Remove arguments, adjust to
2795         std::vector change.
2796         (create_all_comp_units): Adjust to std::vector and
2797         read_comp_units_from_section changes.
2798         (dwarf2_find_containing_comp_unit): Adjust to std::vector
2799         change.
2800         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2801         (psyms_seen_size): Likewise.
2802         (write_gdbindex): Likewise.
2803         (write_debug_names): Likewise.
2804
2805 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2806
2807         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2808         with dwarf2_per_objfile.
2809         (create_cus_from_index): Likewise.
2810         (create_signatured_type_table_from_index): Likewise.
2811         (dwarf2_read_index): Likewise.
2812         (dwarf2_initialize_objfile): Likewise.
2813         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
2814         per_cu rather than get_dwarf2_per_objfile.
2815
2816 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2817
2818         * dwarf2read.h (struct signatured_type): Forward declare.
2819         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2820         New methods.
2821         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2822         (dw2_get_cutu): ...this.
2823         (dwarf2_per_objfile::get_cu): Rename from...
2824         (dw2_get_cu): ...this.
2825         (dwarf2_per_objfile::get_tu): New.
2826         (create_addrmap_from_index): Adjust.
2827         (create_addrmap_from_aranges): Adjust.
2828         (dw2_find_last_source_symtab): Adjust.
2829         (dw2_map_symtabs_matching_filename): Adjust.
2830         (dw2_symtab_iter_next): Adjust.
2831         (dw2_print_stats): Adjust.
2832         (dw2_expand_all_symtabs): Adjust.
2833         (dw2_expand_symtabs_with_fullname): Adjust.
2834         (dw2_expand_marked_cus): Adjust.
2835         (dw_expand_symtabs_matching_file_matcher): Adjust.
2836         (dw2_map_symbol_filenames): Adjust.
2837         (dw2_debug_names_iterator::next): Adjust.
2838         (dwarf2_initialize_objfile): Adjust.
2839         (set_partial_user): Adjust.
2840         (dwarf2_build_psymtabs_hard): Adjust.
2841
2842 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2843
2844         * dwarf2read.c (create_signatured_type_table_from_debug_names):
2845         Remove unused variables.
2846         (dw2_map_symtabs_matching_filename): Likewise.
2847         (dwarf2_record_block_ranges): Likewise.
2848         (dwarf2_read_addr_index): Likewise.
2849         (follow_die_offset): Likewise.
2850
2851 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2852
2853         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2854         to symbol_file_add_main.
2855
2856 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2857
2858         PR mi/22299
2859         * mi/mi-console.c (do_fputc_async_safe): New.
2860         (mi_console_file::write_async_safe): New.
2861         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2862         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2863         New.
2864         * ui-file.c (ui_file::putstrn): Adjust call to
2865         fputstrn_unfiltered.
2866         * utils.c (printchar): Replace do_fputs and do_fprintf
2867         parameters by do_fputc.
2868         (fputstr_filtered): Adjust call to printchar.
2869         (fputstr_unfiltered): Likewise.
2870         (fputstrn_filtered): Likewise.
2871         (fputstrn_unfiltered): Add do_fputc parameter, pass to
2872         printchar.
2873         * utils.h (do_fputc_ftype): New typedef.
2874         (fputstrn_unfiltered): Add do_fputc parameter.
2875
2876 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2877
2878         * regformats/i386/i386-avx.dat: Remove.
2879
2880 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2881
2882         PR gdb/22979
2883         * amd64-tdep.c (amd64_none_init_abi): New function.
2884         (amd64_x32_none_init_abi): New function.
2885         (_initialize_amd64_tdep): Register handlers for x86-64 and
2886         x64_32 with GDB_OSABI_NONE.
2887         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2888         GDB_OSABI_NONE osabi.
2889
2890 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2891
2892         PR gdb/22980
2893         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2894         GDB_OSABI_NONE.
2895         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2896         * osabi.c (gdb_osabi_names): Add "unknown" entry.
2897
2898 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2899
2900         * common/byte-vector.h (char_vector): New type.
2901         * target.h (target_read_alloc): Return
2902         gdb::optional<byte_vector>.
2903         (target_read_stralloc): Return gdb::optional<char_vector>.
2904         (target_get_osdata): Return gdb::optional<char_vector>.
2905         * target.c (target_read_alloc_1): Templatize.  Replacement
2906         manual memory management with vector.
2907         (target_read_alloc): Change return type, adjust.
2908         (target_read_stralloc): Change return type, adjust.
2909         (target_get_osdata): Change return type, adjust.
2910         * auxv.c (struct auxv_info) <length>: Remove.
2911         <data>: Change type to gdb::optional<byte_vector>.
2912         (auxv_inferior_data_cleanup): Free auxv_info with delete.
2913         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2914         (target_auxv_search): Adjust.
2915         (fprint_target_auxv): Adjust.
2916         * avr-tdep.c (avr_io_reg_read_command): Adjust.
2917         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2918         (linux_make_corefile_notes): Adjust.
2919         * osdata.c (get_osdata): Adjust.
2920         * remote.c (remote_get_threads_with_qxfer): Adjust.
2921         (remote_memory_map): Adjust.
2922         (remote_traceframe_info): Adjust.
2923         (btrace_read_config): Adjust.
2924         (remote_read_btrace): Adjust.
2925         (remote_pid_to_exec_file): Adjust.
2926         * solib-aix.c (solib_aix_get_library_list): Adjust.
2927         * solib-dsbt.c (decode_loadmap): Don't free buf.
2928         (dsbt_get_initial_loadmaps): Adjust.
2929         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2930         * solib-target.c (solib_target_current_sos): Adjust.
2931         * tracepoint.c (sdata_make_value): Adjust.
2932         * xml-support.c (xinclude_start_include): Adjust.
2933         (xml_fetch_content_from_file): Adjust.
2934         * xml-support.h (xml_fetch_another): Change return type.
2935         (xml_fetch_content_from_file): Change return type.
2936         * xml-syscall.c (xml_init_syscalls_info): Adjust.
2937         * xml-tdesc.c (file_read_description_xml): Adjust.
2938         (fetch_available_features_from_target): Change return type.
2939         (target_fetch_description_xml): Adjust.
2940         (target_read_description_xml): Adjust.
2941
2942 2018-04-06  Tom Tromey  <tom@tromey.com>
2943
2944         * value.c (~value): Update.
2945         (struct value) <contents>: Now unique_xmalloc_ptr.
2946         (value_contents_bits_eq, allocate_value_contents)
2947         (value_contents_raw, value_contents_all_raw)
2948         (value_contents_for_printing, value_contents_for_printing_const)
2949         (set_value_enclosing_type): Update.
2950
2951 2018-04-06  Tom Tromey  <tom@tromey.com>
2952
2953         * value.c (range_s): Remove typedef, VEC.
2954         (struct range): Add operator<.
2955         (range_lessthan): Remove.
2956         (ranges_contain): Change type.
2957         (~value): Update.
2958         (struct value) <unavailable, optimized_out>: Now std::vector.
2959         (value_entirely_available)
2960         (value_entirely_covered_by_range_vector)
2961         (value_entirely_unavailable, value_entirely_optimized_out):
2962         Update.
2963         (insert_into_bit_range_vector): Change argument type.
2964         (find_first_range_overlap): Likewise.
2965         (struct ranges_and_idx, value_contents_bits_eq)
2966         (require_not_optimized_out, require_available): Update.
2967         (ranges_copy_adjusted): Change argument types.
2968         (value_optimized_out, value_copy, value_fetch_lazy): Update.
2969
2970 2018-04-06  Tom Tromey  <tom@tromey.com>
2971
2972         * value.c (~value): Update.
2973         (struct value) <parent>: Now a value_ref_ptr.
2974         (value_parent, set_value_parent, value_address, value_copy):
2975         Update.
2976
2977 2018-04-06  Tom Tromey  <tom@tromey.com>
2978
2979         * value.c (struct value): Add constructor, destructor, and member
2980         initializers.
2981         (allocate_value_lazy, value_decref): Update.
2982
2983 2018-04-06  Tom Tromey  <tom@tromey.com>
2984
2985         * value.c (struct value) <released, next>: Remove.
2986         (all_values): Now a std::vector.
2987         (allocate_value_lazy): Update.
2988         (value_next): Remove.
2989         (value_mark, value_free_to_mark, release_value)
2990         (value_release_to_mark): Update.
2991
2992 2018-04-06  Tom Tromey  <tom@tromey.com>
2993
2994         * value.h (fetch_subexp_value, value_release_to_mark): Update.
2995         (free_value_chain): Remove.
2996         * value.c (free_value_chain): Remove.
2997         (value_release_to_mark): Return a std::vector.
2998         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2999         std::vector.
3000         (check_condition): Update.
3001         * eval.c (fetch_subexp_value): Change "val_chain" to a
3002         std::vector.
3003         * breakpoint.c (update_watchpoint): Update.
3004         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3005
3006 2018-04-06  Tom Tromey  <tom@tromey.com>
3007
3008         * value.h (free_all_values): Remove.
3009         * value.c (free_all_values): Remove.
3010
3011 2018-04-06  Tom Tromey  <tom@tromey.com>
3012
3013         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3014         (value_history_chain, value_history_count): Remove.
3015         (value_history): New global.
3016         (record_latest_value, access_value_history, show_values)
3017         (preserve_values): Update.
3018
3019 2018-04-06  Tom Tromey  <tom@tromey.com>
3020
3021         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3022         * varobj.c (varobj_set_display_format, varobj_set_value)
3023         (install_default_visualizer, construct_visualizer)
3024         (install_new_value, ~varobj, varobj_get_value_type)
3025         (my_value_of_variable, varobj_editable_p): Update.
3026         * c-varobj.c (c_describe_child, c_value_of_variable)
3027         (cplus_number_of_children, cplus_describe_child): Update.
3028         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3029         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3030         (ada_value_of_variable, ada_value_is_changeable_p): Update.
3031
3032 2018-04-06  Tom Tromey  <tom@tromey.com>
3033
3034         * printcmd.c (last_examine_address): Change type to
3035         value_ref_ptr.
3036         (do_examine, x_command): Update.
3037
3038 2018-04-06  Tom Tromey  <tom@tromey.com>
3039
3040         * value.c (release_value): Update.
3041         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3042         (struct bpstats) <val>: Now a value_ref_ptr.
3043         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3044         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3045         (~watchpoint, print_it_watchpoint, watch_command_1)
3046         (invalidate_bp_value_on_memory_change): Update.
3047
3048 2018-04-06  Tom Tromey  <tom@tromey.com>
3049
3050         * varobj.c (varobj_clear_saved_item)
3051         (update_dynamic_varobj_children, install_new_value, ~varobj):
3052         Update.
3053         * value.h (value_incref): Move declaration earlier.
3054         (value_decref): Rename from value_free.
3055         (struct value_ref_policy): New.
3056         (value_ref_ptr): New typedef.
3057         (struct value_deleter): Remove.
3058         (gdb_value_up): Remove typedef.
3059         (release_value): Change return type.
3060         (release_value_or_incref): Remove.
3061         * value.c (set_value_parent): Update.
3062         (value_incref): Change return type.
3063         (value_decref): Rename from value_free.
3064         (value_free_to_mark, free_all_values, free_value_chain): Update.
3065         (release_value): Return value_ref_ptr.
3066         (release_value_or_incref): Remove.
3067         (record_latest_value, set_internalvar, clear_internalvar):
3068         Update.
3069         * stack.c (info_frame_command): Don't call value_free.
3070         * python/py-value.c (valpy_dealloc, valpy_new)
3071         (value_to_value_object): Update.
3072         * printcmd.c (do_examine): Update.
3073         * opencl-lang.c (lval_func_free_closure): Update.
3074         * mi/mi-main.c (register_changed_p): Don't call value_free.
3075         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3076         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3077         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3078         value_free.
3079         * guile/scm-value.c (vlscm_free_value_smob)
3080         (vlscm_scm_from_value): Update.
3081         * frame.c (frame_register_unwind, frame_unwind_register_signed)
3082         (frame_unwind_register_unsigned, get_frame_register_bytes)
3083         (put_frame_register_bytes): Don't call value_free.
3084         * findvar.c (address_from_register): Don't call value_free.
3085         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3086         * dwarf2loc.c (entry_data_value_free_closure)
3087         (value_of_dwarf_reg_entry, free_pieced_value_closure)
3088         (dwarf2_evaluate_loc_desc_full): Update.
3089         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3090         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3091         (~watchpoint, watch_command_1)
3092         (invalidate_bp_value_on_memory_change): Update.
3093         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3094
3095 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
3096
3097         PR gdb/23022
3098         * warning.m4: Add -Wno-error=deprecated-register.
3099         * configure: Re-generate.
3100
3101 2018-04-05  Tom Tromey  <tom@tromey.com>
3102
3103         * linespec.h: Remove include of "vec.h".
3104
3105 2018-04-05  Tom Tromey  <tom@tromey.com>
3106
3107         * linespec.c (typep): Remove typedef.
3108         (find_methods, find_superclass_methods): Take a std::vector.
3109         (find_method): Use std::vector.
3110
3111 2018-04-05  Tom Tromey  <tom@tromey.com>
3112
3113         * utils.c (compare_strings): Remove.
3114         * utils.h (compare_strings): Remove.
3115         * objc-lang.h (find_imps): Update.
3116         * objc-lang.c (find_methods): Take a std::vector.
3117         (uniquify_strings, find_imps): Likewise.
3118         * linespec.c (find_methods): Take a std::vector.
3119         (decode_objc): Use std::vector.
3120         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3121         a std::vector.
3122         (find_method, find_function_symbols): Use std::vector.
3123
3124 2018-04-05  Tom Tromey  <tom@tromey.com>
3125
3126         * completer.c (completion_tracker::completion_tracker): Remove
3127         cast.
3128         (completion_tracker::discard_completions): Likewise.
3129         * breakpoint.c (ambiguous_names_p): Remove cast.
3130         * ada-lang.c (_initialize_ada_language): Remove cast.
3131         * utils.h (streq): Update.
3132         (streq_hash): Add new declaration.
3133         * utils.c (streq): Return bool.
3134         (streq_hash): New function.
3135
3136 2018-04-05  Tom Tromey  <tom@tromey.com>
3137
3138         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3139         Remove a string copy.
3140
3141 2018-04-05  Tom Tromey  <tom@tromey.com>
3142
3143         * linespec.c (filter_results): Use std::vector.
3144         (decode_line_2, decode_line_full): Update.
3145
3146 2018-04-05  Tom Tromey  <tom@tromey.com>
3147
3148         * linespec.c (canonical_to_fullform): Return std::string.
3149         (filter_results): Update.
3150         (struct decode_line_2_item): Add constructor.
3151         <fullform, displayform>: Now std::string.
3152         (decode_line_2_compare_items): Now a std::sort comparator.
3153         (decode_line_2): Update.
3154
3155 2018-04-05  Tom Tromey  <tom@tromey.com>
3156
3157         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3158         (unexpected_linespec_error): Update.
3159         (linespec_parse_basic, parse_linespec): Update.
3160
3161 2018-04-05  Tom Tromey  <tom@tromey.com>
3162
3163         * linespec.c (linespec_parse_basic): Reindent.
3164
3165 2018-04-05  Tom Tromey  <tom@tromey.com>
3166
3167         * minsyms.h (iterate_over_minimal_symbols): Update.
3168         * minsyms.c (iterate_over_minimal_symbols): Take a
3169         gdb::function_view.
3170         * linespec.c (struct collect_minsyms): Remove.
3171         (compare_msyms): Now a std::sort comparator.
3172         (add_minsym): Add parameters.
3173         (search_minsyms_for_name): Update.  Use std::vector.
3174
3175 2018-04-03  Tom Tromey  <tom@tromey.com>
3176
3177         * mipsread.c (read_alphacoff_dynamic_symtab): Use
3178         gdb::byte_vector.
3179
3180 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
3181
3182         * MAINTAINERS (Write After Approval): Add Weimin Pan.
3183
3184 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
3185
3186         PR gdb/16959
3187         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
3188         printing static type.
3189
3190 2018-04-01  Tom Tromey  <tom@tromey.com>
3191
3192         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3193         (rs6000_xfer_shared_libraries): Update.
3194
3195 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
3196
3197         * common/gdb_vecs.h (char_ptr): Remove.
3198         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3199
3200 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
3201
3202         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3203         with std::vector.
3204         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3205
3206 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
3207
3208         * tracepoint.h (struct uploaded_tp): Initialize fields.
3209         <actions, step_actions, cmd_strings>: Change type to
3210         std::vector<char *>.
3211         * tracepoint.c (get_uploaded_tp): Allocate with new.
3212         (free_uploaded_tps): Free with delete.
3213         (parse_tracepoint_definition): Adjust to std::vector change.
3214         * breakpoint.c (read_uploaded_action): Likewise.
3215         (create_tracepoint_from_upload): Likewise.
3216         * ctf.c (ctf_write_uploaded_tp): Likewise.
3217         (SET_ARRAY_FIELD): Likewise.
3218         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3219
3220 2018-03-30  Tom Tromey  <tom@tromey.com>
3221
3222         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
3223         std::unique_ptr.
3224         (svr4_keep_data_in_core): Update.
3225         (svr4_read_so_list): Update.
3226
3227 2018-03-30  Tom Tromey  <tom@tromey.com>
3228
3229         * windows-nat.c (handle_output_debug_string, handle_exception):
3230         Update.
3231         * target.h (target_read_string): Update.
3232         * target.c (target_read_string): Change "string" to
3233         unique_xmalloc_ptr.
3234         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3235         Update.
3236         * solib-frv.c (frv_current_sos): Update.
3237         * solib-dsbt.c (dsbt_current_sos): Update.
3238         * solib-darwin.c (darwin_current_sos): Update.
3239         * linux-thread-db.c (inferior_has_bug): Update.
3240         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3241         Update.  Remove alloca.
3242         * ada-lang.c (ada_main_name): Update.
3243
3244 2018-03-30  Tom Tromey  <tom@tromey.com>
3245
3246         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3247         (struct dwo_file_deleter): New.
3248         (dwo_file_up): New typedef.
3249         (open_and_init_dwo_file): Use dwo_file_up.
3250         (free_dwo_file_cleanup): Remove.
3251
3252 2018-03-30  Tom Tromey  <tom@tromey.com>
3253
3254         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3255         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3256
3257 2018-03-30  Tom Tromey  <tom@tromey.com>
3258
3259         * dwarf2read.c (class free_cached_comp_units): New class.
3260         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3261         (free_cached_comp_units): Remove function.
3262
3263 2018-03-30  Tom Tromey  <tom@tromey.com>
3264
3265         * utils.h (make_cleanup_unpush_target): Remove.
3266         * inf-ptrace.c (struct target_unpusher): New.
3267         (target_unpush_up) New typedef.
3268         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3269         target_unpush_up.
3270         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3271
3272 2018-03-27  Tom Tromey  <tom@tromey.com>
3273
3274         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3275
3276 2018-03-27  Pedro Alves  <palves@redhat.com>
3277             Tom Tromey  <tom@tromey.com>
3278
3279         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3280         destructor.  Now a class.
3281         (gdb_readline_wrapper_cleanup): Remove function.
3282         (gdb_readline_wrapper): Remove cleanups.
3283
3284 2018-03-27  Tom Tromey  <tom@tromey.com>
3285
3286         * typeprint.h (struct type_print_options) <local_typedefs,
3287         global_typedefs>: Remove "struct" keyword.
3288         (class typedef_hash_table): New class.
3289         (recursively_update_typedef_hash, add_template_parameters)
3290         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3291         (find_typedef_in_hash): Don't declare.
3292         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3293         (typedef_hash_table::recursively_update): Rename from
3294         recursively_update_typedef_hash.  Now a member.
3295         (typedef_hash_table::add_template_parameters): Rename from
3296         add_template_parameters.  Now a member.
3297         (typedef_hash_table::typedef_hash_table): Now a constructor;
3298         rename from create_typedef_hash.
3299         (typedef_hash_table::~typedef_hash_table): Now a destructor;
3300         rename from free_typedef_hash.
3301         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3302         (do_free_global_table): Remove.
3303         (typedef_hash_table::typedef_hash_table): New constructor; renamed
3304         from copy_type_recursive.
3305         (create_global_typedef_table): Remove.
3306         (typedef_hash_table::find_global_typedef): Now a member of
3307         typedef_hash_table.
3308         (typedef_hash_table::find_typedef): Rename from
3309         find_typedef_in_hash; now a member.
3310         (whatis_exp): Update.
3311         * extension.h (struct ext_lang_type_printers): Add constructor and
3312         destructor.
3313         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3314         declare.
3315         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3316         Now a constructor; rename from start_ext_lang_type_printers.
3317         (ext_lang_type_printers): Now a destructor; rename from
3318         free_ext_lang_type_printers.
3319         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3320         Update.
3321         (c_type_print_base_struct_union): Update.  Remove cleanups.
3322
3323 2018-03-27  Tom Tromey  <tom@tromey.com>
3324
3325         * dwarf-index-write.c: Include <cmath>.
3326
3327 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
3328
3329         * NEWS: Add entry describing new "set|show varsize-limit" command.
3330         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3331         command.
3332         * printcmd.c (_initialize_printcmd): Add "set var" alias of
3333         "set variable".
3334
3335 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
3336
3337         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3338         dwarf-index-write.c
3339         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3340         * dwarf-index-common.c: New file.
3341         * dwarf-index-common.h: New file.
3342         * dwarf-index-write.c: New file.
3343         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3344         (struct dwarf2_section_info): Move from here.
3345         (dwarf2_section_info_def): Likewise.
3346         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3347         (offset_type): Likewise.
3348         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3349         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3350         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3351         (byte_swap): Likewise.
3352         (MAYBE_SWAP): Likewise.
3353         (dwarf2_per_cu_ptr): Likewise.
3354         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3355         (struct tu_stats): Likewise.
3356         (struct dwarf2_per_objfile): Likewise.
3357         (struct dwarf2_per_cu_data): Likewise.
3358         (struct signatured_type): Likewise.
3359         (sig_type_ptr): Likewise.
3360         (DEF_VEC_P (sig_type_ptr)): Likewise.
3361         (INDEX4_SUFFIX): Likewise.
3362         (INDEX5_SUFFIX): Likewise.
3363         (DEBUG_STR_SUFFIX): Likewise.
3364         (dwarf2_read_section): Make non-static.
3365         (mapped_index_string_hash): Move from here.
3366         (dwarf5_djb_hash): Likewise.
3367         (file_write): Likewise.
3368         (class data_buf): Likewise.
3369         (struct symtab_index_entry): Likewise.
3370         (struct mapped_symtab): Likewise.
3371         (find_slot): Likewise.
3372         (hash_expand): Likewise.
3373         (add_index_entry): Likewise.
3374         (uniquify_cu_indices): Likewise.
3375         (class c_str_view): Likewise.
3376         (class c_str_view_hasher): Likewise.
3377         (class vector_hasher): Likewise.
3378         (write_hash_table): Likewise.
3379         (psym_index_map): Likewise.
3380         (struct addrmap_index_data): Likewise.
3381         (add_address_entry): Likewise.
3382         (add_address_entry_worker): Likewise.
3383         (write_address_map): Likewise.
3384         (symbol_kind): Likewise.
3385         (write_psymbols): Likewise.
3386         (struct signatured_type_index_data): Likewise.
3387         (write_one_signatured_type): Likewise.
3388         (recursively_count_psymbols): Likewise.
3389         (recursively_write_psymbols): Likewise.
3390         (class debug_names): Likewise.
3391         (check_dwarf64_offsets): Likewise.
3392         (psyms_seen_size): Likewise.
3393         (write_gdbindex): Likewise.
3394         (write_debug_names): Likewise.
3395         (assert_file_size): Likewise.
3396         (write_psymtabs_to_index): Likewise.
3397         (save_gdb_index_command): Likewise.
3398         (_initialize_dwarf2_read): Don't register the "save gdb-index"
3399         command.
3400         * dwarf2read.h: New file.
3401
3402 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
3403
3404         PR gdb/22670
3405         * dwarf2read.c (dwarf2_physname): Do not return the demangled
3406         symbol name if the CU's language stores symbol names in linkage
3407         format.
3408         * language.h (struct language_defn)
3409         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
3410         all instances of this struct.
3411
3412 2018-03-26  Tom Tromey  <tom@tromey.com>
3413
3414         * stack.c (backtrace_command_1): Remove verbose code.
3415
3416 2018-03-26  Tom Tromey  <tom@tromey.com>
3417
3418         * python/py-framefilter.c (py_print_type): Don't catch
3419         exceptions.  Return void.
3420         (py_print_value): Likewise.
3421         (py_print_single_arg): Likewise.
3422         (enumerate_args): Don't catch exceptions.
3423         (py_print_args): Likewise.
3424         (py_print_frame): Likewise.
3425         (gdbpy_apply_frame_filter): Catch exceptions here.
3426
3427 2018-03-26  Tom Tromey  <tom@tromey.com>
3428
3429         * stack.c (_initialize_stack): Remove trailing newlines from help
3430         text.  Add "Usage" line to "backtrace" help.
3431
3432 2018-03-26  Tom Tromey  <tom@tromey.com>
3433
3434         PR python/16486:
3435         * python/py-framefilter.c (py_print_args): Call wrap_hint.
3436
3437 2018-03-26  Tom Tromey  <tom@tromey.com>
3438
3439         * python/py-framefilter.c (py_print_single_arg): Return
3440         EXT_LANG_BT_ERROR from catch.
3441
3442 2018-03-26  Tom Tromey  <tom@tromey.com>
3443
3444         PR backtrace/15584:
3445         * stack.c (backtrace_command_1): Move some code into no-filters
3446         "if".
3447
3448 2018-03-26  Tom Tromey  <tom@tromey.com>
3449
3450         * python/py-framefilter.c (throw_quit_or_print_exception): New
3451         function.
3452         (gdbpy_apply_frame_filter): Use it.
3453
3454 2018-03-26  Tom Tromey  <tom@tromey.com>
3455
3456         PR cli/17716:
3457         * python/py-framefilter.c (py_print_type, py_print_value)
3458         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3459         RETURN_MASK_ERROR.
3460
3461 2018-03-26  Tom Tromey  <tom@tromey.com>
3462
3463         * python/py-framefilter.c (enumerate_args): Use
3464         gdb::unique_xmalloc_ptr.
3465
3466 2018-03-26  Tom Tromey  <tom@tromey.com>
3467
3468         * python/py-framefilter.c (py_print_frame): Return
3469         EXT_LANG_BT_OK.
3470         (gdbpy_apply_frame_filter): Update comment.
3471         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3472         Remove.
3473         <EXT_LANG_BT_NO_FILTERS>: Change value.
3474
3475 2018-03-26  Tom Tromey  <tom@tromey.com>
3476
3477         PR backtrace/15582:
3478         * stack.c (backtrace_command): Parse "hide" argument.
3479         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3480         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3481         constant.
3482
3483 2018-03-26  Tom Tromey  <tom@tromey.com>
3484
3485         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3486         add "flags".
3487         (backtrace_command): Remove "fulltrace", add "flags".
3488
3489 2018-03-26  Tom Tromey  <tom@tromey.com>
3490
3491         * stack.c (backtrace_command): Rewrite command line parsing.
3492
3493 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3496
3497 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
3498
3499         * filename-seen-cache.h: Add include guard.
3500
3501 2018-03-26  Keith Seitz  <keiths@redhat.com>
3502
3503         * symfile.c (place_section): Remove "struct" from section_addr_info
3504         in comment.
3505         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3506         "struct" keyword from section_addr_info.
3507
3508 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
3509
3510         * regformats/regdef.h (reg): Add constructors.
3511
3512 2018-03-25  Pedro Alves  <palves@redhat.com>
3513
3514         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3515         if then/else bodies in var_func_name extraction.
3516
3517 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
3518
3519         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3520         lookup_minimal_symbol() to find symbol entry.
3521         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3522
3523 2018-03-23  Keith Seitz  <keiths@redhat.com>
3524
3525         PR c++/22968
3526         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3527         nested type definitions for C++, too.
3528
3529 2018-03-23  Tom Tromey  <tom@tromey.com>
3530
3531         * machoread.c (struct oso_el): Add a constructor.  Don't define as
3532         a typedef.
3533         (macho_register_oso): Remove.
3534         (macho_symtab_read): Take a std::vector.
3535         (oso_el_compare_name): Now a std::sort comparator.
3536         (macho_symfile_read_all_oso): Take a std::vector.
3537         (macho_symfile_read): Use std::vector.  Remove cleanups.
3538
3539 2018-03-22  Tom Tromey  <tom@tromey.com>
3540
3541         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3542         (record_full_goto_bookmark): Use std::string.
3543
3544 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3545
3546         PR tdep/18295
3547         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3548         a single mask.
3549
3550 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3551
3552         * rs6000-tdep.c (store_insn_p): New function.
3553         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3554         and cr_reg to their unshifted values. Use store_insn_p to
3555         match LR saves using either R1 or fdata->alloca_reg. Use
3556         store_insn_p to match CR saves. Set alloca_reg_offset
3557         when alloca_reg and framep are set. Remove lr_reg shift
3558         when assigning to fdata->lr_register.
3559
3560 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3561
3562         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3563         command line args instead of emitting a warning.
3564
3565 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
3566
3567         * tracepoint.h (struct static_tracepoint_marker): Initialize
3568         fields, define default constructor, move constructor and move
3569         assignment, disable the rest.
3570         <str_id, extra>: Make std::string.
3571         (release_static_tracepoint_marker): Remove.
3572         (free_current_marker): Remove.
3573         * tracepoint.c (free_current_marker): Remove.
3574         (parse_static_tracepoint_marker_definition): Adjust to
3575         std::string, use new hex2str overload.
3576         (release_static_tracepoint_marker): Remove.
3577         (print_one_static_tracepoint_marker): Get marker by reference
3578         and adjust to std::string.
3579         (info_static_tracepoint_markers_command): Adjust to std::vector
3580         changes
3581         * target.h (static_tracepoint_marker_p): Remove typedef.
3582         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3583         (struct target_ops) <to_static_tracepoint_marker_at>: Return
3584         bool.
3585         <to_static_tracepoint_markers_by_strid>: Return std::vector.
3586         * target-debug.h
3587         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3588         (target_debug_print_std_vector_static_tracepoint_marker): New.
3589         (target_debug_print_struct_static_tracepoint_marker_p): Rename
3590         to...
3591         (target_debug_print_static_tracepoint_marker_p): ... this.
3592         * target-delegates.c: Re-generate.
3593         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3594         Make std::string.
3595         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3596         (decode_static_tracepoint_spec): Adjust to std::vector.
3597         (tracepoint_print_one_detail): Adjust to std::string.
3598         (strace_marker_decode_location): Adjust to std::string.
3599         (update_static_tracepoint): Adjust to std::string, remove call
3600         to release_static_tracepoint_marker.
3601         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3602         Adjust to std::vector.
3603         * remote.c (remote_static_tracepoint_marker_at): Return bool.
3604         (remote_static_tracepoint_markers_by_strid): Adjust to
3605         std::vector.
3606         * common/rsp-low.h (hex2str): New overload with explicit count
3607         of bytes.
3608         * common/rsp-low.c (hex2str): New overload with explicit count
3609         of bytes.
3610         * unittests/rsp-low-selftests.c (test_hex2str): New function.
3611         (_initialize_rsp_low_selftests): Add test_hex2str test.
3612         * unittests/tracepoint-selftests.c
3613         (test_parse_static_tracepoint_marker_definition): Adjust to
3614         std::string.
3615
3616 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
3617
3618         * tracepoint.c (parse_static_tracepoint_marker_definition):
3619         Consider case where the definition is followed by more
3620         definitions.
3621         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3622         tracepoint-selftests.c.
3623         * unittests/tracepoint-selftests.c: New.
3624
3625 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3626
3627         * MAINTAINERS (Write After Approval): Add Pedro Franco de
3628         Carvalho.
3629
3630 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
3631
3632         * symtab.c (find_pc_sect_line): fixed indentation.
3633
3634 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
3635
3636         * symtab.c (find_pc_sect_line): now uses binary search.
3637
3638 2018-03-19  Tom Tromey  <tom@tromey.com>
3639
3640         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3641         "IDENT" production.
3642
3643 2018-03-19  Pedro Alves  <palves@redhat.com>
3644             Tom Tromey  <tom@tromey.com>
3645
3646         * unittests/observable-selftests.c: New file.
3647         * common/observable.h: New file.
3648         * observable.h: New file.
3649         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3650         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3651         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3652         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3653         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3654         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3655         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3656         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3657         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3658         python/py-breakpoint.c, python/py-finishbreakpoint.c,
3659         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3660         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3661         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3662         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3663         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3664         tui/tui-interp.c, valops.c: Update all users.
3665         * tui/tui-hooks.c (tui_bp_created_observer)
3666         (tui_bp_deleted_observer, tui_bp_modified_observer)
3667         (tui_inferior_exit_observer, tui_before_prompt_observer)
3668         (tui_normal_stop_observer, tui_register_changed_observer):
3669         Remove.
3670         (tui_observers_token): New global.
3671         (attach_or_detach, tui_attach_detach_observers): New functions.
3672         (tui_install_hooks, tui_remove_hooks): Use
3673         tui_attach_detach_observers.
3674         * record-btrace.c (record_btrace_thread_observer): Remove.
3675         (record_btrace_thread_observer_token): New global.
3676         * observer.sh: Remove.
3677         * observer.c: Rename to observable.c.
3678         * observable.c (namespace gdb_observers): Define new objects.
3679         (observer_debug): Move into gdb_observers namespace.
3680         (struct observer, struct observer_list, xalloc_observer_list_node)
3681         (xfree_observer_list_node, generic_observer_attach)
3682         (generic_observer_detach, generic_observer_notify): Remove.
3683         (_initialize_observer): Update.
3684         Don't include observer.inc.
3685         * Makefile.in (generated_files): Remove observer.h, observer.inc.
3686         (clean mostlyclean): Likewise.
3687         (observer.h, observer.inc): Remove targets.
3688         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3689         (COMMON_SFILES): Use observable.c, not observer.c.
3690         * .gitignore: Remove observer.h.
3691
3692 2018-03-18  Tom Tromey  <tom@tromey.com>
3693
3694         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3695         gdb::def_vector.
3696         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3697
3698 2018-03-17  Tom Tromey  <tom@tromey.com>
3699
3700         * auto-load.c (auto_load_objfile_script_1): Use std::string.
3701
3702 2018-03-17  Tom Tromey  <tom@tromey.com>
3703
3704         * target.c (class scoped_target_fd): New.
3705         (target_fileio_close_cleanup): Remove.
3706         (target_fileio_read_alloc_1): Use scoped_target_fd.
3707
3708 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
3709
3710         * silent-rules.mk: New.
3711         * Makefile.in: Include silent-rules.mk
3712         (srcdir, VPATH, top_srcdir): Move up.
3713         (COMPILE): Add ECHO_CXX.
3714         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3715         (init.c): Add ECHO_INIT_C.
3716         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3717         (version.c): Add ECHO_GEN.
3718         (printcmd.o): Add ECHO_CXX.
3719         (target-float.o): Add ECHO_CXX.
3720         (ada-exp.o): Add ECHO_CXX.
3721         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3722         (insight$(EXEEXT)): Add ECHO_CXXLD.
3723         * gnulib/configure.ac: Add AM_SILENT_RULES.
3724         * gnulib/aclocal.m4: Re-generate.
3725         * gnulib/configure: Re-generate.
3726         * gnulib/import/Makefile.in: Re-generate.
3727
3728 2018-03-16  Tom Tromey  <tom@tromey.com>
3729
3730         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3731         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3732         * utils.c (do_free_section_addr_info)
3733         (make_cleanup_free_section_addr_info): Remove.
3734         * symfile.h (struct other_sections): Add constructor.
3735         (struct section_addr_info): Remove.
3736         (section_addr_info): New typedef.
3737         (struct sym_fns) <sym_offsets>: Change type of parameter.
3738         (build_section_addr_info_from_objfile)
3739         (relative_addr_info_to_section_offsets, addr_info_make_relative)
3740         (default_symfile_offsets, symbol_file_add)
3741         (symbol_file_add_from_bfd)
3742         (build_section_addr_info_from_section_table): Update.
3743         (alloc_section_addr_info, free_section_addr_info): Don't declare.
3744         * symfile.c (alloc_section_addr_info): Remove.
3745         (build_section_addr_info_from_section_table): Change return type.
3746         Update.
3747         (build_section_addr_info_from_bfd)
3748         (build_section_addr_info_from_objfile): Likewise.
3749         (free_section_addr_info): Remove.
3750         (relative_addr_info_to_section_offsets): Change type of "addrs".
3751         (addrs_section_compar): Now a std::sort comparator.
3752         (addrs_section_sort): Change return type.
3753         (addr_info_make_relative): Change type of "addrs".  Update.
3754         (default_symfile_offsets, syms_from_objfile_1)
3755         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3756         (symbol_file_add_separate): Update.
3757         (symbol_file_add): Change type of "addrs".  Update.
3758         (add_symbol_file_command): Update.  Remove cleanups.
3759         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
3760         cleanups.
3761         * symfile-debug.c (debug_sym_offsets): Change type of "info".
3762         * solib.c (solib_read_symbols): Update.
3763         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
3764         * machoread.c (macho_symfile_offsets): Update.
3765         * jit.c (jit_bfd_try_read_symtab): Update.
3766
3767 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
3768
3769         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3770         unittests/utils-selftests.c.
3771         * unittests/utils-selftests.c: New file.
3772
3773 2018-03-14  Tom Tromey  <tom@tromey.com>
3774
3775         PR cli/14977:
3776         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3777         for NULL.
3778
3779 2018-03-14  Tom Tromey  <tom@tromey.com>
3780
3781         PR cli/19918:
3782         * printcmd.c (printf_pointer): Allow "-" in format.
3783
3784 2018-03-14  Tom Tromey  <tom@tromey.com>
3785
3786         * printcmd.c (_initialize_printcmd): Add usage to printf.
3787
3788 2018-03-14  Yao Qi  <qiyao@sourceware.org>
3789
3790         * MAINTAINERS: Update my email address.
3791
3792 2018-03-13  Tom Tromey  <tom@tromey.com>
3793
3794         * machoread.c (macho_check_dsym): Change filenamep to a
3795         std::string*.
3796         (macho_symfile_read): Update.
3797         * symfile.c (load_command): Use std::string.
3798
3799 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3800
3801         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3802         to error message string.
3803         (riscv_register_name): Use xsnprintf instead of sprintf.
3804         (riscv_insn::fetch_instruction): Use gdb_assert instead of
3805         internal_error.
3806         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3807         error.
3808         (riscv_push_dummy_call): Likewise.
3809
3810 2018-03-12  Tom Tromey  <tom@tromey.com>
3811
3812         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3813         Use gdb::byte_vector.
3814         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3815
3816 2018-03-12  Yao Qi  <yao.qi@linaro.org>
3817
3818         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3819         parameter type to readable_regcache.
3820         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3821         the declaration.
3822
3823 2018-03-11  Tom Tromey  <tom@tromey.com>
3824
3825         * dwarf2read.c (struct nextfield): Add initializers.
3826         (struct nextfnfield): Remove.
3827         (struct fnfieldlist): Add initializers.  Remove "length" and
3828         "head", use std::vector.
3829         (struct decl_field_list): Remove.
3830         (struct field_info): Add initializers.
3831         <fields, baseclasses>: Now std::vector.
3832         <nbaseclasses, nfnfields, typedef_field_list_count,
3833         nested_types_list_count>: Remove.
3834         (dwarf2_add_field, dwarf2_add_type_defn)
3835         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3836         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3837         (process_structure_scope): Update.
3838
3839 2018-03-11  Tom Tromey  <tom@tromey.com>
3840
3841         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3842         for use by std::sort.
3843         (build_type_psymtabs_1): Use std::vector.
3844
3845 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
3846
3847         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3848         and LIBMPFR in the printed configuration.
3849
3850 2018-03-08  Tom Tromey  <tom@tromey.com>
3851
3852         * source.c (get_filename_and_charpos): Use scoped_fd.
3853         * nto-procfs.c (procfs_open_1): Use scoped_fd.
3854         (procfs_pidlist): Likewise.
3855         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3856         (iterate_over_mappings): Likewise.
3857
3858 2018-03-08  Tom Tromey  <tom@tromey.com>
3859
3860         * infcall.c (struct call_return_meta_info)
3861         <stack_temporaries_enabled>: Remove.
3862         (get_call_return_value, call_function_by_hand_dummy): Update.
3863         * thread.c (disable_thread_stack_temporaries): Remove.
3864         (enable_thread_stack_temporaries): Remove.
3865         (thread_stack_temporaries_enabled_p): Return bool.
3866         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3867         (get_last_thread_stack_temporary): Update.
3868         * eval.c (evaluate_subexp): Update.
3869         * gdbthread.h (class enable_thread_stack_temporaries): Now a
3870         class, not a function.
3871         (value_ptr, value_vec): Remove typedefs.
3872         (class thread_info) <stack_temporaries_enabled>: Now bool.
3873         <stack_temporaries>: Now a std::vector.
3874         (thread_stack_temporaries_enabled_p)
3875         (value_in_thread_stack_temporaries): Return bool.
3876
3877 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
3878
3879         * remote.c (putpkt_binary): Fix omitted bytes reporting.
3880         (getpkt_or_notif_sane_1): Likewise.
3881
3882 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3883
3884         * build-id.c (build_id_to_debug_bfd): Use std::string.
3885
3886 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3887
3888         * build-id.c (find_separate_debug_file_by_buildid): Return
3889         std::string.
3890         * build-id.h (find_separate_debug_file_by_buildid): Return
3891         std::string.
3892         * coffread.c (coff_symfile_read): Adjust to std::string.
3893         * elfread.c (elf_symfile_read): Adjust to std::string.
3894         * symfile.c (separate_debug_file_exists): Change parameter to
3895         std::string.
3896         (find_separate_debug_file): Return std::string.
3897         (find_separate_debug_file_by_debuglink): Return std::string.
3898         * symfile.h (find_separate_debug_file_by_debuglink): Return
3899         std::string.
3900
3901 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3902
3903         * common/xml-utils.c (xml_escape_text): Move code to...
3904         (xml_escape_text_append): ... this new function.
3905         * common/xml-utils.h (xml_escape_text_append): New declaration.
3906         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3907         New function.
3908         (_initialize_xml_utils): register test_xml_escape_text_append as
3909         a selftest.
3910
3911 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
3912
3913         * defs.h: Remove MAX_REGISTER_SIZE.
3914         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3915         asserts.
3916         * python/py-unwind.c (pyuw_sniffer): Likewise.
3917
3918 2018-03-07  Tom Tromey  <tom@tromey.com>
3919
3920         * linux-tdep.c (linux_info_proc): Update.
3921         * target.h (struct target_ops) <to_fileio_readlink>: Return
3922         optional<string>.
3923         (target_fileio_readlink): Return optional<string>.
3924         * remote.c (remote_hostio_readlink): Return optional<string>.
3925         * inf-child.c (inf_child_fileio_readlink): Return
3926         optional<string>.
3927         * target.c (target_fileio_readlink): Return optional<string>.
3928
3929 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
3930
3931         * regcache.c (cooked_read_test): Add riscv to the list of
3932         architectures that have a save_reggroup.
3933
3934 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3935
3936         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3937         value is not a dynamic class object.
3938
3939 2018-03-06  Tom Tromey  <tom@tromey.com>
3940
3941         * rust-exp.y: Formatting fixes.
3942
3943 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3944
3945         * riscv-tdep.c (riscv_register_name): Remove target description
3946         support.
3947         (riscv_gdbarch_init): Remove target description check.
3948
3949 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3950
3951         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3952         comment.
3953         * riscv-tdep.h: Likewise.
3954
3955 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3956
3957         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3958         (riscv_pseudo_register_write): Delete.
3959         (riscv_gdbarch_init): Remove all use of pseudo registers.
3960
3961 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3962
3963         * record-btrace.c (btrace_print_lines): Replace cleanup
3964         parameter with RAII equivalents.
3965         (btrace_insn_history): Replace cleanup with RAII equivalents.
3966         * ui-out.h (make_cleanup_ui_out_list_begin_end,
3967         make_cleanup_ui_out_tuple_begin_end): Remove.
3968         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3969         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3970         make_cleanup_ui_out_list_begin_end): Remove.
3971
3972 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3973
3974         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3975         parameter types to std::vector.  Use bool.
3976         (record_btrace_wait): Replace VEC(tp_t) with
3977         std::vector<thread_info *>.
3978         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3979
3980 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3981
3982         * record-btrace.c (record_btrace_disable_callback): Remove.
3983         (struct scoped_btrace_disable): New.
3984         (record_btrace_open): Use scoped_btrace_disable.
3985
3986 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3987
3988         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3989         reading values from registers.
3990
3991 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3992
3993         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3994         where appropriate.
3995
3996 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3997
3998         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3999         change parameter type.  Use GDB's print functions, and use
4000         core_addr_to_string where appropriate.
4001         (riscv_push_dummy_call): Use core_addr_to_string where
4002         appropriate, update call to riscv_print_arg_location, and reindent
4003         a few lines.
4004         (riscv_return_value): Update call to riscv_print_arg_location.
4005
4006 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4007             Tim Newsome <tim@sifive.com>
4008             Albert Ou <a0u@eecs.berkeley.edu>
4009             Darius Rad <darius@bluespec.com>
4010
4011         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4012         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4013         (ALLDEPFILES): Add riscv-tdep.c
4014         * configure.tgt: Add riscv support.
4015         * riscv-tdep.c: New file.
4016         * riscv-tdep.h: New file.
4017         * NEWS: Mention new target.
4018         * MAINTAINERS: Add entry for riscv.
4019
4020 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4021
4022         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4023         fields within aggregates.
4024
4025 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
4026
4027         * record-btrace.c (btrace_print_lines): Change type of flags to
4028         gdb_disassembly_flags.
4029
4030 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
4031
4032         * fbsd-nat.c: Include "inf-ptrace.h".
4033         (USE_SIGTRAP_SIGINFO): Conditionally define.
4034         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4035         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4036         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4037         function.
4038         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4039         Likewise.
4040         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4041         Likewise.
4042         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4043         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4044         "supports_stopped_by_hw_breakpoint" target methods.
4045
4046 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
4047
4048         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4049         * fbsd-nat.c (debug_fbsd_nat): New variable.
4050         (show_fbsd_nat_debug): New function.
4051         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4052         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4053
4054 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
4055
4056         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4057         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4058         prototype.
4059         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4060         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4061         method.
4062
4063 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4064
4065         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4066         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4067
4068 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4069
4070         * charset.c (struct charset_vector): New.
4071         (charsets): Change type to charset_vector.
4072         (find_charset_names): Adjust.
4073         (add_one): Adjust.
4074         (_initialize_charset): Adjust.
4075
4076 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4077
4078         * progspace.h (struct program_space) <deleted_solibs>: Change
4079         type to std::vector<std::string>.
4080         * progspace.c (clear_program_space_solib_cache): Adjust.
4081         * breakpoint.c (print_solib_event): Adjust.
4082         (check_status_catch_solib): Adjust.
4083         * solib.c (update_solib_list): Adjust.
4084         * ui-out.h (class ui_out) <field_string>: New overload.
4085         * ui-out.c (ui_out::field_string): New overload.
4086
4087 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4088
4089         * progspace.h (struct program_space): Add constructor and
4090         destructor, initialize fields.
4091         (add_program_space): Remove.
4092         * progspace.c (add_program_space): Rename to...
4093         (program_space::program_space): ... this.
4094         (release_program_space): Rename to...
4095         (program_space::~program_space): ... this.
4096         (delete_program_space): Use delete to delete program_space.
4097         (initialize_progspace): Use new to allocate program_space.
4098         * inferior.c (add_inferior_with_spaces): Likewise.
4099         (clone_inferior_command): Likewise.
4100         * infrun.c (follow_fork_inferior): Likewise.
4101         (handle_vfork_child_exec_or_exit): Likewise.
4102
4103 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4104
4105         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4106         (delim_string_to_char_ptr_vec): Return std::vector of
4107         gdb::unique_xmalloc_ptr.
4108         (dirnames_to_char_ptr_vec_append): Take std::vector of
4109         gdb::unique_xmalloc_ptr.
4110         (dirnames_to_char_ptr_vec): Return std::vector of
4111         gdb::unique_xmalloc_ptr.
4112         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4113         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4114         (delim_string_to_char_ptr_vec): Return an std::vector of
4115         gdb::unique_xmalloc_ptr, adjust the code.
4116         (dirnames_to_char_ptr_vec_append): Take an std::vector of
4117         gdb::unique_xmalloc_ptr, adjust the code.
4118         (dirnames_to_char_ptr_vec): Return an std::vector of
4119         gdb::unique_xmalloc_ptr, adjust the code.
4120         * auto-load.c (auto_load_safe_path_vec): Change type to
4121         std::vector of gdb::unique_xmalloc_ptr.
4122         (auto_load_expand_dir_vars): Return an std::vector of
4123         gdb::unique_xmalloc_ptr, adjust the code.
4124         (auto_load_safe_path_vec_update): Adjust.
4125         (filename_is_in_auto_load_safe_path_vec): Adjust.
4126         (auto_load_objfile_script_1): Adjust.
4127         * build-id.c (build_id_to_debug_bfd): Adjust.
4128         * linux-thread-db.c (thread_db_load_search): Adjust.
4129         * source.c (add_path): Adjust.
4130         (openp): Adjust.
4131         * symfile.c (find_separate_debug_file): Adjust.
4132         * utils.c (do_free_char_ptr_vec): Remove.
4133         (make_cleanup_free_char_ptr_vec): Remove.
4134
4135 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
4136
4137         PR gdb/22907
4138         * common/pathstuff.c: Conditionally include "<windows.h>".
4139
4140 2018-03-01  Georg Sauthoff  <mail@georg.so>
4141
4142         PR gdb/22888
4143         * gcore.in: Quote variables and switch interpreter to bash.
4144
4145 2018-03-01  Tom Tromey  <tom@tromey.com>
4146
4147         * dwarf2read.c (alloc_discriminant_info): Fix default_index
4148         assertion.  Add assertion for discriminant_index.
4149         (quirk_rust_enum): Use correct base type name in univariant case.
4150
4151 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
4152
4153         * record.c (get_call_history_modifiers): Return a
4154         record_print_flags.
4155         (cmd_record_call_history): Adjust.
4156         * record-btrace.c (record_btrace_call_history): Adjust.
4157         (record_btrace_call_history_range): Adjust.
4158         (record_btrace_call_history_from): Adjust.
4159         * target-debug.h (target_debug_print_record_print_flags): New.
4160         * target-delegates.c: Re-generate.
4161         * target.c (target_call_history): Change flags type.
4162         (target_call_history_from): Likewise.
4163         (target_call_history_range): Likewise.
4164         * target.h (struct target_ops) <target_call_history>: Likewise.
4165         (target_call_history_from): Likewise.
4166         (target_call_history_range): Likewise.
4167
4168 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
4169             Simon Marchi  <simon.marchi@polymtl.ca>
4170
4171         * common/common-utils.c: Include "sys/stat.h".
4172         (is_regular_file): Move here from "source.c"; change return
4173         type to "bool".
4174         * common/common-utils.h (is_regular_file): New prototype.
4175         * common/pathstuff.c (contains_dir_separator): New function.
4176         * common/pathstuff.h (contains_dir_separator): New prototype.
4177         * source.c: Don't include "sys/stat.h".
4178         (is_regular_file): Move to "common/common-utils.c".
4179
4180 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
4181
4182         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4183         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4184         * auto-load.c: Include "common/pathstuff.h".
4185         * common/common-def.h (current_directory): Move here.
4186         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4187         function.
4188         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4189         prototype.
4190         * common/pathstuff.c: New file.
4191         * common/pathstuff.h: New file.
4192         * compile/compile.c: Include "common/pathstuff.h".
4193         * defs.h (current_directory): Move to "common/common-defs.h".
4194         * dwarf2read.c: Include "common/pathstuff.h".
4195         * exec.c: Likewise.
4196         * guile/scm-safe-call.c: Likewise.
4197         * linux-thread-db.c: Likewise.
4198         * main.c: Likewise.
4199         * nto-tdep.c: Likewise.
4200         * objfiles.c: Likewise.
4201         * source.c: Likewise.
4202         * symtab.c: Likewise.
4203         * utils.c: Include "common/pathstuff.h".
4204         (gdb_realpath): Move to "common/pathstuff.c".
4205         (gdb_realpath_keepfile): Likewise.
4206         (gdb_abspath): Likewise.
4207         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4208         (gdb_realpath_keepfile): Likewise.
4209         (gdb_abspath): Likewise.
4210
4211 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
4212
4213         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4214         wildcard process pid for super_resume for kernels with a
4215         specific bug.
4216
4217 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
4218
4219         * compile/compile.c (get_args): Add additional comments
4220         explaining function.
4221
4222 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
4223             Tom Tromey  <tom@tromey.com>
4224
4225         * target.h (memory_write_request_s): Remove typedef.  Don't define
4226         VEC.
4227         (target_write_memory_blocks): Change argument to std::vector.
4228         (struct memory_write_request): Add constructor.
4229         * target-memory.c (compare_block_starting_address): Return bool.
4230         Change argument types.
4231         (claim_memory): Change arguments to use std::vector.
4232         (split_regular_and_flash_blocks, blocks_to_erase)
4233         (compute_garbled_blocks): Likewise.
4234         (cleanup_request_data, cleanup_write_requests_vector): Remove.
4235         (target_write_memory_blocks): Change argument to std::vector.
4236         * symfile.c (struct load_section_data): Add constructor and
4237         destructor.  Use std::vector for "requests".
4238         (struct load_progress_data): Add initializers.
4239         (load_section_callback): Update.  Use "new".
4240         (clear_memory_write_data): Remove.
4241         (generic_load): Update.
4242
4243 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
4244
4245         * arch/aarch64.h: Use common/tdesc.h.
4246
4247 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
4248
4249         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4250         architecture with a 64-bit ABI.
4251
4252 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
4253
4254         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4255         ahead of target description loading.
4256
4257 2018-02-26  Tom Tromey  <tom@tromey.com>
4258
4259         * stack.c (backtrace_command_1): Update.
4260         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4261         of "flags".
4262         * python/py-framefilter.c (py_print_frame)
4263         (gdbpy_apply_frame_filter): Change type of "flags".
4264         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4265         of "flags".
4266         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4267         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4268         * extension.h (enum frame_filter_flag): Rename from
4269         frame_filter_flags.
4270         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4271         (apply_ext_lang_frame_filter): Change type of "flags".
4272         * extension.c (apply_ext_lang_frame_filter): Change type of
4273         "flags".
4274         * extension-priv.h (struct extension_language_ops)
4275         <apply_frame_filter>: Change type of "flags".
4276
4277 2018-02-26  Tom Tromey  <tom@tromey.com>
4278
4279         PR python/16497:
4280         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
4281         off-by-one in py_end computation.
4282         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4283         PRINT_MORE_FRAMES.
4284         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4285         constant.
4286
4287 2018-02-26  Tom Tromey  <tom@tromey.com>
4288
4289         * dwarf2read.c (struct variant_field): New.
4290         (struct nextfield) <variant>: New field.
4291         (dwarf2_add_field): Handle DW_TAG_variant_part.
4292         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4293         discriminated union.
4294         (read_structure_type): Handle DW_TAG_variant_part.
4295         (handle_struct_member_die): New function, extracted from
4296         process_structure_scope.  Handle DW_TAG_variant.
4297         (process_structure_scope): Handle discriminated unions.  Call
4298         handle_struct_member_die.
4299
4300 2018-02-26  Tom Tromey  <tom@tromey.com>
4301
4302         * rust-lang.h (rust_last_path_segment): Declare.
4303         * rust-lang.c (rust_last_path_segment): Now public.  Change
4304         contract.
4305         (struct disr_info): Remove.
4306         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4307         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4308         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4309         (rust_enum_p, rust_enum_variant): New function.
4310         (rust_underscore_fields): Remove "offset" parameter.
4311         (rust_print_enum): New function.
4312         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4313         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4314         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
4315         enums.
4316         (rust_internal_print_type): New function, from rust_print_type.
4317         Remove enum code.
4318         (rust_print_type): Call rust_internal_print_type.
4319         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4320         Update enum handling.
4321         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4322         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4323         (rust_union_quirks): New functions.
4324         (process_full_comp_unit, process_full_type_unit): Call
4325         rust_union_quirks.
4326         (process_structure_scope): Update rust_unions if necessary.
4327
4328 2018-02-26  Tom Tromey  <tom@tromey.com>
4329
4330         * value.h (value_union_variant): Declare.
4331         * valops.c (value_union_variant): New function.
4332         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4333         (struct discriminant_info): New.
4334         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4335         enumerator.
4336         (struct main_type) <flag_discriminated_union>: New field.
4337
4338 2018-02-26  Tom Tromey  <tom@tromey.com>
4339
4340         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4341         unittests/unpack-selftests.c.
4342         * unittests/unpack-selftests.c: New file.
4343         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4344
4345 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4346
4347         * dwarf2read.c (struct partial_die_info) <read>: New method.
4348         (read_partial_die): Remove the declaration.
4349         (load_partial_dies): Update.
4350         (partial_die_info::partial_die_info):
4351         (read_partial_die): Change it to partial_die_info::read.
4352
4353 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4354
4355         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4356         (fixup_partial_die): Remove declaration.
4357         (scan_partial_symbols): Update.
4358         (partial_die_parent_scope): Likewise.
4359         (partial_die_full_name): Likewise.
4360         (fixup_partial_die): Change it to partial_die_info::fixup.
4361
4362 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4363
4364         * dwarf2read.c (read_partial_die): Update the declaration.
4365         (load_partial_dies): Caller update.
4366         (read_partial_die): Remove one argument abbrev_len.
4367
4368 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4369
4370         * dwarf2read.c (struct partial_die_info): Add ctor, delete
4371         assignment operator.
4372         (load_partial_dies): Use ctor and copy ctor.
4373         (read_partial_die): Update.
4374         (dwarf2_cu::find_partial_die): Use ctor.
4375
4376 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4377
4378         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4379         (find_partial_die_in_comp_unit): Change it to
4380         dwarf2_cu::find_partial_die.
4381         (find_partial_die): Update.
4382
4383 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4384
4385         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4386         is NULL.
4387
4388 2018-02-26  Yao Qi  <yao.qi@linaro.org>
4389
4390         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4391
4392 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
4393
4394         * arch/amd64.h: Use common/tdesc.h.
4395         * arch/i386.c: Likewise.
4396         * arch/i386.h: Likewise.
4397         * arch/tic6x.c: Likewise.
4398         * arch/tdesc.h: Move file from here...
4399         * common/tdesc.h: ...to here.
4400         * features/aarch64-core.c: Regenerate.
4401         * features/aarch64-fpu.c: Regenerate.
4402         * features/i386/32bit-avx.c: Regenerate.
4403         * features/i386/32bit-avx512.c: Regenerate.
4404         * features/i386/32bit-core.c: Regenerate.
4405         * features/i386/32bit-linux.c: Regenerate.
4406         * features/i386/32bit-mpx.c: Regenerate.
4407         * features/i386/32bit-pkeys.c: Regenerate.
4408         * features/i386/32bit-sse.c: Regenerate.
4409         * features/i386/64bit-avx.c: Regenerate.
4410         * features/i386/64bit-avx512.c: Regenerate.
4411         * features/i386/64bit-core.c: Regenerate.
4412         * features/i386/64bit-linux.c: Regenerate.
4413         * features/i386/64bit-mpx.c: Regenerate.
4414         * features/i386/64bit-pkeys.c: Regenerate.
4415         * features/i386/64bit-segments.c: Regenerate.
4416         * features/i386/64bit-sse.c: Regenerate.
4417         * features/i386/x32-core.c: Regenerate.
4418         * features/tic6x-c6xp.c: Regenerate.
4419         * features/tic6x-core.c: Regenerate.
4420         * features/tic6x-gp.c: Regenerate.
4421         * target-descriptions.c: Use common/tdesc.h.
4422         * target-descriptions.h: Likewise.
4423
4424 2018-02-24  Tom Tromey  <tom@tromey.com>
4425
4426         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4427         (try_thread_db_load_from_dir, thread_db_load_search): Use
4428         std::string.
4429         (info_auto_load_libthread_db_compare): Return bool.  Change
4430         argument types.
4431         (info_auto_load_libthread_db): Use std::vector, std::string.
4432         Remove cleanups.
4433
4434 2018-02-24  Tom Tromey  <tom@tromey.com>
4435
4436         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4437         std::string.
4438         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4439         std::string*.
4440         * gdbarch.c: Rebuild.
4441         * gdbarch.h: Rebuild.
4442         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4443         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4444         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4445         std::string*.
4446
4447 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
4448
4449         * gdbtypes.h (sect_offset): Change type to uint64_t.
4450         (sect_offset_str): New function.
4451         * dwarf2read.c (create_addrmap_from_aranges): Use
4452         sect_offset_str.
4453         (error_check_comp_unit_head): Likewise.
4454         (create_debug_type_hash_table): Likewise.
4455         (read_cutu_die_from_dwo): Likewise.
4456         (init_cutu_and_read_dies): Likewise.
4457         (init_cutu_and_read_dies_no_follow): Likewise.
4458         (process_psymtab_comp_unit_reader): Likewise.
4459         (partial_die_parent_scope): Likewise.
4460         (peek_die_abbrev): Likewise.
4461         (process_queue): Likewise.
4462         (dwarf2_physname): Likewise.
4463         (read_namespace_alias): Likewise.
4464         (read_import_statement): Likewise.
4465         (create_dwo_cu_reader): Likewise.
4466         (create_cus_hash_table): Likewise.
4467         (lookup_dwo_cutu): Likewise.
4468         (inherit_abstract_dies): Likewise.
4469         (read_func_scope): Likewise.
4470         (read_call_site_scope): Likewise.
4471         (dwarf2_add_member_fn): Likewise.
4472         (read_common_block): Likewise.
4473         (read_module_type): Likewise.
4474         (read_typedef): Likewise.
4475         (read_subrange_type): Likewise.
4476         (load_partial_dies): Likewise.
4477         (read_partial_die): Likewise.
4478         (find_partial_die): Likewise.
4479         (read_str_index): Likewise.
4480         (dwarf2_string_attr): Likewise.
4481         (build_error_marker_type): Likewise.
4482         (lookup_die_type): Likewise.
4483         (dump_die_shallow): Likewise.
4484         (follow_die_ref): Likewise.
4485         (dwarf2_fetch_die_loc_sect_off): Likewise.
4486         (dwarf2_fetch_constant_bytes): Likewise.
4487         (follow_die_sig): Likewise.
4488         (get_signatured_type): Likewise.
4489         (get_DW_AT_signature_type): Likewise.
4490         (dwarf2_find_containing_comp_unit): Likewise.
4491         (set_die_type): Likewise.
4492
4493 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
4494
4495         * arch/aarch64.c: Include "common-defs.h".
4496         * arch/amd64.c: Likewise.
4497         * arch/i386.c: Likewise.
4498
4499 2018-02-21  Tom Tromey  <tom@tromey.com>
4500
4501         * value.h: (extract_field_op): Update.
4502         * eval.c (extract_field_op): Return a const char *.
4503         * expression.h (parse_expression_for_completion): Update.
4504         * completer.c (complete_expression): Update.
4505         (add_struct_fields): Make fieldname const.
4506         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4507         (mark_completion_tag, parse_exp_in_context_1): Update.
4508         (parse_expression_for_completion): Change "name" to
4509         unique_xmalloc_ptr*.
4510
4511 2018-02-21  Tom Tromey  <tom@tromey.com>
4512
4513         * infcall.c (call_function_by_hand_dummy): Use std::vector.
4514
4515 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4516
4517         * avr-tdep.c (avr_read_pc): Change parameter type to
4518         readable_regcache.
4519         * gdbarch.sh (read_pc): Likewise.
4520         * gdbarch.c: Re-generated.
4521         * gdbarch.h: Re-generated.
4522         * hppa-tdep.c (hppa_read_pc): Change parameter type to
4523         readable_regcache.
4524         * ia64-tdep.c (ia64_read_pc): Likewise.
4525         * mips-tdep.c (mips_read_pc): Likewise.
4526         * spu-tdep.c (spu_read_pc): Likewise.
4527
4528 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4529
4530         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4531         * regcache-dump.c: New file.
4532         * regcache.c: Move register_dump to regcache-dump.c.
4533         (maintenance_print_registers): Likewise.
4534         (maintenance_print_raw_registers): Likewise.
4535         (maintenance_print_cooked_registers): Likewise.
4536         (maintenance_print_register_groups): Likewise.
4537         (maintenance_print_remote_registers): Likewise.
4538         (_initialize_regcache): Likewise.
4539         * regcache.h (register_dump): Moved from regcache.c.
4540
4541 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4542
4543         * regcache.c (regcache::regcache): Update.
4544         (regcache::invalidate): Move it to detached_regcache::invalidate.
4545         (get_thread_arch_aspace_regcache): Update.
4546         (regcache::raw_update): Update.
4547         (regcache::cooked_read): Remove some code.
4548         (regcache::cooked_read_value): Likewise.
4549         (regcache::raw_write): Remove assert on m_readonly_p.
4550         (regcache::raw_supply_integer): Move it to
4551         detached_regcache::raw_supply_integer.
4552         (regcache::raw_supply_zeroed): Likewise.
4553         * regcache.h (detached_regcache) <raw_supply_integer>: New
4554         declaration.
4555         <raw_supply_zeroed, invalidate>: Likewise.
4556         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4557         <invalidate>: Likewise.
4558         <m_readonly_p>: Removed.
4559
4560 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4561
4562         * infcmd.c (get_return_value): Let stop_regs point to
4563         get_current_regcache.
4564         * regcache.c (regcache::regcache): Remove.
4565         (register_dump_reg_buffer): New class.
4566         (regcache_print): Adjust.
4567         * regcache.h (regcache): Remove constructors.
4568
4569 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4570
4571         * regcache.c (class register_dump): New class.
4572         (register_dump_regcache, register_dump_none): New class.
4573         (register_dump_remote, register_dump_groups): New class.
4574         (regcache_print): Update.
4575         * regcache.h (regcache_dump_what): Move it to regcache.c.
4576         (regcache) <dump>: Remove.
4577
4578 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4579
4580         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4581          reg_buffer_rw *.
4582         (jit_unwind_reg_set_impl): Call raw_supply.
4583         (jit_frame_sniffer): Use reg_buffer_rw.
4584         * record-full.c (record_full_core_regbuf): Change its type.
4585         (record_full_core_open_1): Use reg_buffer_rw.
4586         (record_full_close): Likewise.
4587         (record_full_core_fetch_registers): Use regcache->raw_supply.
4588         (record_full_core_store_registers): Likewise.
4589         * regcache.c (regcache::get_register_status): Move it to
4590         reg_buffer.
4591         (regcache_raw_set_cached_value): Remove.
4592         (regcache::raw_set_cached_value): Remove.
4593         (regcache::raw_write): Call raw_supply.
4594         (regcache::raw_supply): Move it to reg_buffer_rw.
4595         * regcache.h (regcache_raw_set_cached_value): Remove.
4596         (reg_buffer_rw): New class.
4597
4598 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4599
4600         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4601         readonly_detached_regcache.
4602         (dummy_frame_prev_register): Use regcache->cooked_read.
4603         * frame.c (frame_save_as_regcache): Change return type.
4604         (frame_pop): Update.
4605         * frame.h (frame_save_as_regcache): Update declaration.
4606         * inferior.h (get_infcall_suspend_state_regcache): Update
4607         declaration.
4608         * infrun.c (infcall_suspend_state) <registers>: use
4609         readonly_detached_regcache.
4610         (save_infcall_suspend_state): Don't use regcache_dup.
4611         (get_infcall_suspend_state_regcache): Change return type.
4612         * linux-fork.c (struct fork_info) <savedregs>: Change to
4613         readonly_detached_regcache.
4614         <pc>: New field.
4615         (fork_save_infrun_state): Don't use regcache_dup.
4616         (info_checkpoints_command): Adjust.
4617         * mi/mi-main.c (register_changed_p): Update declaration.
4618         (mi_cmd_data_list_changed_registers): Use
4619         readonly_detached_regcache.
4620         (register_changed_p): Change parameter type to
4621         readonly_detached_regcache.
4622         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4623         readonly_detached_regcache.
4624         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4625         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4626         New.
4627         (regcache::save): Move it to reg_buffer.
4628         (regcache::restore): Change parameter type.
4629         (regcache_dup): Remove.
4630         * regcache.h (reg_buffer) <save>: New method.
4631         (readonly_detached_regcache): New class.
4632         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4633         readonly_detached_regcache.
4634         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4635
4636 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4637
4638         * frame.c (frame_save_as_regcache): Use regcache method save.
4639         (frame_pop): Use regcache method restore.
4640         * infrun.c (restore_infcall_suspend_state): Likewise.
4641         * linux-fork.c (fork_load_infrun_state): Likewise.
4642         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4643         save.
4644         * regcache.c (regcache_save): Remove.
4645         (regcache::restore): More asserts.
4646         (regcache_cpy): Remove.
4647         * regcache.h (regcache_save): Remove the declaration.
4648         (regcache::restore): Move from private to public.
4649         Remove the friend declaration of regcache_cpy.
4650         (regcache_cpy): Remove declaration.
4651
4652 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4653
4654         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4655         parameter type to 'readable_regcache *'.
4656         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4657         * arm-tdep.c (arm_neon_quad_read): Likewise.
4658         (arm_pseudo_read): Likewise.
4659         * avr-tdep.c (avr_pseudo_register_read): Likewise.
4660         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4661         * frv-tdep.c (frv_pseudo_register_read): Likewise.
4662         * gdbarch.c: Re-generated.
4663         * gdbarch.h: Re-generated.
4664         * gdbarch.sh (pseudo_register_read): Change parameter type to
4665         'readable_regcache *'.
4666         (pseudo_register_read_value): Likewise.
4667         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4668         (h8300_pseudo_register_read): Likewise.
4669         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4670         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4671         (i386_pseudo_register_read_into_value): Likewise.
4672         (i386_pseudo_register_read_value): Likewise.
4673         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4674         declaration.
4675         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4676         * m32c-tdep.c (m32c_raw_read): Likewise.
4677         (m32c_read_flg): Likewise.
4678         (m32c_banked_register): Likewise.
4679         (m32c_banked_read): Likewise.
4680         (m32c_sb_read): Likewise.
4681         (m32c_part_read): Likewise.
4682         (m32c_cat_read): Likewise.
4683         (m32c_r3r2r1r0_read): Likewise.
4684         (m32c_pseudo_register_read): Likewise.
4685         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4686         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4687         (mep_pseudo_cr64_read): Likewise.
4688         (mep_pseudo_register_read): Likewise.
4689         * mips-tdep.c (mips_pseudo_register_read): Likewise.
4690         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4691         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4692         * regcache.c (regcache::raw_read): Move it to readable_regcache.
4693         (regcache::cooked_read): Likewise.
4694         (regcache::cooked_read_value): Likewise.
4695         (regcache_cooked_read_signed):
4696         (regcache::cooked_read): Likewise.
4697         * regcache.h (readable_regcache): New class.
4698         (regcache): Inherit readable_regcache.  Move some methods to
4699         readable_regcache.
4700         * rl78-tdep.c (rl78_pseudo_register_read): Change
4701         parameter type to 'readable_regcache *'.
4702         * rs6000-tdep.c (do_regcache_raw_read): Remove.
4703         (e500_pseudo_register_read): Change parameter type to
4704         'readable_regcache *'.
4705         (dfp_pseudo_register_read): Likewise.
4706         (vsx_pseudo_register_read): Likewise.
4707         (efpr_pseudo_register_read): Likewise.
4708         * s390-tdep.c (s390_pseudo_register_read): Likewise.
4709         * sh-tdep.c (sh_pseudo_register_read): Likewise.
4710         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4711         (sh64_pseudo_register_read): Likewise.
4712         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4713         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4714         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4715         (spu_pseudo_register_read): Likewise.
4716         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4717         (xtensa_pseudo_register_read): Likewise.
4718
4719 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4720
4721         * regcache.c (regcache::regcache): Call reg_buffer ctor.
4722         (regcache::arch): Move it to reg_buffer::arch.
4723         (regcache::register_buffer): Likewise.
4724         (regcache::assert_regnum): Likewise.
4725         (regcache::num_raw_registers): Likewise.
4726         * regcache.h (reg_buffer): New class.
4727         (regcache): Inherit reg_buffer.
4728
4729 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
4730
4731         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4732         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4733
4734 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
4735
4736         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4737
4738 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
4739
4740         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4741         (SFILES): Remove common/*.c files.
4742         (COMMON_OBS): Remove some *.o files built from common/*.c files.
4743         * common/common.host: Add common reference.
4744         * configure.ac: Likewise.
4745         * configure: Regenerate.
4746
4747 2018-02-16  Yao Qi  <yao.qi@linaro.org>
4748
4749         * block.c (block_namespace_info): Inherit allocate_on_obstack.
4750         (block_initialize_namespace): Use new.
4751         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4752         (dwarf2_free_objfile): Use delete.
4753         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4754         (copy_type_recursive): Use new.
4755         * gdb_obstack.h (allocate_on_obstack): New.
4756
4757 2018-02-15  Yao Qi  <yao.qi@linaro.org>
4758
4759         PR gdb/22849
4760         * inferior.c (exit_inferior_1): Reset inf->control.
4761
4762 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
4763
4764         * ada-lang.c (ada_to_fixed_value_create): Delete advance
4765         declaration.
4766
4767 2018-02-14  Pedro Alves  <palves@redhat.com>
4768
4769         * frame-unwind.c (frame_unwind_try_unwinder): Always call
4770         frame_cleanup_after_sniffer on exception.
4771
4772 2018-02-14  Tom Tromey  <tom@tromey.com>
4773
4774         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4775         const.
4776         (solib_bfd_open): Make pathname const.
4777         * solib.c (solib_bfd_open): Make pathname const.
4778         * solib-spu.c (spu_bfd_fopen): Make name const.
4779         (spu_bfd_open): Make pathname const.
4780         * solib-darwin.c (darwin_bfd_open): Make pathname const.
4781         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4782
4783 2018-02-14  Tom Tromey  <tom@tromey.com>
4784
4785         * symfile.c (symfile_bfd_open): Update.
4786         * source.h (openp, source_full_path_of, find_and_open_source):
4787         Change argument type to unique_xmalloc_ptr.
4788         * source.c (openp): Take a unique_xmalloc_ptr.
4789         (source_full_path_of, find_and_open_source): Likewise.
4790         (open_source_file, symtab_to_fullname): Update.
4791         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4792         unique_xmalloc_ptr.
4793         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4794         (exec_file_find): Update.
4795         * psymtab.c (psymtab_to_fullname): Update.
4796         * nto-tdep.h (nto_find_and_open_solib): Update.
4797         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4798         unique_xmalloc_ptr.
4799         * exec.c (exec_file_attach): Update.
4800         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4801         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4802
4803 2018-02-14  Tom Tromey  <tom@tromey.com>
4804
4805         * solib.c: Include source.h.
4806         * nto-tdep.c: Include source.h.
4807         * mi/mi-cmd-env.c: Include source.h.
4808         * infcmd.c: Include source.h.
4809         * exec.c: Include source.h.
4810         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4811         (add_path, directory_switch, source_path, init_source_path): Move
4812         declarations...
4813         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4814         (add_path, directory_switch, source_path, init_source_path):
4815         ...here.
4816
4817 2018-02-14  Tom Tromey  <tom@tromey.com>
4818
4819         * solist.h (exec_file_find, solib_find): Return
4820         unique_xmalloc_ptr.
4821         (solib_bfd_fopen): Take a const char *.
4822         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4823         (exec_file_find, solib_find): Likewise.
4824         (solib_bfd_fopen): Do not take ownership of "pathname".
4825         (solib_bfd_open): Use unique_xmalloc_ptr.
4826         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4827         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4828         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4829         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4830
4831 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
4832
4833         * ada-lang.c (name_match_type_from_name): Remove reference to
4834         ada_name_for_lookup in function's documentation.
4835         * ada-lang.h (ada_name_for_lookup): Delete declaration.
4836
4837 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
4838
4839         * defs.h (enum openp_flags): New enum.
4840         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4841         Move to enum openp_flags.
4842         (openp_flags): New enum flags.
4843         (openp): Change parameter type to openp_flags.
4844         * source.c (openp): Change parameter type to openp_flags.
4845         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4846         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4847
4848 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
4849
4850         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4851         per-command.
4852
4853 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4854
4855         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4856         into...
4857         (class dwarf2_queue_guard): ...the destructor of this new class.
4858         (dw2_do_instantiate_symtab): Create instance of the new class
4859         dwarf2_queue_guard, remove cleanup.
4860
4861 2018-02-09  Tom Tromey  <tom@tromey.com>
4862
4863         * source.c (find_source_lines): Don't reference past the end of
4864         the vector.
4865
4866 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4867
4868         * remote.c (remote_btrace_maybe_reopen): Change error message.
4869         * btrace.c (btrace_enable): Likewise.
4870         (parse_xml_btrace): Likewise.
4871         (parse_xml_btrace_conf): Likewise.
4872
4873 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4874
4875         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4876         (linux_enable_pt, linux_enable_bts): Call
4877         diagnose_perf_event_open_fail.
4878
4879 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4880
4881         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4882         Remove parameter and change return type.  Update callers.  Move it.
4883         (linux_enable_bts, linux_enable_pt): Improve error message.
4884         (linux_enable_pt): Remove zero buffer size check.
4885         (linux_enable_btrace): Improve error messages.  Remove NULL return
4886         check.
4887
4888 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4889
4890         * btrace.c (btrace_enable): Remove target_supports_btrace call.
4891         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4892         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4893         (linux_supports_pt, linux_supports_btrace): Remove.
4894         (linux_enable_bts): Call cpu_supports_bts.
4895         * nat/linux-btrace.h (linux_supports_btrace): Remove.
4896         * remote.c (remote_supports_btrace): Remove.
4897         (init_remote_ops): Remove remote_supports_btrace.
4898         * target-delegates.c: Regenerated.
4899         * target.c (target_supports_btrace): Remove.
4900         * target.h (target_ops) <to_supports_btrace>: Remove
4901         (target_supports_btrace): Remove.
4902         * x86-linux-nat.c (x86_linux_create_target): Remove
4903         linux_supports_btrace.
4904
4905 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4906
4907         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4908         btrace failed.
4909         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4910         exception and use message in own exception.
4911
4912 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4913
4914         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4915         (perf_event_pt_event_type): Use gdb_file_up.
4916         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4917         scoped_fd, and scoped_mmap.
4918
4919 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4920
4921         * common/scoped_mmap.h: New.
4922         * unittests/scoped_mmap-selftest.c: New.
4923         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4924         unittests/scoped_mmap-selftest.c.
4925
4926 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4927
4928         * common/scoped_fd.h: New.
4929         * unittests/scoped_fd-selftest.c: New.
4930         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4931         unittests/scoped_fd-selftest.c.
4932
4933 2018-02-09  Tom Tromey  <tom@tromey.com>
4934
4935         * auto-load.c (auto_load_section_scripts): Use
4936         gdb::unique_xmalloc_ptr.
4937
4938 2018-02-09  Tom Tromey  <tom@tromey.com>
4939
4940         * auto-load.c (execute_script_contents): Use std::string.
4941
4942 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
4943
4944         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4945         Python function, rather than a new command.
4946
4947 2018-02-08  Tom Tromey  <tom@tromey.com>
4948
4949         * solib.c (solib_find_1): Use std::string.
4950         (solib_bfd_fopen): Use unique_xmalloc_ptr.
4951
4952 2018-02-08  Tom Tromey  <tom@tromey.com>
4953
4954         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4955
4956 2018-02-08  Tom Tromey  <tom@tromey.com>
4957
4958         * source.c (find_source_lines): Use gdb::def_vector.
4959
4960 2018-02-08  Tom Tromey  <tom@tromey.com>
4961
4962         * macrocmd.c (struct temporary_macro_definition): New.
4963         (macro_define_command): Use temporary_macro_definition.  Remove
4964         cleanups.
4965         (free_macro_definition_ptr): Remove.
4966
4967 2018-02-08  Tom Tromey  <tom@tromey.com>
4968
4969         * macroexp.c (maybe_expand): Use std::string.
4970
4971 2018-02-08  Tom Tromey  <tom@tromey.com>
4972
4973         * macroexp.c (struct macro_buffer): Add initializers for some
4974         members.
4975         (init_buffer, init_shared_buffer, free_buffer)
4976         (free_buffer_return_text): Remove.
4977         (macro_buffer): New constructors.
4978         (~macro_buffer): New destructor.
4979         (macro_buffer::set_shared): New method.
4980         (macro_buffer::resize_buffer, macro_buffer::appendc)
4981         (macro_buffer::appendmem): Now methods, not free functions.
4982         (set_token, append_tokens_without_splicing, stringify)
4983         (macro_stringify): Update.
4984         (gather_arguments): Change return type.  Remove argc_p argument,
4985         add args_ptr argument.  Use std::vector.
4986         (substitute_args): Remove argc argument.  Accept std::vector.
4987         (expand): Update.  Use std::vector.
4988         (scan, macro_expand, macro_expand_next): Update.
4989
4990 2018-02-08  Tom Tromey  <tom@tromey.com>
4991
4992         * symtab.c (default_collect_symbol_completion_matches_break_on):
4993         Use unique_xmalloc_ptr.
4994         * macroscope.h: (sal_macro_scope, user_macro_scope)
4995         (default_macro_scope): Return unique_xmalloc_ptr.
4996         * macroscope.c (sal_macro_scope, user_macro_scope)
4997         (default_macro_scope): Return unique_xmalloc_ptr.
4998         * macroexp.h (macro_expand, macro_expand_once): Return
4999         unique_xmalloc_ptr.
5000         * macroexp.c (macro_expand, macro_expand_once): Return
5001         unique_xmalloc_ptr.
5002         * macrocmd.c (macro_expand_command, macro_expand_once_command)
5003         (info_macro_command, info_macros_command): Use
5004         unique_xmalloc_ptr.
5005         * compile/compile-c-support.c (write_macro_definitions): Use
5006         unique_xmalloc_ptr.
5007         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5008
5009 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
5010
5011         * value.c (value_static_field): Assign field type instead of
5012         containing type when returning an optimized out value.
5013
5014 2018-02-06  Yao Qi  <yao.qi@linaro.org>
5015
5016         * ft32-tdep.c (ft32_read_pc): Remove.
5017         (ft32_write_pc): Remove.
5018         (ft32_gdbarch_init): Update.
5019         * m32r-tdep.c (m32r_read_pc): Remove.
5020         (m32r_gdbarch_init): Update.
5021         * mep-tdep.c (mep_read_pc): Remove.
5022         (mep_gdbarch_init): Update.
5023         * microblaze-tdep.c (microblaze_write_pc): Remove.
5024         (microblaze_gdbarch_init): Update.
5025         * mn10300-tdep.c (mn10300_read_pc): Remove.
5026         (mn10300_write_pc): Remove.
5027         (mn10300_gdbarch_init): Update.
5028         * moxie-tdep.c (moxie_read_pc): Remove.
5029         (moxie_write_pc): Remove.
5030         (moxie_gdbarch_init): Update.
5031
5032 2018-02-06  Yao Qi  <yao.qi@linaro.org>
5033
5034         * expprint.c (print_subexp_standard): Handle
5035         OP_F77_UNDETERMINED_ARGLIST.
5036         (dump_subexp_body_standard): Likewise.
5037
5038 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
5039
5040         * target-descriptions.c (tdesc_element_visitor) Add empty
5041         implementations.
5042         (tdesc_type): Move make_gdb_type from here.
5043         (tdesc_type_builtin): Likewise.
5044         (tdesc_type_vector): Likewise.
5045         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5046         (make_gdb_type_struct): Move from tdesc_type_with_fields.
5047         (make_gdb_type_union): Likewise.
5048         (make_gdb_type_flags): Likewise.
5049         (make_gdb_type_enum): Likewise.
5050         (make_gdb_type): New function.
5051         (tdesc_register_type): Use static make_gdb_type.
5052
5053 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
5054
5055         * infcmd.c (default_print_one_register_info): Align natural-format
5056         column values consistently one under another.
5057         (pad_to_column): New function.
5058
5059 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
5060
5061         * dwarf2read.c (dwarf2_physname): Move commment.
5062
5063 2018-02-01  Leszek Swirski  <leszeks@google.com>
5064
5065         * varobj.c (varobj_formatted_print_options): Allow recursive
5066         pretty printing if pretty printing is enabled.
5067
5068 2018-02-01  Leszek Swirski  <leszeks@google.com>
5069
5070         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5071         names after a structop as a filename.
5072
5073 2018-02-01  Yao Qi  <yao.qi@linaro.org>
5074
5075         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5076         (arm_record_coproc_data_proc): Likewise.
5077
5078 2018-02-01  Yao Qi  <yao.qi@linaro.org>
5079
5080         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5081
5082 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
5083
5084         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5085         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5086
5087 2018-01-31  Pedro Alves  <palves@redhat.com>
5088
5089         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5090         * inflow.c (child_terminal_save_inferior): Wrap reference to
5091         tcgetpgrp in HAVE_TERMIOS_H.
5092         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5093         _WIN32.
5094         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5095         always iterate over all inferiors.
5096         (gdbsim_cntrl_c): Adjust.
5097         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5098
5099 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
5100
5101         * gdbtypes.c (lookup_array_range_type): Make sure the array's
5102         index type is objfile-owned if the element type is as well.
5103
5104 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
5105
5106         GDB 8.1 released.
5107
5108 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5109
5110         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5111         "features/s390x-linux64.c".
5112         (_initialize_s390_linux_tdep): Remove initialization of tdescs
5113         s390_linux32 and s390x_linux64.
5114         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5115         default tdesc.
5116         * s390-tdep.c: Include "features/s390-linux32.c" and
5117         "features/s390x-linux64.c".
5118         (s390_tdesc_valid): Add check for tdesc_has_registers.
5119         (s390_gdbarch_init): Make sure there is always a valid tdesc.
5120         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5121         tdesc_s390x_linux64.
5122         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5123         tdesc_s390x_linux64 to...
5124         * s390-tdep.h: ...here.
5125
5126 2018-01-30  Pedro Alves  <palves@redhat.com>
5127
5128         PR gdb/13211
5129         * config.in, configure: Regenerate.
5130         * configure.ac: Check for getpgid.
5131         * go32-nat.c (go32_pass_ctrlc): New.
5132         (go32_target): Install it.
5133         * inf-child.c (inf_child_target): Install
5134         child_terminal_save_inferior, child_pass_ctrlc and
5135         child_interrupt.
5136         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5137         (inf_ptrace_target): No longer install it.
5138         * infcmd.c (interrupt_target_1): Adjust.
5139         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5140         (child_interrupt): Declare.
5141         (inferior::terminal_state): New.
5142         * inflow.c (struct terminal_info): Update comments.
5143         (inferior_process_group): Delete.
5144         (terminal_is_ours): Delete.
5145         (gdb_tty_state): New.
5146         (child_terminal_init): Adjust.
5147         (is_gdb_terminal, sharing_input_terminal_1)
5148         (sharing_input_terminal): New functions.
5149         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
5150         Set the process's actual process group in the foreground if
5151         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
5152         mark terminal as the inferior's if not sharing GDB's terminal.
5153         Don't check attach_flag.
5154         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5155         pass down a target_terminal_state.
5156         (child_terminal_save_inferior): New, factored out from ...
5157         (child_terminal_ours_1): ... this.  Handle
5158         target_terminal_state::is_ours_for_output.
5159         (child_interrupt, child_pass_ctrlc): New.
5160         (inflow_inferior_exit): Clear the inferior's terminal_state.
5161         (copy_terminal_info): Copy the inferior's terminal state.
5162         (_initialize_inflow): Remove reference to terminal_is_ours.
5163         * inflow.h (inferior_process_group): Delete.
5164         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5165         * procfs.c (procfs_target): Don't install procfs_interrupt.
5166         (procfs_interrupt): Delete.
5167         * remote.c (remote_serial_quit_handler): Adjust.
5168         (remote_interrupt): Remove ptid parameter.  Adjust.
5169         * target-delegates.c: Regenerate.
5170         * target.c: Include "terminal.h".
5171         (target_terminal::terminal_state): Rename to ...
5172         (target_terminal::m_terminal_state): ... this.
5173         (target_terminal::init): Adjust.
5174         (target_terminal::inferior): Adjust to per-inferior
5175         terminal_state.
5176         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5177         (target_terminal::ours, target_terminal::ours_for_output): Use
5178         target_terminal_is_ours_kind.
5179         (target_interrupt): Remove ptid parameter.  Adjust.
5180         (default_target_pass_ctrlc): Adjust.
5181         * target.h (target_ops::to_terminal_save_inferior): New field.
5182         (target_ops::to_interrupt): Remove ptid_t parameter.
5183         (target_interrupt): Remove ptid_t parameter.  Update comment.
5184         (target_pass_ctrlc): Update comment.
5185         * target/target.h (target_terminal_state): New scoped enum,
5186         factored out of ...
5187         (target_terminal::terminal_state): ... here.
5188         (target_terminal::inferior): Update comments.
5189         (target_terminal::restore_inferior): New.
5190         (target_terminal::is_inferior, target_terminal::is_ours)
5191         (target_terminal::is_ours_for_output): Adjust.
5192         (target_terminal::scoped_restore_terminal_state): Adjust to
5193         rename, and call restore_inferior() instead of inferior().
5194         (target_terminal::scoped_restore_terminal_state::m_state): Change
5195         type.
5196         (target_terminal::terminal_state): Rename to ...
5197         (target_terminal::m_terminal_state): ... this and change type.
5198
5199 2018-01-30  Pedro Alves  <palves@redhat.com>
5200
5201         * linux-nat.c (wait_for_signal): New function.
5202         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5203         directly.
5204         (async_terminal_is_ours)
5205         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5206         (linux_nat_add_target): Don't override
5207         to_terminal_inferior/to_terminal_ours.
5208
5209 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
5210
5211         * remote.c (remote_follow_fork): Don't call "detach_inferior".
5212
5213 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
5214
5215         * dwarf2read.c (free_dwo_files): Add forward-declaration.
5216         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5217         dwarf2_per_objfile_free here.
5218         (dwarf2_per_objfile_free): Remove.
5219         (_initialize_dwarf2_read): Don't register
5220         dwarf2_per_objfile_free as a registry cleanup.
5221
5222 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
5223
5224         Avoid compilation errors in MinGW native builds
5225
5226         The error is triggered by including python-internal.h, and the
5227         error message is:
5228
5229              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5230                       from build-gnulib/import/math.h:27,
5231                       from d:/usr/Python26/include/pyport.h:235,
5232                       from d:/usr/Python26/include/Python.h:58,
5233                       from python/python-internal.h:94,
5234                       from python/py-arch.c:24:
5235              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5236         using ::hypot;
5237                 ^~~~~
5238
5239         This happens because Python headers define 'hypot' to expand t
5240         '_hypot' in the Windows builds.
5241         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5242         'hypoth'.  This avoids a compilation error.
5243
5244 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
5245
5246         * MAINTAINERS (Write After Approval): Fix ordering.
5247
5248 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
5249
5250         * MAINTAINERS (Write After Approval): Add Alan Hayward.
5251
5252 2018-01-26  Alan Modra  <amodra@gmail.com>
5253
5254         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5255         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5256         Remove nop.  Make const.  Comment.
5257         (powerpc32_plt_stub_so_2): New.
5258         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5259         Correct count.  Update uses.
5260         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5261         Move common code reading PLT entry word.  Correct
5262         powerpc32_plt_stub PLT address calculation.
5263         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5264         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5265         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5266         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5267         (ppc64_standard_linkage8): Likewise.
5268         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5269         Correct insns description.
5270         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5271
5272 2018-01-24  Pedro Alves  <palves@redhat.com>
5273
5274         GCC PR libstdc++/83906
5275         * gdbtypes.c (operator==(const dynamic_prop &,
5276         const dynamic_prop &)): New.
5277         (operator==(const range_bounds &, const range_bounds &)): New.
5278         (check_types_equal): Use them instead of memcmp.
5279         * gdbtypes.h (operator==(const dynamic_prop &,
5280         const dynamic_prop &)): Declare.
5281         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5282         (operator==(const range_bounds &, const range_bounds &)): Declare.
5283         (operator!=(const range_bounds &, const range_bounds &)): Declare.
5284
5285 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5286
5287         * s390-linux-tdep.c (s390_record_address_mask)
5288         (s390_record_calc_disp_common, s390_record_calc_disp)
5289         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5290         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5291         (s390_process_record): Move to s390-tdep.c.
5292         (s390_linux_init_abi_any): Adjust.
5293         * s390-tdep.c (s390_record_address_mask)
5294         (s390_record_calc_disp_common, s390_record_calc_disp)
5295         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5296         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5297         (s390_process_record): Moved from s390-linux-tdep.c
5298         (s390_gdbarch_init): Adjust.
5299
5300 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5301
5302         * s390-linux-nat.c (s390-tdep.h): New include.
5303         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5304         (HFILES_NO_SRCDIR): Add s390-tdep.h.
5305         (ALLDEPFILES): Add s390-tdep.c.
5306         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5307         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5308         * s390-tdep.h: ...this.  New file.
5309         * s390-linux-tdep.c (s390-tdep.h): New include.
5310         (_initialize_s390_tdep): Rename to...
5311         (_initialize_s390_linux_tdep): ...this and adjust.
5312         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5313         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5314         s390-tdep.h.
5315         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5316         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5317         (s390_is_partial_instruction, s390_software_single_step)
5318         (is_non_branch_ril, s390_displaced_step_copy_insn)
5319         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5320         (s390_prologue_data, s390_addr, s390_store, s390_load)
5321         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5322         (s390_register_call_saved, s390_guess_tracepoint_registers)
5323         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5324         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5325         (s390_pseudo_register_name, s390_pseudo_register_type)
5326         (s390_pseudo_register_read, s390_pseudo_register_write)
5327         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5328         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5329         (s390_addr_bits_remove, s390_address_class_type_flags)
5330         (s390_address_class_type_flags_to_name)
5331         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5332         (s390_function_arg_float, s390_function_arg_vector)
5333         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5334         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5335         (s390_frame_align, s390_register_return_value, s390_return_value)
5336         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5337         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5338         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5339         (s390_trad_frame_prev_register, s390_unwind_cache)
5340         (s390_prologue_frame_unwind_cache)
5341         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5342         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5343         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5344         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5345         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5346         (s390_frame_base_address, s390_local_base_address)
5347         (s390_frame_base, s390_gcc_target_options)
5348         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5349         (s390_validate_reg_range, s390_tdesc_valid)
5350         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5351         * s390-tdep.c: ...this.  New file.
5352
5353 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5354
5355         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5356         (s390_process_record, s390_gdbarch_tdep_alloc)
5357         (s390_linux_init_abi_any): Use/set new hook.
5358
5359 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5360
5361         * s390-linux-tdep.c (osabi.h): New include.
5362         (s390_linux_init_abi_31, s390_linux_init_abi_64)
5363         (s390_linux_init_abi_any): New functions.
5364         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5365
5366 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5367
5368         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5369         tdesc_has_registers check
5370
5371 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5372
5373         * s390-linux-tdep.c (s390_tdesc_valid): New function.
5374         (s390_validate_reg_range): New macro.
5375         (s390_gdbarch_init): Adjust.
5376
5377 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5378
5379         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5380         (s390_gdbarch_tdep_alloc): Adjust.
5381         (s390_gdbarch_init): Adjust.
5382
5383 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5384
5385         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5386         <have_tdb>: Change type to bool.
5387         (s390_gdbarch_tdep_alloc): Adjust.
5388         (s390_gdbarch_init): Adjust.
5389
5390 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5391
5392         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5393         (gdbarch_tdep) <have_upper, have_vx>: New fields.
5394         (s390_gdbarch_tdep_alloc): New function.
5395         (s390_gdbarch_init): Allocate tdep at start and use its fields
5396         instead of separate variables.
5397
5398 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5399
5400         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5401         when looking for cached gdbarch and add comment for remaining.
5402
5403 2018-01-22  Pedro Alves  <palves@redhat.com>
5404             Sergio Durigan Junior  <sergiodj@redhat.com>
5405
5406         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5407         case.
5408
5409 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
5410
5411         * MAINTAINERS: Update my company e-mail address.
5412
5413 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5414
5415         * regcache.c (cooked_write_test): New function.
5416         (_initialize_regcache): Register the test.
5417
5418 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5419
5420         * ia64-tdep.c (ia64_pseudo_register_read): Call
5421         regcache->cooked_read instead of regcache_cooked_read_unsigned.
5422         * m32c-tdep.c (m32c_cat_read): Likewise.
5423         (m32c_r3r2r1r0_read): Likewise.
5424         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5425         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5426
5427 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5428
5429         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5430         method raw_read instead of regcache_raw_read.
5431         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5432         * arm-tdep.c (arm_neon_quad_read): Likewise.
5433         * avr-tdep.c (avr_pseudo_register_read): Likewise.
5434         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5435         * frv-tdep.c (frv_pseudo_register_read): Likewise.
5436         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5437         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5438         (i386_pseudo_register_read_into_value): Likewise.
5439         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5440         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5441         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5442         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5443         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5444         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
5445         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5446         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
5447         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5448
5449 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5450
5451         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5452         * configure.tgt: Remove target mt.
5453         * mt-tdep.c: Remove.
5454         * regcache.c (cooked_read_test): Remove the check for mt.
5455
5456 2018-01-22  Yao Qi  <yao.qi@linaro.org>
5457
5458         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5459         instead of gdbarch_pseudo_register_read_value.
5460
5461 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
5462
5463         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5464         language is Ada.
5465
5466 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
5467
5468         * linespec.c (create_sals_line_offset): Remove code that preserved
5469         the symtab_and_line's line number.
5470
5471 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5472
5473         * varobj.c (varobj_create): Don't set valid_block when creating a
5474         floating varobj.
5475
5476 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5477
5478         * varobj.c (varobj_create): Remove out of date comment.
5479
5480 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5481
5482         PR mi/20395
5483         * ada-exp.y (write_var_from_sym): Pass extra parameter when
5484         updating innermost block.
5485         * parse.c (innermost_block_tracker::update): Take extra type
5486         parameter, and check types match before updating innermost block.
5487         (write_dollar_variable): Update innermost block for registers.
5488         * parser-defs.h (enum innermost_block_tracker_type): New enum.
5489         (innermost_block_tracker::innermost_block_tracker): Initialise
5490         m_types member.
5491         (innermost_block_tracker::reset): Take type parameter.
5492         (innermost_block_tracker::update): Take type parameter, and pass
5493         type through as needed.
5494         (innermost_block_tracker::m_types): New member.
5495         * varobj.c (varobj_create): Pass type when reseting innermost
5496         block.
5497
5498 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5499
5500         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5501         * ada-lang.c (resolve_subexp): Likewise.
5502         * breakpoint.c (set_breakpoint_condition) Likewise.
5503         (watch_command_1) Likewise.
5504         * c-exp.y (variable): Likewise.
5505         * d-exp.y (PrimaryExpression): Likewise.
5506         * f-exp.y (variable): Likewise.
5507         * go-exp.y (variable): Likewise.
5508         * m2-exp.y (variable): Likewise.
5509         * objfiles.c (objfile::~objfile): Likewise.
5510         * p-exp.y (variable): Likewise.
5511         * parse.c (innermost_block): Change type.
5512         * parser-defs.h (class innermost_block_tracker): New.
5513         (innermost_block): Change to innermost_block_tracker.
5514         * printcmd.c (display_command): Switch to innermost_block API.
5515         (do_one_display): Likewise.
5516         * rust-exp.y (do_one_display): Likewise.
5517         * symfile.c (clear_symtab_users): Likewise.
5518         * varobj.c (varobj_create): Switch to innermost_block API, replace
5519         use of innermost_block with block stored on varobj object.
5520
5521 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
5522
5523         * expression.h (innermost_block): Remove declaration.
5524         * varobj.c: Add 'parser-defs.h' include.
5525
5526 2018-01-19  Tom Tromey  <tom@tromey.com>
5527
5528         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5529         symbols in the static and global blocks.
5530
5531 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
5532
5533         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5534         gdb_ptrace.h, and move including gdb_wait.h ...
5535         * nat/linux-ptrace.h: ... to here.
5536
5537 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
5538
5539         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5540         inf_ptrace_detach_success.
5541         (inf_ptrace_detach_success): Add inferior parameter, use it
5542         instead of inferior_ptid, pass it to detach_inferior.
5543         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5544         parameter.
5545         * inferior.c (detach_inferior): Add overload that takes an
5546         inferior object.
5547         * inferior.h (detach_inferior): Likewise.
5548         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5549         use inferior_ptid, adjust call to inf_ptrace_detach_success.
5550         * linux-thread-db.c (thread_db_detach): Use inf parameter.
5551
5552 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
5553
5554         * target.h (struct target_ops) <to_detach>: Add inferior
5555         parameter.
5556         (target_detach): Likewise.
5557         * target.c (dispose_inferior): Pass inferior down.
5558         (target_detach): Pass inferior down.  Assert that it is equal to
5559         the current inferior.
5560         * aix-thread.c (aix_thread_detach): Pass inferior down.
5561         * corefile.c (core_file_command): Pass current_inferior() down.
5562         * corelow.c (core_detach): Add inferior parameter.
5563         * darwin-nat.c (darwin_detach): Likewise.
5564         * gnu-nat.c (gnu_detach): Likewise.
5565         * inf-ptrace.c (inf_ptrace_detach): Likewise.
5566         * infcmd.c (detach_command): Pass current_inferior() down to
5567         target_detach.
5568         * infrun.c (follow_fork_inferior): Pass parent_inf to
5569         target_detach.
5570         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5571         target_detach.
5572         * linux-nat.c (linux_nat_detach): Add inferior parameter.
5573         * linux-thread-db.c (thread_db_detach): Likewise.
5574         * nto-procfs.c (procfs_detach): Likewise.
5575         * procfs.c (procfs_detach): Likewise.
5576         * record.c (record_detach): Likewise.
5577         * record.h (struct inferior): Forward-declare.
5578         (record_detach): Add inferior parameter.
5579         * remote-sim.c (gdbsim_detach): Likewise.
5580         * remote.c (remote_detach_1): Likewise.
5581         (remote_detach): Likewise.
5582         (extended_remote_detach): Likewise.
5583         * sol-thread.c (sol_thread_detach): Likewise.
5584         * target-debug.h (target_debug_print_inferior_p): New macro.
5585         * target-delegates.c: Re-generate.
5586         * top.c (kill_or_detach): Pass inferior down to target_detach.
5587         * windows-nat.c (windows_detach): Add inferior parameter.
5588
5589 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
5590
5591         * target.h (struct target_ops) <to_detach>: Remove args
5592         parameter.
5593         (target_detach): Likewise.
5594         * target.c (dispose_inferior): Adjust.
5595         (target_detach): Remove args parameter, adjust.
5596         * aix-thread.c (aix_thread_detach): Adjust.
5597         * corefile.c (core_file_command): Adjust.
5598         * corelow.c (core_detach): Adjust.
5599         * darwin-nat.c (darwin_detach): Adjust.
5600         * gnu-nat.c (gnu_detach): Adjust.
5601         * inf-ptrace.c (inf_ptrace_detach): Adjust.
5602         * infcmd.c (detach_command): Adjust
5603         * infrun.c (follow_fork_inferior): Adjust.
5604         (handle_vfork_child_exec_or_exit): Adjust.
5605         * linux-fork.c (linux_fork_detach): Remove args parameter.
5606         * linux-fork.h (linux_fork_detach): Likewise.
5607         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5608         * linux-thread-db.c (thread_db_detach): Likewise.
5609         * nto-procfs.c (procfs_detach): Likewise.
5610         * procfs.c (procfs_detach): Likewise.
5611         (do_detach): Remove signo parameter.
5612         * record.c (record_detach): Remove args parameter.
5613         * record.h (record_detach): Likewise.
5614         * remote-sim.c (gdbsim_detach): Likewise.
5615         * remote.c (remote_detach_1): Likewise.
5616         (remote_detach): Likewise.
5617         (extended_remote_detach): Likewise.
5618         * sol-thread.c (sol_thread_detach): Likewise.
5619         * target-delegates.c: Re-generate.
5620         * top.c (struct qt_args) <args>: Remove field.
5621         (kill_or_detach): Don't pass args.
5622         (quit_force): Don't set args.
5623         * windows-nat.c (windows_detach): Remove args parameter.
5624
5625 2018-01-19  Yao Qi  <yao.qi@linaro.org>
5626
5627         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5628         (arm_linux_init_abi): Install it.
5629
5630 2018-01-19  Yao Qi  <yao.qi@linaro.org>
5631
5632         * osabi.c (gdb_osabi_names): Extend the regexp for
5633         arm-linux-gnueabihf.
5634
5635 2018-01-18  Yao Qi  <yao.qi@linaro.org>
5636
5637         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5638         m_abbrevs.
5639         (abbrev_table::add_abbrev): Update.
5640         (abbrev_table::lookup_abbrev): Update.
5641
5642 2018-01-18  Yao Qi  <yao.qi@linaro.org>
5643
5644         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5645
5646 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
5647
5648         * compile/compile.c (compile_to_object): Convert "triplet_rx"
5649         to "std::string".
5650
5651 2018-01-17  Tom Tromey  <tom@tromey.com>
5652
5653         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
5654
5655 2018-01-17  Tom Tromey  <tom@tromey.com>
5656
5657         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5658         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5659         (create_array_type_with_stride): Update.
5660         * dwarf2read.c (set_die_type): Update.
5661
5662 2018-01-17  Tom Tromey  <tom@tromey.com>
5663
5664         * dwarf2read.c (delayed_method_info): Remove typedef.
5665         (dwarf2_cu::method_info): Now a std::vector.
5666         (add_to_method_list): Update.
5667         (free_delayed_list): Remove.
5668         (compute_delayed_physnames): Update.
5669         (process_full_comp_unit, process_full_type_unit): Clear the method
5670         list.  Remove cleanups.
5671         (psymtab_include_file_name): Add name_holder parameter.  Use
5672         unique_xmalloc_ptr.
5673         (dwarf_decode_lines): Update.
5674
5675 2018-01-17  Tom Tromey  <tom@tromey.com>
5676             Simon Marchi  <simon.marchi@ericsson.com>
5677
5678         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5679         (dwarf2_per_objfile::free_cached_comp_units)
5680         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5681         (init_cutu_and_read_dies_no_follow): Update.
5682         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5683         (dwarf2_cu::~dwarf2_cu): New.
5684         (free_heap_comp_unit, free_stack_comp_unit): Remove.
5685         (age_cached_comp_units, free_one_cached_comp_unit): Update.
5686
5687 2018-01-17  Tom Tromey  <tom@tromey.com>
5688             Simon Marchi  <simon.marchi@ericsson.com>
5689
5690         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5691         (struct die_reader_specs) <abbrev_table>: New member.
5692         (struct abbrev_table): Add constructor.
5693         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5694         <abbrev_obstack>: Now an auto_obstack.
5695         (abbrev_table_up): New typedef.
5696         (init_cu_die_reader): Add abbrev_table parameter.
5697         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5698         Add result_dwo_abbrev_table.
5699         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5700         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5701         Update.
5702         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5703         parameter.
5704         (skip_children): Update.
5705         (abbrev_table::alloc_abbrev): Rename from
5706         abbrev_table_alloc_abbrev.
5707         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5708         (abbrev_table::lookup_abbrev): Rename from
5709         abbrev_table_lookup_abbrev.
5710         (abbrev_table_read_table): Return abbrev_table_up.
5711         (abbrev_table_free, abbrev_table_free_cleanup)
5712         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5713         (load_partial_dies): Update.
5714
5715 2018-01-17  Tom Tromey  <tom@tromey.com>
5716
5717         * dwarf2read.c (dwarf2_compute_name): Update comment.
5718         (read_func_scope, read_variable): Update.
5719         (new_symbol): Remove.
5720         (new_symbol_full): Rename to new_symbol.
5721
5722 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
5723
5724         PR gdb/16577
5725         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5726         a warning instead of throwing an error, set section size to 0 and return
5727         NULL.
5728         * gdb_bfd.h (gdb_bfd_map_section): Update description.
5729
5730 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
5731
5732         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5733         std::string.
5734         (linux_ptrace_attach_fail_reason_string): Likewise.
5735         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5736         Likewise.
5737         (linux_ptrace_attach_fail_reason_string): Likewise.
5738         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5739
5740 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
5741
5742         * linux-nat.c (linux_nat_attach): Remove xstrdup.
5743
5744 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
5745
5746         PR gdb/21559
5747         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5748         checking for fs_base/gs_base fields in struct user_regs_struct.
5749         * configure: Regenerate.
5750
5751 2018-01-17  Yao Qi  <yao.qi@linaro.org>
5752
5753         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5754         function.
5755         (aarch64_linux_init_abi): Install it to gdbarch hook
5756         gcc_target_options.
5757
5758 2018-01-15  Pedro Alves  <palves@redhat.com>
5759
5760         * common/signals-state-save-restore.c
5761         (save_original_signals_state): Fix typos.
5762
5763 2017-01-12  Tom Tromey  <tom@tromey.com>
5764             Sergio Durigan Junior  <sergiodj@redhat.com>
5765
5766         * Makefile.in (install-only): Install gdb-add-index.
5767
5768 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
5769
5770         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5771
5772 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5773
5774         * infrun.c (keep_going_pass_signal): Clear step-over info when
5775         insert_breakpoints fails.
5776
5777 2018-01-11  Pedro Alves  <palves@redhat.com>
5778
5779         PR gdb/22583
5780         * infrun.c (resume): Rename to ...
5781         (resume_1): ... this.
5782         (resume): Reimplement as wrapper around resume_1.
5783
5784 2018-01-11  Pedro Alves  <palves@redhat.com>
5785
5786         PR remote/22597
5787         * remote.c (remote_parse_stop_reply): Default to the last-set
5788         general thread instead of to 'magic_null_ptid'.
5789
5790 2018-01-10  Pedro Alves  <palves@redhat.com>
5791
5792         * language.h (language_get_symbol_name_matcher): Rename ...
5793         (get_symbol_name_matcher): ... this.
5794         * language.c (language_get_symbol_name_matcher): Ditto.
5795         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5796         callers adjusted.
5797
5798 2018-01-10  Pedro Alves  <palves@redhat.com>
5799
5800         PR gdb/22670
5801         * dwarf2read.c
5802         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5803         Adjust to use language_get_symbol_name_matcher instead of
5804         language_defn::la_get_symbol_name_matcher.
5805         * language.c (language_get_symbol_name_matcher): If in Ada mode
5806         and the lookup name is a verbatim match, return Ada's matcher.
5807         * language.h (language_get_symbol_name_matcher): Adjust comment.
5808         (ada_lookup_name_info::verbatim_p):: New method.
5809
5810 2018-01-10  Pedro Alves  <palves@redhat.com>
5811
5812         PR gdb/22670
5813         * ada-lang.c (ada_collect_symbol_completion_matches): If the
5814         minsym's language is language_auto or language_cplus, pass down
5815         language_ada instead.
5816         * symtab.c (compare_symbol_name): Don't frob symbol language here.
5817
5818 2018-01-10  Pedro Alves  <palves@redhat.com>
5819
5820         PR gdb/22670
5821         * minsyms.c (linkage_name_str): New function.
5822         (iterate_over_minimal_symbols): Use it.
5823
5824 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5825
5826         * NEWS: Document that 'info proc' now works on FreeBSD.
5827
5828 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5829
5830         * configure.ac: Check for kinfo_getfile in libutil.
5831         * configure: Regenerate.
5832         * config.in: Regenerate.
5833         * fbsd-nat.c: Include "fbsd-tdep.h".
5834         (fbsd_fetch_cmdline): New.
5835         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5836         rather than calling error.
5837         (fbsd_info_proc): New.
5838         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5839         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5840         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5841
5842 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5843
5844         * fbsd-nat.c (struct free_deleter): Remove.
5845         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5846
5847 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5848
5849         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5850         NULL for an empty pathname.
5851
5852 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5853
5854         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5855         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5856         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5857         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5858         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5859         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5860         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5861         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5862         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5863         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5864         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5865         (fbsd_core_fetch_timeval, fbsd_print_sigset)
5866         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5867         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
5868         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5869
5870 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
5871
5872         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5873         (gnu_xfer_auxv): New function.
5874         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5875         TARGET_OBJECT_AUXV.
5876
5877 2018-01-08  Yao Qi  <yao.qi@linaro.org>
5878             Simon Marchi  <simon.marchi@ericsson.com>
5879
5880         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5881         common/selftest.c.
5882         (COMMON_OBS): Remove selftest.o.
5883         * configure.ac: Append selftest-arch.c and common/selftest.c to
5884         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
5885         * configure: Re-generated.
5886         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5887         GDB_SELF_TEST.
5888         (maintenance_info_selftests): Likewise.
5889
5890 2018-01-08  Xavier Roirand  <roirand@adacore.com>
5891
5892         * ada-valprint.c (val_print_packed_array_elements): Use
5893         proper number of elements when printing an array indexed
5894         by an enumeration type.
5895
5896 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
5897
5898         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5899         (dw2_get_file_names_reader): Adjust.
5900         (lookup_dwo_signatured_type): Adjust.
5901         (lookup_dwp_signatured_type): Adjust.
5902         (lookup_signatured_type): Adjust.
5903         (create_type_unit_group): Adjust.
5904         (get_type_unit_group): Adjust.
5905         (process_psymtab_comp_unit_reader): Adjust.
5906         (build_type_psymtabs_reader): Adjust.
5907         (scan_partial_symbols): Adjust.
5908         (add_partial_symbol): Adjust.
5909         (add_partial_subprogram): Adjust.
5910         (peek_die_abbrev): Adjust.
5911         (fixup_go_packaging): Adjust.
5912         (process_imported_unit_die): Adjust.
5913         (dwarf2_compute_name): Adjust.
5914         (dwarf2_physname): Adjust.
5915         (read_import_statement): Adjust.
5916         (handle_DW_AT_stmt_list): Adjust.
5917         (read_file_scope): Adjust.
5918         (read_func_scope): Adjust.
5919         (read_lexical_block_scope): Adjust.
5920         (read_call_site_scope): Adjust.
5921         (read_variable): Adjust.
5922         (dwarf2_rnglists_process): Adjust.
5923         (dwarf2_ranges_process): Adjust.
5924         (dwarf2_ranges_read): Adjust.
5925         (dwarf2_get_pc_bounds): Adjust.
5926         (dwarf2_record_block_ranges): Adjust.
5927         (dwarf2_add_field): Adjust.
5928         (dwarf2_add_member_fn): Adjust.
5929         (read_structure_type): Adjust.
5930         (process_structure_scope): Adjust.
5931         (read_enumeration_type): Adjust.
5932         (read_array_type): Adjust.
5933         (mark_common_block_symbol_computed): Adjust.
5934         (read_common_block): Adjust.
5935         (read_namespace_type): Adjust.
5936         (read_namespace): Adjust.
5937         (read_module_type): Adjust.
5938         (read_tag_pointer_type): Adjust.
5939         (read_tag_ptr_to_member_type): Adjust.
5940         (read_tag_string_type): Adjust.
5941         (read_subroutine_type): Adjust.
5942         (read_typedef): Adjust.
5943         (read_base_type): Adjust.
5944         (attr_to_dynamic_prop): Adjust.
5945         (read_subrange_type): Adjust.
5946         (read_unspecified_type): Adjust.
5947         (dwarf2_read_abbrevs): Adjust.
5948         (load_partial_dies): Adjust.
5949         (read_partial_die): Adjust.
5950         (find_partial_die): Adjust.
5951         (guess_partial_die_structure_name): Adjust.
5952         (fixup_partial_die): Adjust.
5953         (read_attribute_value): Adjust.
5954         (read_addr_index): Adjust.
5955         (read_addr_index_from_leb128): Adjust.
5956         (read_str_index): Adjust.
5957         (dwarf2_string_attr): Adjust.
5958         (get_debug_line_section): Adjust.
5959         (dwarf_decode_line_header): Adjust.
5960         (lnp_state_machine::check_line_address): Adjust.
5961         (dwarf_decode_lines_1): Adjust.
5962         (dwarf_decode_lines): Adjust.
5963         (dwarf2_start_symtab): Adjust.
5964         (var_decode_location): Adjust.
5965         (new_symbol_full): Adjust.
5966         (dwarf2_const_value_data): Adjust.
5967         (dwarf2_const_value_attr): Adjust.
5968         (dwarf2_const_value): Adjust.
5969         (die_type): Adjust.
5970         (die_containing_type): Adjust.
5971         (build_error_marker_type): Adjust.
5972         (lookup_die_type): Adjust.
5973         (guess_full_die_structure_name): Adjust.
5974         (anonymous_struct_prefix): Adjust.
5975         (determine_prefix): Adjust.
5976         (dwarf2_name): Adjust.
5977         (follow_die_ref_or_sig): Adjust.
5978         (follow_die_offset): Adjust.
5979         (follow_die_ref): Adjust.
5980         (follow_die_sig_1): Adjust.
5981         (follow_die_sig): Adjust.
5982         (get_signatured_type): Adjust.
5983         (get_DW_AT_signature_type): Adjust.
5984         (decode_locdesc): Adjust.
5985         (dwarf_decode_macros): Adjust.
5986         (cu_debug_loc_section): Adjust.
5987         (fill_in_loclist_baton): Adjust.
5988         (dwarf2_symbol_mark_computed): Adjust.
5989         (init_one_comp_unit): Don't assign
5990         dwarf2_cu::dwarf2_per_objfile.
5991         (set_die_type): Adjust.
5992
5993 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5994
5995         * dwarf2read.c (struct mapped_debug_names): Add constructor.
5996         <dwarf2_per_objfile>: New field.
5997         (dwarf2_per_objfile): Remove global.
5998         (get_dwarf2_per_objfile): New function.
5999         (set_dwarf2_per_objfile): New function.
6000         (dwarf2_build_psymtabs_hard): Change objfile parameter to
6001         dwarf2_per_objfile.
6002         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6003         (read_abbrev_offset): Likewise.
6004         (read_indirect_string): Likewise.
6005         (read_indirect_line_string): Likewise.
6006         (read_indirect_string_at_offset): Likewise.
6007         (read_indirect_string_from_dwz): Likewise.
6008         (dwarf2_find_containing_comp_unit): Change objfile parameter to
6009         dwarf2_per_objfile.
6010         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6011         (create_all_comp_units): Change objfile parameter to
6012         dwarf2_per_objfile.
6013         (create_all_type_units): Likewise.
6014         (process_queue): Add dwarf2_per_objfile parameter.
6015         (read_and_check_comp_unit_head): Likewise.
6016         (lookup_dwo_unit_in_dwp): Likewise.
6017         (get_dwp_file): Likewise.
6018         (process_cu_includes): Likewise.
6019         (struct free_dwo_file_cleanup_data): New struct.
6020         (dwarf2_has_info): Use get_dwarf2_per_objfile and
6021         set_dwarf2_per_objfile.
6022         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6023         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6024         context, adjust calls.
6025         (dw2_instantiate_symtab): Likewise.
6026         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6027         (dw2_get_cu): Likewise.
6028         (create_cu_from_index_list): Change objfile parameter to
6029         dwarf2_per_objfile.
6030         (create_cus_from_index_list): Get dwarf2_per_objfile from
6031         context, adjust calls.
6032         (create_cus_from_index): Likewise.
6033         (create_signatured_type_table_from_index): Change objfile
6034         parameter to dwarf2_per_objfile.
6035         (create_signatured_type_table_from_debug_names): Change objfile
6036         parameter to dwarf2_per_objfile.
6037         (create_addrmap_from_index): Likewise.
6038         (create_addrmap_from_aranges): Likewise.
6039         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6040         (dw2_setup): Remove.
6041         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6042         context.
6043         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6044         get_dwarf2_per_objfile.
6045         (dw2_forget_cached_source_info): Likewise.
6046         (dw2_map_symtabs_matching_filename): Likewise.
6047         (struct dw2_symtab_iterator) <index>: Remove.
6048         <dwarf2_per_objfile>: New field.
6049         (dw2_symtab_iter_init): Replace index parameter with
6050         dwarf2_per_objfile.
6051         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6052         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6053         (dw2_print_stats): Likewise.
6054         (dw2_dump): Likewise.
6055         (dw2_expand_symtabs_for_function): Likewise.
6056         (dw2_expand_all_symtabs): Likewise.
6057         (dw2_expand_symtabs_with_fullname): Likewise.
6058         (dw2_expand_marked_cus): Replace index and objfile parameters
6059         with dwarf2_per_objfile.
6060         (dw_expand_symtabs_matching_file_matcher): Add
6061         dwarf2_per_objfile parameter and adjust calls.
6062         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6063         adjust calls.
6064         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6065         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6066         adjust calls.
6067         (create_cus_from_debug_names_list): Replace objfile parameter
6068         with dwarf2_per_objfile and adjust calls.
6069         (create_cus_from_debug_names): Likewise.
6070         (dwarf2_read_debug_names): Likewise.
6071         (mapped_debug_names::namei_to_name): Adjust call.
6072         (dw2_debug_names_iterator::next): Likewise.
6073         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6074         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6075         (dw2_debug_names_dump): Likewise.
6076         (dw2_debug_names_expand_symtabs_for_function): Likewise.
6077         (dw2_debug_names_expand_symtabs_matching): Likewise.
6078         (dwarf2_initialize_objfile): Likewise.
6079         (dwarf2_build_psymtabs): Likewise.
6080         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6081         this_cu.
6082         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6083         (read_and_check_comp_unit_head): Likewise.
6084         (read_abbrev_offset): Likewise.
6085         (create_debug_type_hash_table): Likewise.
6086         (create_debug_types_hash_table): Likewise.
6087         (create_all_type_units): Replace objfile parameter with
6088         dwarf2_per_objfile.
6089         (add_type_unit): Add dwarf2_per_objfile parameter.
6090         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6091         with dwarf2_per_objfile.
6092         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6093         (lookup_dwp_signatured_type): Likewise.
6094         (lookup_signatured_type): Likewise.
6095         (read_cutu_die_from_dwo): Likewise.
6096         (init_tu_and_read_dwo_dies): Likewise.
6097         (init_cutu_and_read_dies): Likewise.
6098         (init_cutu_and_read_dies_no_follow): Likewise.
6099         (allocate_type_unit_groups_table): Add objfile parameter.
6100         (create_type_unit_group): Use dwarf2_per_objfile from cu.
6101         (get_type_unit_group): Likewise.
6102         (process_psymtab_comp_unit): Update call.
6103         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6104         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6105         (print_tu_stats): Likewise.
6106         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6107         in void* parameter.
6108         (build_type_psymtabs): Change objfile parameter to
6109         dwarf2_per_objfile.
6110         (process_skeletonless_type_unit): Use dwarf2_per_objfile
6111         passed in void* parameter.
6112         (process_skeletonless_type_units): Change objfile parameter to
6113         dwarf2_per_objfile.
6114         (set_partial_user): Likewise.
6115         (dwarf2_build_psymtabs_hard): Likewise.
6116         (read_comp_units_from_section): Likewise.
6117         (create_all_comp_units): Likewise.
6118         (scan_partial_symbols): Update calls.
6119         (add_partial_symbol): Likewise.
6120         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6121         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6122         (process_queue): Add dwarf2_per_objfile parameter.
6123         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6124         (compute_compunit_symtab_includes): Likewise.
6125         (process_cu_includes): Add dwarf2_per_objfile parameter.
6126         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6127         (process_full_type_unit): Likewise.
6128         (process_imported_unit_die): Update call.
6129         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6130         (read_file_scope): Likewise.
6131         (allocate_dwo_file_hash_table): Add objfile parameter.
6132         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6133         (create_cus_hash_table): Likewise.
6134         (create_dwp_hash_table): Likewise.
6135         (create_dwo_unit_in_dwp_v1): Likewise.
6136         (create_dwp_v2_section): Likewise.
6137         (create_dwo_unit_in_dwp_v2): Likewise.
6138         (lookup_dwo_unit_in_dwp): Likewise.
6139         (try_open_dwop_file): Likewise.
6140         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6141         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6142         cleanup to include a reference to dwarf2_per_objfile.
6143         (open_dwp_file): Add dwarf2_per_objfile parameter.
6144         (open_and_init_dwp_file): Likewise.
6145         (get_dwp_file): Likewise.
6146         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6147         (queue_and_load_all_dwo_tus): Update call.
6148         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6149         data.
6150         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6151         (dwarf2_ranges_process): Likewise.
6152         (dwarf2_get_pc_bounds): Likewise.
6153         (mark_common_block_symbol_computed): Likewise.
6154         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6155         (dwarf2_read_abbrevs): Update call.
6156         (read_partial_die): Use dwarf2_per_objfile from cu.
6157         (find_partial_die): Likewise.
6158         (fixup_partial_die): Likewise.
6159         (read_attribute_value): Likewise.
6160         (read_indirect_string_at_offset_from): Add objfile parameter.
6161         (read_indirect_string_at_offset): Add dwarf2_per_objfile
6162         parameter.
6163         (read_indirect_string_from_dwz): Add objfile parameter.
6164         (read_indirect_string): Add objfile parameter.
6165         (read_addr_index_1): Add dwarf2_per_objfile parameter.
6166         (read_addr_index): Use dwarf2_per_objfile from cu.
6167         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6168         call dw2_setup.
6169         (read_str_index): Use dwarf2_per_objfile from cu.
6170         (get_debug_line_section): Likewise.
6171         (read_formatted_entries): Add dwarf2_per_objfile parameter.
6172         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6173         (new_symbol_full): Use dwarf2_per_objfile from cu.
6174         (build_error_marker_type): Likewise.
6175         (lookup_die_type): Likewise.
6176         (determine_prefix): Likewise.
6177         (follow_die_offset): Likewise.
6178         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6179         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6180         (dwarf2_fetch_die_type_sect_off): Likewise.
6181         (dwarf2_get_die_type): Likewise.
6182         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6183         (get_signatured_type): Likewise.
6184         (get_DW_AT_signature_type): Likewise.
6185         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6186         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6187         (cu_debug_loc_section): Likewise.
6188         (fill_in_loclist_baton): Likewise.
6189         (dwarf2_symbol_mark_computed): Likewise.
6190         (dwarf2_find_containing_comp_unit): Change objfile parameter to
6191         dwarf2_per_objfile.
6192         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6193         parameter.
6194         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6195         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6196         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6197         (set_die_type): Use dwarf2_free_objfile from cu.
6198         (get_die_type_at_offset): Likewise.
6199         (dwarf2_per_objfile_free): Don't assign global variable.
6200         (debug_names) <constructor>: Add dwarf2_per_objfile
6201         parameter, update m_debugstrlookup construction.
6202         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6203         parameter.
6204         <m_dwarf2_per_objfile>: New field.
6205         <lookup>: Use m_dwarf2_per_objfile.
6206         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6207         (psyms_seen_size): Likewise.
6208         (write_gdbindex): Replace objfile parameter with
6209         dwarf2_per_objfile.
6210         (write_debug_names): Likewise.
6211         (write_psymtabs_to_index): Likewise.
6212         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6213         calls.
6214
6215 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
6216
6217         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6218         <dwarf2_per_objfile>: New field.
6219         (struct dwarf2_per_cu_data) <objfile>: Remove.
6220         <dwarf2_per_objfile>: New field.
6221         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6222         of objfile.
6223         (create_signatured_type_table_from_index): Likewise.
6224         (create_debug_type_hash_table): Likewise.
6225         (fill_in_sig_entry_from_dwo_entry): Likewise.
6226         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6227         (create_type_unit_group): Assign dwarf2_per_objfile instead of
6228         objfile.
6229         (create_partial_symtab): Access objfile through
6230         dwarf2_per_objfile.
6231         (process_psymtab_comp_unit_reader): Likewise.
6232         (read_comp_units_from_section): Likewise.
6233         (scan_partial_symbols): Likewise.
6234         (add_partial_symbol): Likewise.
6235         (add_partial_subprogram): Likewise.
6236         (peek_die_abbrev): Likewise.
6237         (fixup_go_packaging): Likewise.
6238         (process_full_comp_unit): Likewise.
6239         (process_full_type_unit): Likewise.
6240         (process_imported_unit_die): Likewise.
6241         (dwarf2_compute_name): Likewise.
6242         (dwarf2_physname): Likewise.
6243         (read_import_statement): Likewise.
6244         (create_cus_hash_table): Assign dwarf2_physname instead of
6245         objfile.
6246         (read_func_scope): Access objfile through dwarf2_per_objfile.
6247         (read_lexical_block_scope): Likewise.
6248         (read_call_site_scope): Likewise.
6249         (read_variable): Likewise.
6250         (dwarf2_rnglists_process): Likewise.
6251         (dwarf2_ranges_process): Likewise.
6252         (dwarf2_ranges_read): Likewise.
6253         (dwarf2_record_block_ranges): Likewise.
6254         (dwarf2_add_field): Likewise.
6255         (dwarf2_add_member_fn): Likewise.
6256         (read_structure_type): Likewise.
6257         (process_structure_scope): Likewise.
6258         (read_enumeration_type): Likewise.
6259         (read_array_type): Likewise.
6260         (read_common_block): Likewise.
6261         (read_namespace_type): Likewise.
6262         (read_namespace): Likewise.
6263         (read_module_type): Likewise.
6264         (read_tag_pointer_type): Likewise.
6265         (read_tag_ptr_to_member_type): Likewise.
6266         (read_tag_string_type): Likewise.
6267         (read_subroutine_type): Likewise.
6268         (read_typedef): Likewise.
6269         (read_base_type): Likewise.
6270         (attr_to_dynamic_prop): Likewise.
6271         (read_subrange_type): Likewise.
6272         (read_unspecified_type): Likewise.
6273         (load_partial_dies): Likewise.
6274         (read_partial_die): Likewise.
6275         (find_partial_die): Likewise.
6276         (guess_partial_die_structure_name): Likewise.
6277         (fixup_partial_die): Likewise.
6278         (read_attribute_value): Likewise.
6279         (read_addr_index_from_leb128): Likewise.
6280         (dwarf2_read_addr_index): Likewise.
6281         (dwarf2_string_attr): Likewise.
6282         (lnp_state_machine::check_line_address): Likewise.
6283         (dwarf_decode_lines_1): Likewise.
6284         (dwarf_decode_lines): Likewise.
6285         (dwarf2_start_symtab): Likewise.
6286         (var_decode_location): Likewise.
6287         (new_symbol_full): Likewise.
6288         (dwarf2_const_value_data): Likewise.
6289         (dwarf2_const_value_attr): Likewise.
6290         (dwarf2_const_value): Likewise.
6291         (die_type): Likewise.
6292         (die_containing_type): Likewise.
6293         (lookup_die_type): Likewise.
6294         (guess_full_die_structure_name): Likewise.
6295         (anonymous_struct_prefix): Likewise.
6296         (dwarf2_name): Likewise.
6297         (follow_die_ref_or_sig): Likewise.
6298         (follow_die_offset): Likewise.
6299         (follow_die_ref): Likewise.
6300         (dwarf2_fetch_die_loc_sect_off): Likewise.
6301         (dwarf2_fetch_constant_bytes): Likewise.
6302         (dwarf2_fetch_die_type_sect_off): Likewise.
6303         (dwarf2_get_die_type): Likewise.
6304         (follow_die_sig): Likewise.
6305         (decode_locdesc): Likewise.
6306         (dwarf2_per_cu_objfile): Likewise.
6307         (dwarf2_per_cu_text_offset): Likewise.
6308         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6309         objfile.
6310         (set_die_type): Access objfile through
6311         dwarf2_per_objfile.
6312
6313 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
6314
6315         * valprint.c (converted_character_d): Remove typedef.
6316         (DEF_VEC_O (converted_character_d)): Remove.
6317         (count_next_character): Use std::vector.
6318         (print_converted_chars_to_obstack): Likewise.
6319         (generic_printstr): Likewise.
6320
6321 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6322
6323         * xml-support.h (struct gdb_xml_value): Add constructor.
6324         <value>: Change type to unique_xmalloc_ptr.
6325         (gdb_xml_value_s): Remove typedef.
6326         (DEF_VEC_O (gdb_xml_value_s)): Remove.
6327         (gdb_xml_element_start_handler): Change parameter type to
6328         std::vector.
6329         (xml_find_attribute): Likewise.
6330         * xml-support.c (xml_find_attribute): Change parameter type to
6331         std::vector and adjust.
6332         (gdb_xml_values_cleanup): Remove.
6333         (gdb_xml_parser::start_element): Adjust to std::vector.
6334         (xinclude_start_include): Change paraeter type to std::vector
6335         and adjust.
6336         * btrace.c (check_xml_btrace_version): Likewise.
6337         (parse_xml_btrace_block): Likewise.
6338         (parse_xml_btrace_pt_config_cpu): Likewise.
6339         (parse_xml_btrace_pt): Likewise.
6340         (parse_xml_btrace_conf_bts): Likewise.
6341         (parse_xml_btrace_conf_pt): Likewise.
6342         * memory-map.c (memory_map_start_memory): Likewise.
6343         (memory_map_start_property): Likewise.
6344         * osdata.c (osdata_start_osdata): Likewise.
6345         (osdata_start_item): Likewise.
6346         (osdata_start_column): Likewise.
6347         * remote.c (start_thread): Likewise.
6348         * solib-aix.c (library_list_start_library): Likewise.
6349         (library_list_start_list): Likewise.
6350         * solib-svr4.c (library_list_start_library): Likewise.
6351         (svr4_library_list_start_list): Likewise.
6352         * solib-target.c (library_list_start_segment): Likewise.
6353         (library_list_start_section): Likewise.
6354         (library_list_start_library): Likewise.
6355         (library_list_start_list): Likewise.
6356         * tracepoint.c (traceframe_info_start_memory): Likewise.
6357         (traceframe_info_start_tvar): Likewise.
6358         * xml-syscall.c (syscall_start_syscall): Likewise.
6359         * xml-tdesc.c (tdesc_start_target): Likewise.
6360         (tdesc_start_feature): Likewise.
6361         (tdesc_start_reg): Likewise.
6362         (tdesc_start_union): Likewise.
6363         (tdesc_start_struct): Likewise.
6364         (tdesc_start_flags): Likewise.
6365         (tdesc_start_enum): Likewise.
6366         (tdesc_start_field): Likewise.
6367         (tdesc_start_enum_value): Likewise.
6368         (tdesc_start_vector): Likewise.
6369
6370 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6371
6372         * extension.h (struct xmethod_worker) <clone>: Remove.
6373         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6374         Remove.
6375         (python_xmethod_worker::clone): Remove.
6376         * valops.c (find_overload_match): Use std::move instead of
6377         clone.
6378
6379 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6380
6381         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6382         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6383         <free_xmethod_worker_data>: Remove.
6384         <get_matching_xmethod_workers>: Chance VEC to std::vector.
6385         <get_xmethod_arg_types>: Remove.
6386         <get_xmethod_result_type>: Remove.
6387         <invoke_xmethod>: Remove.
6388         * extension.c (new_xmethod_worker): Remove.
6389         (clone_xmethod_worker): Remove.
6390         (get_matching_xmethod_workers): Return void, pass std::vector by
6391         pointer.
6392         (get_xmethod_arg_types): Rename to...
6393         (xmethod_worker::get_arg_types): ... this, and adjust.
6394         (get_xmethod_result_type): Rename to...
6395         (xmethod_worker::get_result_type): ... this, and adjust.
6396         (invoke_xmethod): Remove.
6397         (free_xmethod_worker): Remove.
6398         (free_xmethod_worker_vec): Remove.
6399         * extension.h (enum ext_lang_rc): Move here from
6400         extension-priv.h.
6401         (struct xmethod_worker): Add constructor and destructor.
6402         <data>: Remove.
6403         <value>: Remove.
6404         <invoke, clone, do_get_result_type, do_get_arg_types>: New
6405         virtual pure methods.
6406         <get_arg_types, get_result_type>: New methods.
6407         (xmethod_worker_ptr): Remove typedef.
6408         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6409         (xmethod_worker_vec): Remove typedef.
6410         (xmethod_worker_up): New typedef.
6411         (invoke_xmethod): Remove.
6412         (clone_xmethod_worker): Remove.
6413         (free_xmethod_worker): Remove.
6414         (free_xmethod_worker_vec): Remove.
6415         (get_xmethod_arg_types): Remove.
6416         (get_xmethod_result_type): Remove.
6417         * valops.c (find_method_list): Use std::vector, don't use
6418         intermediate vector.
6419         (value_find_oload_method_list): Use std::vector.
6420         (find_overload_match): Use std::vector.
6421         (find_oload_champ): Use std::vector.
6422         * value.c (value_free): Use operator delete.
6423         (value_of_xmethod): Rename to...
6424         (value_from_xmethod): ... this.  Don't assign
6425         xmethod_worker::value, take rvalue-reference.
6426         (result_type_of_xmethod): Adjust.
6427         (call_xmethod): Adjust.
6428         * value.h: Include extension.h.
6429         (struct xmethod_worker): Don't forward-declare.
6430         (value_of_xmethod): Rename to...
6431         (value_from_xmethod): ... this, take rvalue-reference.
6432         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6433         (struct python_xmethod_worker): ... this, add constructor and
6434         destructor.
6435         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6436         (gdbpy_free_xmethod_worker_data): Rename to...
6437         (python_xmethod_worker::~python_xmethod_worker): ... this and
6438         adjust.
6439         (gdbpy_clone_xmethod_worker_data): Rename to...
6440         (python_xmethod_worker::clone): ... this and adjust.
6441         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6442         temporary vector.
6443         (gdbpy_get_xmethod_arg_types): Rename to...
6444         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6445         (gdbpy_get_xmethod_result_type): Rename to...
6446         (python_xmethod_worker::do_get_result_type): ... this and
6447         adjust.
6448         (gdbpy_invoke_xmethod): Rename to...
6449         (python_xmethod_worker::invoke): ... this and adjust.
6450         (new_python_xmethod_worker): Rename to...
6451         (python_xmethod_worker::python_xmethod_worker): ... this and
6452         adjust.
6453         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6454         Remove.
6455         (gdbpy_free_xmethod_worker_data): Remove.
6456         (gdbpy_get_matching_xmethod_workers): Use std::vector.
6457         (gdbpy_get_xmethod_arg_types): Remove.
6458         (gdbpy_get_xmethod_result_type): Remove.
6459         (gdbpy_invoke_xmethod): Remove.
6460         * python/python.c (python_extension_ops): Remove obsolete
6461         callbacks.
6462
6463 2018-01-05  Pedro Alves  <palves@redhat.com>
6464
6465         PR gdb/18653
6466         * common/signals-state-save-restore.c
6467         (save_original_signals_state): New parameter 'quiet'.  Warn if we
6468         find a custom handler preinstalled, instead of internal erroring.
6469         But only warn if !quiet.
6470         * common/signals-state-save-restore.h
6471         (save_original_signals_state): New parameter 'quiet'.
6472         * main.c (captured_main_1): Move save_original_signals_state call
6473         after option handling, and pass QUIET.
6474
6475 2018-01-05  Pedro Alves  <palves@redhat.com>
6476
6477         * spu-tdep.c (spu_catch_start): Pass
6478         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6479
6480 2018-01-05  Pedro Alves  <palves@redhat.com>
6481
6482         PR gdb/22670
6483         * ada-lang.c (literal_symbol_name_matcher): New function.
6484         (ada_get_symbol_name_matcher): Use it for
6485         symbol_name_match_type::SEARCH_NAME.
6486         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
6487         it down instead of assuming symbol_name_match_type::FULL.
6488         * block.h (block_lookup_symbol): New parameter 'match_type'.
6489         * c-valprint.c (print_unpacked_pointer): Use
6490         lookup_symbol_search_name instead of lookup_symbol.
6491         * compile/compile-object-load.c (get_out_value_type): Pass down
6492         symbol_name_match_type::SEARCH_NAME.
6493         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6494         symbol_name_match_type::FULL.
6495         * cp-support.c (cp_get_symbol_name_matcher): Handle
6496         symbol_name_match_type::SEARCH_NAME.
6497         * infrun.c (insert_exception_resume_breakpoint): Use
6498         lookup_symbol_search_name.
6499         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6500         * psymtab.c (maintenance_check_psymtabs): Use
6501         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6502         * stack.c (print_frame_args): Use lookup_symbol_search_name and
6503         SYMBOL_SEARCH_NAME.
6504         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6505         if symbol_name_match_type::SEARCH_NAME.
6506         (lookup_symbol_in_language): Pass down
6507         symbol_name_match_type::FULL.
6508         (lookup_symbol_search_name): New.
6509         (lookup_language_this): Pass down
6510         symbol_name_match_type::SEARCH_NAME.
6511         (lookup_symbol_aux, lookup_local_symbol): New parameter
6512         'match_type'.  Pass it down.
6513         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6514         (lookup_symbol_search_name): New declaration.
6515         (lookup_symbol_in_block): New 'match_type' parameter.
6516
6517 2018-01-05  Pedro Alves  <palves@redhat.com>
6518
6519         PR gdb/22670
6520         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6521         ada_lookup_symbol.
6522         (ada_lookup_symbol): Reimplement in terms of
6523         ada_lookup_symbol_list, bits factored out from
6524         ada_lookup_encoded_symbol.
6525
6526 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6527
6528         * ada-exp.y (write_object_renaming): When subscripting an array
6529         using a symbol as the index, pass the block in call to
6530         ada_lookup_encoded_symbol when looking that symbol up.
6531
6532 2018-01-05  Jerome Guitton  <guitton@adacore.com>
6533
6534         * ada-lang.c (ada_array_length): Use ada_index_type instead of
6535         TYPE_INDEX_TYPE.
6536
6537 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6538
6539         * ada-lang.c (ada_to_fixed_value_create): Add handling of
6540         the case where VALUE_LVAL (val0) is not lval_memory.
6541
6542 2018-01-05  Xavier Roirand  <roirand@adacore.com>
6543
6544         * ada-valprint.c (print_optional_low_bound): Handle
6545         character-indexed array printing like boolean-indexed array
6546         printing.
6547
6548 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6549
6550         * NEWS: Create a new section for the next release branch.
6551         Rename the section of the current branch, now that it has
6552         been cut.
6553
6554 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
6555
6556         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6557         * version.in: Bump version to 8.1.50.DATE-git.
6558
6559 2018-01-03  Xavier Roirand  <roirand@adacore.com>
6560
6561         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6562         Add field.
6563         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6564         Add field.
6565         (default_exception_support_info) <catch_handlers_sym>: Add field.
6566         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6567         (ada_exception_name_addr_1): Add "catch handlers" handling.
6568         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6569         Update all callers.
6570         (create_excep_cond_exprs) <ex>: Add parameter.
6571         (re_set_exception): Update create_excep_cond_exprs call.
6572         (print_it_exception, print_one_exception, print_mention_exception)
6573         (print_recreate_exception): Add "catch handler" handling.
6574         (allocate_location_catch_handlers, re_set_catch_handlers)
6575         (check_status_catch_handlers, print_it_catch_handlers)
6576         (print_one_catch_handlers, print_mention_catch_handlers)
6577         (print_recreate_catch_handlers): New function.
6578         (catch_handlers_breakpoint_ops): New variable.
6579         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6580         Add parameter.  Add "catch handler" handling.
6581         (ada_exception_sym_name, ada_exception_breakpoint_ops):
6582         Add "catch handler" handling.
6583         (ada_exception_catchpoint_cond_string): Add "catch handler"
6584         handling.
6585         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6586         call.
6587         (catch_ada_handlers_command): New function.
6588         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6589         operations structure.
6590         (_initialize_ada_language): Add "catch handlers" command entry.
6591         * NEWS: Document "catch handlers" feature.
6592
6593 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
6594
6595         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6596         account when creating the array type of the slice.
6597         (ada_value_slice): Likewise.
6598
6599 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
6600
6601         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6602         New enum value.
6603         (create_array_type_with_stride): Add byte_stride_prop parameter.
6604         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6605         New parameter.  Update all callers in this file.
6606         (array_type_has_dynamic_stride): New function.
6607         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6608         of arrays with dynamic byte strides.
6609         * dwarf2read.c (read_array_type): Add support for dynamic
6610         DW_AT_byte_stride attributes.
6611
6612 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
6613
6614         * dwarf2read.c (read_unspecified_type): Treat
6615         DW_TAG_enumeration_type DIEs from Ada units as stubs.
6616
6617 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6618
6619         Update copyright year range in all GDB files.
6620
6621 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6622
6623         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6624         and gdb/testsuite/gdb.base/step-line.c.
6625
6626 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6627
6628         * copyright.py (main): Dump the contents of
6629         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6630         even if BY_HAND is empty.
6631
6632 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6633
6634         * top.c (print_gdb_version): Update Copyright year in version
6635         message.
6636
6637 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
6638
6639         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
6640
6641 For older changes see ChangeLog-2017.
6642 \f
6643 Local Variables:
6644 mode: change-log
6645 left-margin: 8
6646 fill-column: 74
6647 version-control: never
6648 coding: utf-8
6649 End: