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