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