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