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