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