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