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