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