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