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