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