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