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