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