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