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