1 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3 * Makefile.in (config.status): Add configure.nat as a
6 2018-06-04 Tom Tromey <tom@tromey.com>
8 * cp-name-parser.y (cpname_state): Add method declarations.
10 (cpname_state::d_grab, cpname_state::fill_comp)
11 (cpname_state::make_operator, cpname_state::make_dtor)
12 (cpname_state::make_builtin_type, cpname_state::make_name)
13 (cpname_state::d_qualify, cpname_state::d_int_type)
14 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
15 (%union): Move earlier.
17 2018-06-04 Alan Hayward <alan.hayward@arm.com>
19 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
21 2018-06-04 Alan Hayward <alan.hayward@arm.com>
23 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
24 (aarch64_pseudo_write_1): Likewise.
25 (aarch64_pseudo_read_value): Use helper.
26 (aarch64_pseudo_write): Likewise.
28 2018-06-04 Pedro Alves <palves@redhat.com>
30 * darwin-nat.c (darwin_ops): Delete.
31 (darwin_attach_pid): Use get_native_target.
33 2018-06-04 Alan Hayward <alan.hayward@arm.com>
35 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
36 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
38 2018-06-04 Alan Hayward <alan.hayward@arm.com>
40 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
41 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
42 (aarch64_gdbarch_init): Check for SVE.
43 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
45 2018-06-04 Alan Hayward <alan.hayward@arm.com>
47 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
48 * aarch64-tdep.h (aarch64_read_description): Likewise.
49 * arch/aarch64.c (aarch64_create_target_description): Likewise.
50 * arch/aarch64.h (aarch64_create_target_description): Likewise.
51 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
52 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
53 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
55 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
57 * value.c (value_fetch_lazy_bitfield): New.
58 (value_fetch_lazy_memory): New.
59 (value_fetch_lazy_register): New.
60 (value_fetch_lazy): Factor out to smaller functions.
62 2018-06-01 Tom Tromey <tom@tromey.com>
64 * cp-name-parser.y (backslashable, represented): Now const.
66 2018-06-01 Tom Tromey <tom@tromey.com>
68 * cp-name-parser.y: Include parser-defs.h.
69 (parser_fprintf): Remove declaration.
71 2018-06-01 Tom Tromey <tom@tromey.com>
73 * cp-name-parser.y: Use %pure-parser, %lex-param, and
75 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
76 (global_result): Remove globals.
77 (struct cpname_state): New.
78 (yyparse): Don't declare.
79 (yylex, yyerror): Move declarations after %union.
80 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
81 (make_name): Add state parameter.
83 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
85 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
87 (yylex): Add lvalp, state parameters.
88 (yyerror): Add state parameter.
89 (cp_demangled_name_to_comp): Update.
91 2018-06-01 Tom Tromey <tom@tromey.com>
93 * cp-name-parser.y (parser_fprintf): Declare.
94 (GDB_YY_REMAP_PREFIX): Define.
95 Include yy-remap.h. Don't redefine yy* identifiers.
97 2018-06-01 Tom Tromey <tom@tromey.com>
99 * python/py-type.c (typy_legacy_template_argument): Update.
100 * cp-support.h (cp_demangled_name_to_comp): Update.
101 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
102 parameter to be a "std::string *".
105 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
107 * ada-lex.l: Include "diagnostics.h" instead of
108 "common/diagnostics.h".
109 * unittests/environ-selftests.c: Likewise.
110 * common/diagnostics.h: Moved to ../include.
112 2018-06-01 Joel Brobecker <brobecker@adacore.com>
114 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
115 to language_mode_manual while calling breakpoint_re_set_one.
117 2018-06-01 Tom Tromey <tom@tromey.com>
119 * valops.c (value_cast_structs, destructor_name_p): Update.
120 * symtab.c (gdb_mangle_name): Update.
121 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
123 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
124 (pascal_object_print_value_fields, pascal_object_print_value):
126 * p-typeprint.c (pascal_type_print_derivation_info): Update.
127 * linespec.c (find_methods): Update.
128 * gdbtypes.h (type_name_no_tag): Remove.
129 (type_name_or_error): Rename from type_name_no_tag_or_error.
130 * gdbtypes.c (type_name_no_tag): Remove.
131 (type_name_or_error): Rename from type_name_no_tag_or_error.
132 (lookup_struct_elt_type, check_typedef): Update.
133 * expprint.c (print_subexp_standard): Update.
134 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
135 * d-namespace.c (d_lookup_nested_symbol): Update.
136 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
137 (cp_print_class_member): Update.
138 * cp-namespace.c (cp_lookup_nested_symbol): Update.
139 * completer.c (add_struct_fields): Update.
140 * c-typeprint.c (cp_type_print_derivation_info)
141 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
143 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
144 (ada_prefer_type, ada_is_exception_sym): Update.
146 2018-06-01 Tom Tromey <tom@tromey.com>
148 * valops.c (enum_constant_from_type, value_namespace_elt)
149 (value_maybe_namespace_elt): Update.
150 * valarith.c (find_size_for_pointer_math): Update.
151 * target-descriptions.c (make_gdb_type): Update.
152 * symmisc.c (print_symbol): Update.
153 * stabsread.c (define_symbol, read_type)
154 (complain_about_struct_wipeout, add_undefined_type)
155 (cleanup_undefined_types_1): Update.
156 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
157 (rust_range_type_p, val_print_struct, rust_print_struct_def)
158 (rust_internal_print_type, rust_composite_type)
159 (rust_evaluate_funcall, rust_evaluate_subexp)
160 (rust_inclusive_range_type_p): Update.
161 * python/py-type.c (typy_get_tag): Update.
162 * p-typeprint.c (pascal_type_print_base): Update.
163 * mdebugread.c (parse_symbol, parse_type): Update.
164 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
166 * guile/scm-type.c (gdbscm_type_tag): Update.
167 * go-lang.c (sixg_string_p): Update.
168 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
170 * gdbtypes.h (struct main_type) <tag_name>: Remove.
171 (TYPE_TAG_NAME): Remove.
172 * gdbtypes.c (type_name_no_tag): Simplify.
173 (check_typedef, check_types_equal, recursive_dump_type)
174 (copy_type_recursive, arch_composite_type): Update.
175 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
176 in summary mode when needed.
177 * eval.c (evaluate_funcall): Update.
178 * dwarf2read.c (fixup_go_packaging, read_structure_type)
179 (process_structure_scope, read_enumeration_type)
180 (read_namespace_type, read_module_type, determine_prefix): Update.
181 * cp-support.c (inspect_type): Update.
182 * coffread.c (process_coff_symbol, decode_base_type): Update.
183 * c-varobj.c (c_is_path_expr_parent): Update.
184 * c-typeprint.c (c_type_print_base_struct_union): Update.
185 (c_type_print_base_1): Update. Print struct/class/union/enum in
186 summary when using C language.
187 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
188 (gen_maybe_namespace_elt): Update.
189 * ada-lang.c (ada_type_name): Simplify.
190 (empty_record, ada_template_to_fixed_record_type_1)
191 (template_to_static_fixed_type)
192 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
194 2018-06-01 Tom Tromey <tom@tromey.com>
196 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
198 * c-typeprint.c (c_print_type_1): Add "language" parameter.
199 (c_print_type): Update.
200 (c_print_type): New overload.
201 (c_type_print_varspec_prefix, c_type_print_args)
202 (c_type_print_varspec_suffix, c_print_type_no_offsets)
203 (c_type_print_base_struct_union, c_type_print_base_1)
204 (cp_type_print_method_args): Add "language" parameter.
205 (c_type_print_base): Update.
206 * c-lang.h (c_print_type): Add new overload.
208 2018-06-01 Tom Tromey <tom@tromey.com>
210 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
211 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
213 2018-06-01 Alan Hayward <alan.hayward@arm.com>
215 * aarch64-tdep.c (aarch64_sve_register_names): New const
217 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
218 (AARCH64_SVE_Z_REGS_NUM): New define.
219 (AARCH64_SVE_P_REGS_NUM): Likewise.
220 (AARCH64_SVE_NUM_REGS): Likewise.
222 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
224 * nat/linux-ptrace.h [__alpha__]
225 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
228 2018-05-31 Maciej W. Rozycki <macro@mips.com>
230 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
231 the endianness selected.
232 * NEWS: Document `set endian auto' mode operation update.
234 2018-05-31 Alan Hayward <alan.hayward@arm.com>
236 * Makefile.in: Add new header.
237 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
238 (sve_vl_from_vg): Likewise.
239 (sve_vq_from_vl): Likewise.
240 (sve_vl_from_vq): Likewise.
241 (sve_vq_from_vg): Likewise.
242 (sve_vg_from_vq): Likewise.
243 * configure.nat: Add new c file.
244 * nat/aarch64-sve-linux-ptrace.c: New file.
245 * nat/aarch64-sve-linux-ptrace.h: New file.
247 2018-05-31 Alan Hayward <alan.hayward@arm.com>
249 * aarch64-linux-nat.c (aarch64_linux_read_description):
251 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
253 * aarch64-tdep.c (tdesc_aarch64_list): Add.
254 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
255 (aarch64_gdbarch_init): Add parmeter zero.
256 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
257 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
258 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
260 * doc/gdb.texinfo: Describe SVE feature
261 * features/aarch64-sve.c: New file.
263 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
266 * gdbarch.sh (significant_addr_bit): Default to zero when
267 not set by target architecture.
268 * gdbarch.c: Re-generated.
269 * utils.c (address_significant): Update.
271 2018-05-30 Joel Brobecker <brobecker@adacore.com>
273 * stack.c (func_command): Remove trailing newline in call to error.
275 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
277 * regcache.h (regcache_raw_collect): Remove, update callers to
278 use regcache::raw_collect.
279 * regcache.c (regcache_raw_collect): Remove.
281 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
283 * regcache.h (regcache_raw_supply): Remove, update callers to
284 use detached_regcache::raw_supply.
285 * regcache.c (regcache_raw_supply): Remove.
287 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
289 * regcache.h (regcache_cooked_write_part): Remove, update
290 callers to use regcache::cooked_write_part.
291 * regcache.c (regcache_cooked_write_part): Remove.
293 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
295 * regcache.h (regcache_cooked_read_part): Remove, update callers
296 to use readable_regcache::cooked_read_part.
297 * regcache.c (regcache_cooked_read_part): Remove.
299 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
301 * regcache.h (regcache_cooked_read_value): Remove, update
302 callers to use readable_regcache::cooked_read_value.
303 * regcache.c (regcache_cooked_read_value): Remove.
305 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
307 * regcache.h (regcache_cooked_write): Remove, update callers to
308 use regcache::cooked_write.
309 * regcache.c (regcache_cooked_write): Remove.
311 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
313 * regcache.h (regcache_invalidate): Remove, update callers to
314 use detached_regcache::invalidate instead.
315 * regcache.c (regcache_invalidate): Remove.
317 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
319 * regcache.h (regcache_raw_write_part): Remove, update callers
320 to use regcache::raw_write_part instead.
321 * regcache.c (regcache_raw_write_part): Remove.
323 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
325 * regcache.h (regcache_raw_read_part): Remove, update callers to
326 use readable_regcache::raw_read_part instead.
327 * regcache.c (regcache_raw_read_part): Remove.
329 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
331 * regcache.h (regcache_cooked_read): Remove, update callers to
332 use readable_regcache::cooked_read instead.
333 * regcache.c (regcache_cooked_read): Remove.
335 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
337 * regcache.h (regcache_raw_write): Remove, update callers to use
338 regcache::raw_write instead.
339 * regcache.c (regcache_raw_write): Remove.
341 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
343 * regcache.h (regcache_raw_read): Remove, update callers to use
344 readable_regcache::raw_read instead.
345 * regcache.c (regcache_raw_read): Remove.
347 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
349 * regcache.h (regcache_raw_update): Remove, update callers to
350 use readable_regcache::raw_update instead.
351 * regcache.c (regcache_raw_update): Remove.
353 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
355 * regcache.h (regcache_register_status): Remove, update callers
356 to use reg_buffer::get_register_status directly instead.
357 * regcache.c (regcache_register_status): Remove.
359 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
361 * regcache.h (regcache_get_ptid): Remove, update all callers to
362 call regcache::ptid instead.
363 * regcache.c (regcache_get_ptid): Remove.
365 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
367 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
369 2018-05-30 Pedro Alves <palves@redhat.com>
371 * common/common-exceptions.h (exception_rethrow): Use
374 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
376 * breakpoint.c (print_solib_event, check_status_catch_solib):
377 Remove struct keyword in range-based for loops.
378 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
379 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
381 * linespec.c (find_superclass_methods, search_minsyms_for_name):
383 * symfile.c (addr_info_make_relative): Likewise.
384 * thread.c (value_in_thread_stack_temporaries): Likewise.
386 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
388 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
389 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
390 * coff-pe-read.c (add_pe_forwarded_sym): Replace
391 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
392 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
393 * jit.c (jit_breakpoint_re_set_internal): Likewise.
394 * printcmd.c (info_address_command): Likewise.
396 2018-05-29 Tom Tromey <tom@tromey.com>
398 * windows-nat.c (handle_exception): Update fall-through comment.
400 2018-05-29 Tom Tromey <tom@tromey.com>
402 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
403 (struct program_space) <added_solibs>: Now a std::vector.
404 * breakpoint.c (print_solib_event): Update.
405 (check_status_catch_solib): Update.
406 * progspace.c (clear_program_space_solib_cache): Update.
407 * solib.c (update_solib_list): Update.
409 2018-05-29 Tom Tromey <tom@tromey.com>
411 * python/py-type.c (typy_richcompare): Update.
412 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
413 * gdbtypes.h (types_deeply_equal): Return bool.
414 (types_equal): Likewise.
415 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
417 (check_types_equal): Change worklist to std::vector. Return
419 (struct type_equality_entry): Add constructor.
420 (compare_maybe_null_strings): Return bool.
421 (check_types_worklist): Return bool. Change worklist to
423 (types_deeply_equal): Use std::vector.
424 (types_equal): Return bool.
425 (compare_maybe_null_strings): Simplify.
427 2018-05-29 Tom Tromey <tom@tromey.com>
429 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
431 2018-05-29 Tom Tromey <tom@tromey.com>
433 * objc-lang.h: Don't include cp-support.h.
434 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
437 2018-05-27 Tom Tromey <tom@tromey.com>
439 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
441 2018-05-25 Tom Tromey <tom@tromey.com>
443 * value.c (value::location): Initialize.
445 2018-05-25 Tom Tromey <tom@tromey.com>
447 * dbxread.c (init_bincl_list): Remove.
448 (bincl_list): Now a std::vector.
449 (bincls_allocated, next_bincl): Remove.
450 (free_bincl_list, do_free_bincl_list_cleanup)
451 (make_cleanup_free_bincl_list): Remove.
452 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
454 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
455 (struct header_file_location): Add constructor.
456 (add_bincl_to_list): Remove.
458 2018-05-25 Tom Tromey <tom@tromey.com>
460 * tui/tui.c (tui_enable): Update.
461 * mi/mi-interp.c (mi_interp::init): Update.
462 * interps.h (class interp) <name>: New method.
463 <m_name>: Rename from name.
464 (~scoped_restore_interp): Update.
465 * interps.c (interp::interp): Update.
466 (interp_add, interp_set, interp_lookup_existing)
467 (current_interp_named_p): Update.
469 2018-05-25 Tom Tromey <tom@tromey.com>
471 * interps.c (interp_name): Remove.
472 * mi/mi-interp.c (mi_interp::init): Update.
473 * interps.h (interp_name): Remove.
474 (~scoped_restore_interp): Update.
475 * tui/tui.c (tui_enable): Update.
477 2018-05-25 Tom Tromey <tom@tromey.com>
479 * utils.c (fputs_maybe_filtered): Update.
480 * linespec.c (decode_line_full): Update.
481 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
482 (mi_print_breakpoint_for_event, mi_solib_loaded)
483 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
484 (mi_user_selected_context_changed): Update.
485 * mi/mi-main.c (mi_execute_command): Update.
486 * cli/cli-script.c (execute_control_command): Update.
487 * python/python.c (execute_gdb_command): Update.
488 * solib.c (info_sharedlibrary_command): Update.
489 * interps.c (interp_ui_out): Remove.
490 * interps.h (interp_ui_out): Remove.
492 2018-05-25 Tom Tromey <tom@tromey.com>
494 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
495 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
496 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
498 2018-05-25 Tom Tromey <tom@tromey.com>
500 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
501 * interps.c (interp_exec): Use scoped_restore.
503 2018-05-25 Tom Tromey <tom@tromey.com>
505 * remote.c (remote_target::remote_file_get): Use
507 (remote_target::remote_file_put): Likewise.
509 2018-05-25 Tom Tromey <tom@tromey.com>
511 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
513 (get_pe_section_index, add_pe_exported_sym): Update.
514 (read_pe_exported_syms): Use gdb::def_vector.
516 2018-05-25 Tom Tromey <tom@tromey.com>
518 * frame.c (remove_prev_frame): Remove.
519 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
521 2018-05-25 Maciej W. Rozycki <macro@mips.com>
523 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
525 * mips-linux-nat.c (supply_fpregset): Always call
526 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
527 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
528 `mips_fill_fpregset'.
529 * mips-linux-tdep.c (mips_supply_fpregset)
530 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
531 (mips_fill_fpregset_wrapper): Remove functions.
532 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
533 (mips_linux_fpregset): Remove variable.
534 (mips_linux_iterate_over_regset_sections): Use
535 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
536 (mips_linux_o32_sigframe_init): Remove comment.
538 2018-05-25 Pedro Alves <palves@redhat.com>
540 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
541 (struct readahead_cache, struct packet_reg, struct
542 remote_arch_state, class remote_state): Move higher up in the
544 (remote_target::m_remote_state): Now an object instead of a pointer.
545 (remote_target::get_remote_state): Adjust.
547 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
549 * stack.c (select_and_print_frame): Delete.
550 (struct function_bounds): Move struct within function.
551 (func_command): Most content moved into new function
552 find_frame_for_function, use new function, print result, add
554 (find_frame_for_function): New function, now returns a result.
556 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
558 * stack.c (iterate_over_block_arg_vars): Fix comment.
559 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
561 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
565 (scoped_restore_selected_frame::scoped_restore_selected_frame):
567 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
569 * frame.h (class scoped_restore_selected_frame): New class.
570 * stack.c (print_frame_local_vars): Remove catching and rethrowing
571 of any exception, use scoped_restore_selected_frame to restore the
574 2018-05-24 Pedro Alves <palves@redhat.com>
576 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
579 2018-05-23 Tom Tromey <tom@tromey.com>
581 * complaints.c (struct complaints): Remove.
582 (symfile_complaint_book): Remove.
583 (series): New global.
584 (complaint_internal): Update.
585 (clear_complaints): Update.
587 2018-05-23 Tom Tromey <tom@tromey.com>
589 * complaints.c (counters): New global.
590 (struct complain): Remove.
591 (struct complaints) <root>: Remove.
592 (complaint_sentinel): Remove.
593 (symfile_complaint_book): Update.
594 (find_complaint) Remove.
595 (complaint_internal, clear_complaints): Update.
597 2018-05-23 Tom Tromey <tom@tromey.com>
599 * complaints.c (struct complain) <file, line>: Remove.
600 (find_complaint): Remove file, line parameters.
601 (complaint_internal): Update.
603 2018-05-23 Tom Tromey <tom@tromey.com>
605 * complaints.c (vcomplaint): Remove.
606 (complaint_internal) Merge in contents of vcomplaint.
608 2018-05-23 Tom Tromey <tom@tromey.com>
610 * complaints.c (struct complaints) <explanation>: Remove.
611 (symfile_explanations): Remove.
612 (symfile_complaint_book): Update.
613 (vcomplaint): Update.
614 (struct explanation): Remove.
616 2018-05-23 Tom Tromey <tom@tromey.com>
618 * complaints.c (symfile_complaints): Remove.
619 (complaint_internal): Remove "complaints" parameter.
620 (clear_complaints, vcomplaint): Remove "c" parameter.
621 (get_complaints): Remove.
622 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
623 (dwarf2_debug_line_missing_file_complaint)
624 (dwarf2_debug_line_missing_end_sequence_complaint)
625 (dwarf2_complex_location_expr_complaint)
626 (dwarf2_const_value_length_mismatch_complaint)
627 (dwarf2_section_buffer_overflow_complaint)
628 (dwarf2_macro_malformed_definition_complaint)
629 (dwarf2_invalid_attrib_class_complaint)
630 (create_addrmap_from_index, dw2_symtab_iter_next)
631 (dw2_expand_marked_cus)
632 (dw2_debug_names_iterator::find_vec_in_debug_names)
633 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
634 (create_debug_type_hash_table, init_cutu_and_read_dies)
635 (partial_die_parent_scope, add_partial_enumeration)
636 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
637 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
638 (read_import_statement, read_file_scope, create_dwo_cu_reader)
639 (create_cus_hash_table, create_dwp_hash_table)
640 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
641 (dwarf2_rnglists_process, dwarf2_ranges_process)
642 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
643 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
644 (handle_struct_member_die, process_structure_scope)
645 (read_array_type, read_common_block, read_module_type)
646 (read_tag_pointer_type, read_typedef, read_base_type)
647 (read_subrange_type, load_partial_dies, partial_die_info::read)
648 (partial_die_info::read, partial_die_info::read)
649 (partial_die_info::read, read_checked_initial_length_and_offset)
650 (dwarf2_string_attr, read_formatted_entries)
651 (dwarf_decode_line_header)
652 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
653 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
654 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
655 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
656 (get_signatured_type, get_DW_AT_signature_type)
657 (decode_locdesc, file_file_name, consume_improper_spaces)
658 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
659 (dwarf_decode_macro_bytes, dwarf_decode_macros)
660 (dwarf2_symbol_mark_computed, set_die_type)
661 (read_attribute_value): Update.
662 * stap-probe.c (handle_stap_probe, get_stap_base_address):
664 * dbxread.c (unknown_symtype_complaint)
665 (lbrac_mismatch_complaint, repeated_header_complaint)
666 (set_namestring, function_outside_compilation_unit_complaint)
667 (read_dbx_symtab, process_one_symbol): Update.
668 * gdbtypes.c (stub_noname_complaint): Update.
669 * windows-nat.c (handle_unload_dll): Update.
670 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
671 (decode_base_type): Update.
672 * xcoffread.c (bf_notfound_complaint, ef_complaint)
673 (eb_complaint, record_include_begin, record_include_end)
674 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
675 (process_xcoff_symbol, read_symbol)
676 (function_outside_compilation_unit_complaint)
677 (scan_xcoff_symtab): Update.
678 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
679 * buildsym.c (finish_block_internal, make_blockvector)
680 (end_symtab_get_static_block, augment_type_symtab): Update.
681 * dtrace-probe.c (dtrace_process_dof)
682 (dtrace_static_probe_ops::get_probes): Update.
683 * complaints.h (struct complaint): Don't declare.
684 (symfile_complaints): Remove.
685 (complaint_internal): Remove "complaints" parameter.
686 (complaint): Likewise.
687 (clear_complaints): Likewise.
688 * symfile.c (syms_from_objfile_1, finish_new_objfile)
689 (reread_symbols): Update.
690 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
691 (dwarf2_frame_cache, decode_frame_entry): Update.
692 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
693 * objc-lang.c (lookup_objc_class, lookup_child_selector)
694 (info_selectors_command): Update.
695 * macrotab.c (macro_include, check_for_redefinition)
696 (macro_undef): Update.
697 * objfiles.c (filter_overlapping_sections): Update.
698 * stabsread.c (invalid_cpp_abbrev_complaint)
699 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
700 (define_symbol, error_type, read_type, rs6000_builtin_type)
701 (stabs_method_name_from_physname, read_member_functions)
702 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
703 (attach_fields_to_type, complain_about_struct_wipeout)
704 (read_range_type, read_args, common_block_start)
705 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
707 * mdebugread.c (index_complaint, unknown_ext_complaint)
708 (basic_type_complaint, bad_tag_guess_complaint)
709 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
710 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
711 (parse_procedure, parse_lines)
712 (function_outside_compilation_unit_complaint)
713 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
714 (bad_tag_guess_complaint, reg_value_complaint): Update.
715 * cp-support.c (demangled_name_complaint): Update.
716 * macroscope.c (sal_macro_scope): Update.
717 * dwarf-index-write.c (class debug_names): Update.
719 2018-05-23 Tom Tromey <tom@tromey.com>
721 * complaints.c (clear_complaints): Remove "noisy" parameter.
722 * complaints.h (clear_complaints): Update.
723 * symfile.c (syms_from_objfile_1, finish_new_objfile)
724 (reread_symbols): Update.
726 2018-05-23 Tom Tromey <tom@tromey.com>
728 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
730 (vcomplaint, clear_complaints): Update.
731 (symfile_explanations): Remove some messages.
733 2018-05-23 Tom Tromey <tom@tromey.com>
735 * complaints.c (internal_complaint): Remove.
736 * complaints.h (internal_complaint): Remove.
738 2018-05-22 Maciej W. Rozycki <macro@mips.com>
740 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
742 2018-05-22 Pedro Alves <palves@redhat.com>
744 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
745 (remote_fileio_badfd, remote_fileio_return_errno)
746 (remote_fileio_return_success, remote_fileio_func_open)
747 (remote_fileio_func_open, remote_fileio_func_close)
748 (remote_fileio_func_read, remote_fileio_func_write)
749 (remote_fileio_func_lseek, remote_fileio_func_rename)
750 (remote_fileio_func_unlink, remote_fileio_func_stat)
751 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
752 (remote_fileio_func_isatty, remote_fileio_func_system): Add
753 remote_target parameter.
754 (remote_fio_func_map) <func>: Add remote_target parameter.
755 (do_remote_fileio_request, remote_fileio_request):
756 * remote-fileio.h (remote_fileio_request):
757 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
758 remote_target parameter.
759 (remote_notif_process, handle_notification): Adjust to pass down
761 (remote_notif_state_allocate): Add remote_target parameter. Save
763 * remote-notif.h (struct remote_target): Forward declare.
764 (struct notif_client) <parse, ack, can_get_pending_events>: Add
765 remote_target parameter.
766 (struct remote_notif_state) <remote>: New field.
767 (remote_notif_ack, remote_notif_parse): Add remote_target
769 (remote_notif_state_allocate, remote_notif_state_allocate): Add
770 remote_target parameter.
771 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
772 (threads_listing_context, rmt_thread_action, protocol_feature)
773 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
774 (packet_result, struct threads_listing_context, remote_state):
775 Move definitions and declarations higher up.
776 (remote_target) <~remote_target>: Declare.
777 (remote_download_command_source, remote_file_put, remote_file_get)
778 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
779 (remote_hostio_pread_vFile, remote_hostio_send_command)
780 (remote_hostio_set_filesystem, remote_hostio_open)
781 (remote_hostio_close, remote_hostio_unlink, remote_state)
782 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
783 (get_memory_write_packet_size, get_memory_read_packet_size)
784 (append_pending_thread_resumptions, remote_detach_1)
785 (append_resumption, remote_resume_with_vcont)
786 (add_current_inferior_and_thread, wait_ns, wait_as)
787 (process_stop_reply, remote_notice_new_inferior)
788 (process_initial_stop_replies, remote_add_thread)
789 (btrace_sync_conf, remote_btrace_maybe_reopen)
790 (remove_new_fork_children, kill_new_fork_children)
791 (discard_pending_stop_replies, stop_reply_queue_length)
792 (check_pending_events_prevent_wildcard_vcont)
793 (discard_pending_stop_replies_in_queue, stop_reply)
794 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
795 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
796 (remote_interrupt_as, remote_interrupt_ns)
797 (remote_get_noisy_reply, remote_query_attached)
798 (remote_add_inferior, remote_current_thread, get_current_thread)
799 (set_thread, set_general_thread, set_continue_thread)
800 (set_general_process, write_ptid)
801 (remote_unpack_thread_info_response, remote_get_threadinfo)
802 (parse_threadlist_response, remote_get_threadlist)
803 (remote_threadlist_iterator, remote_get_threads_with_ql)
804 (remote_get_threads_with_qxfer)
805 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
806 (get_offsets, remote_check_symbols, remote_supported_packet)
807 (remote_query_supported, remote_packet_size)
808 (remote_serial_quit_handler, remote_detach_pid)
809 (remote_vcont_probe, remote_resume_with_hc)
810 (send_interrupt_sequence, interrupt_query)
811 (remote_notif_get_pending_events, fetch_register_using_p)
812 (send_g_packet, process_g_packet, fetch_registers_using_g)
813 (store_register_using_P, store_registers_using_G)
814 (set_remote_traceframe, check_binary_download)
815 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
816 (remote_xfer_live_readonly_partial, remote_read_bytes)
817 (remote_send_printf, remote_flash_write, readchar)
818 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
819 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
820 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
821 (extended_remote_disable_randomization, extended_remote_run)
822 (send_environment_packet, extended_remote_environment_support)
823 (extended_remote_set_inferior_cwd, remote_write_qxfer)
824 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
825 (packet_command): Now methods of ...
826 (remote_target): ... this class.
827 (m_remote_state) <remote_target>: New field.
828 (struct remote_state) <stop_reply_queue,
829 remote_async_inferior_event_token, wait_forever_enabled_p>: New
831 (remote_state::remote_state): Allocate stop_reply_queue.
832 (remote_state): Delete global.
833 (get_remote_state_raw): Delete.
834 (remote_target::get_remote_state): Allocate m_remote_state on
836 (get_current_remote_target): New.
837 (remote_ops, extended_remote_ops): Delete.
838 (wait_forever_enabled_p, remote_async_inferior_event_token):
839 Delete, moved to struct remote_state.
840 (remote_target::close): Delete self. Destruction bits split to
842 (remote_target::~remote_target): ... this.
843 (show_memory_packet_size): Adjust to use
844 get_current_remote_target.
845 (struct protocol_feature) <func>: Add remote_target parameter.
846 All callers adjusted.
847 (curr_quit_handler_target): New.
848 (remote_serial_quit_handler): Reimplement.
849 (remote_target::open_1): Adjust to use get_current_remote_target.
850 Heap-allocate remote_target/extended_remote_target instances.
851 (vcont_builder::vcont_builder): Add remote_target parameter, and
852 save it in m_remote. All callers adjusted.
853 (vcont_builder::m_remote): New field.
854 (vcont_builder::restart, vcont_builder::flush)
855 (vcont_builder::push_action): Use it.
856 (remote_target::commit_resume): Use it.
857 (struct queue_iter_param) <remote>: New field.
858 (remote_target::remove_new_fork_children): Fill in 'remote' field.
859 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
860 (check_pending_event_prevents_wildcard_vcont_callback)
861 (remote_target::check_pending_events_prevent_wildcard_vcont)
862 (remote_target::discard_pending_stop_replies)
863 (remote_target::discard_pending_stop_replies_in_queue)
864 (remote_target::remote_notif_remove_queued_reply): Fill in
866 (remote_notif_get_pending_events): New.
867 (remote_target::readchar, remote_target::remote_serial_write):
868 Save/restore curr_quit_handler_target.
870 (kill_new_fork_children): Fill in 'remote' field.
871 (packet_command): Use get_current_remote_target, defer to
872 remote_target method of same name.
873 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
874 parameter, and save it in m_remote. All callers adjusted.
875 (scoped_remote_fd::release): Use m_remote.
876 (scoped_remote_fd::m_remote): New field.
877 (remote_file_put, remote_file_get, remote_file_delete): Use
878 get_current_remote_target, defer to remote_target method of same
880 (remote_btrace_reset): Add remote_state paremeter. Update all
882 (remote_async_inferior_event_handler). Pass down 'data'.
883 (remote_new_objfile): Use get_current_remote_target.
884 (remote_target::vcont_r_supported): New.
885 (set_range_stepping): Use get_current_remote_target and
886 remote_target::vcont_r_supported.
887 (_initialize_remote): Don't allocate 'remote_state' and
888 'stop_reply_queue' globals.
889 * remote.h (struct remote_target): Forward declare.
890 (getpkt, putpkt, remote_notif_get_pending_events): Add
891 'remote_target' parameter.
893 2018-05-22 Pedro Alves <palves@redhat.com>
895 * remote.c (vcont_builder): Now a class. Make all data members
897 (vcont_builder) <vcont_builder, restart, flush, push_action>:
899 (vcont_builder_restart): Rename to ...
900 (vcont_builder::restart): ... this.
901 (vcont_builder_flush): Rename to ...
902 (vcont_builder::flush): ... this.
903 (vcont_builder_push_action): Rename to ...
904 (vcont_builder::push_action): ... this.
905 (remote_target::commit_resume): Adjust.
907 2018-05-22 Pedro Alves <palves@redhat.com>
909 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
910 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
911 (get_fixed_memory_packet_size): New.
912 (get_memory_packet_size): Use it.
913 (set_memory_packet_size): Don't override the config size with
914 DEFAULT_MAX_MEMORY_PACKET_SIZE.
915 (show_memory_packet_size): Use get_fixed_memory_packet_size.
916 Don't refer to get_memory_packet_size if not connected to a remote
917 target. Show "(default)" if configured size is 0.
919 2018-05-22 Pedro Alves <palves@redhat.com>
921 * remote.c (remote_target::mourn_inferior): Move
922 discard_pending_stop_replies call here from ...
923 (_initialize_remote): ... here.
925 2018-05-22 Pedro Alves <palves@redhat.com>
927 * remote.c (compare_section_command): Remove set_general_process
930 2018-05-22 Pedro Alves <palves@redhat.com>
932 * remote.c (struct packet_reg, struct remote_arch_state):
933 Move higher up in the file.
934 (remote_state) <m_arch_states>: Store remote_arch_state values
935 instead of remote_arch_state pointers.
936 (remote_state::get_remote_arch_state): Adjust.
938 2018-05-22 Pedro Alves <palves@redhat.com>
940 * remote.c: Include <unordered_map>.
941 (remote_state): Now a class.
942 (remote_state) <get_remote_arch_state>: Declare method.
943 <get_remote_arch_state>: New field.
944 (remote_arch_state) <remote_arch_state>: Declare ctor.
945 <regs>: Now a unique_ptr.
946 (remote_gdbarch_data_handle): Delete.
947 (get_remote_arch_state): Delete.
948 (remote_state::get_remote_arch_state): New.
949 (get_remote_state): Adjust to call remote_state's
950 get_remote_arch_state method.
951 (init_remote_state): Delete, bits factored out to ...
952 (remote_arch_state::remote_arch_state): ... this new method.
953 (get_remote_packet_size, get_memory_packet_size)
954 (process_g_packet, remote_target::fetch_registers)
955 (remote_target::prepare_to_store, store_registers_using_G)
956 (remote_target::store_registers, remote_target::get_trace_status):
957 Adjust to call remote_state's method.
958 (_initialize_remote): Remove reference to
959 remote_gdbarch_data_handle.
961 2018-05-22 Pedro Alves <palves@redhat.com>
963 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
964 pread>: New method declarations.
965 (remote_target::open_1): Adjust.
966 (readahead_cache_invalidate): Rename to ...
967 (readahead_cache::invalidate): ... this, and adjust to be a class
969 (readahead_cache_invalidate_fd): Rename to ...
970 (readahead_cache::invalidate_fd): ... this, and adjust to be a
972 (remote_hostio_pwrite): Adjust.
973 (remote_hostio_pread_from_cache): Rename to ...
974 (readahead_cache::pread): ... this, and adjust to be a class
976 (remote_hostio_close): Adjust.
978 2018-05-22 Pedro Alves <palves@redhat.com>
980 * remote.c (remote_hostio_close_cleanup): Delete.
981 (class scoped_remote_fd): New.
982 (remote_file_put, remote_file_get): Use it.
984 2018-05-22 Pedro Alves <palves@redhat.com>
986 (struct vCont_action_support): Use bool and initialize all fields.
987 (struct readahead_cache): Initialize all fields.
988 (remote_state): Use bool and initialize all fields.
989 (remote_state::remote_state, remote_state::~remote_state): New.
990 (new_remote_state): Delete.
991 (_initialize_remote): Use new to allocate remote_state.
993 2018-05-22 Pedro Alves <palves@redhat.com>
997 * c-exp.y: Include "c-support.h".
998 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
999 of tolower. Use c_ident_is_alpha to scan names.
1000 * c-lang.c: Include "c-support.h".
1001 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1002 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1003 * c-support.h: New file, with bits factored out from ...
1004 * cp-name-parser.y: ... this file.
1005 Include "c-support.h".
1006 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1007 c-support.h and renamed.
1008 (symbol_end, yylex): Adjust.
1010 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1012 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1013 parameter type to CORE_ADDR.
1014 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1015 parameter type in declaration to CORE_ADDR.
1016 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1017 target_auxv_search to get AT_HWCAP and use the result to get the
1019 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1020 to CORE_ADDR. Remove the cast of the return value to unsigned
1021 long. Fix error predicate of target_auxv_search.
1022 (ppc_linux_nat_target::read_description): Change the type of the
1023 hwcap variable to CORE_ADDR.
1025 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1027 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1028 if the size of fpscr is larger than 32 bits.
1030 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1032 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1033 (ppc32_linux_vsxregmap): New global.
1034 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1035 regcache_supply_regset, and regcache_collect_regset.
1036 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1037 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1038 (fetch_vsx_register, store_vsx_register): Remove.
1039 (fetch_vsx_registers): Add regno parameter. Get regset using
1040 ppc_linux_vsxregset. Use regset to supply registers.
1041 (store_vsx_registers): Add regno parameter. Get regset using
1042 ppc_linux_vsxregset. Use regset to collect registers.
1043 (fetch_register): Call fetch_vsx_registers instead of
1045 (store_register): Call store_vsx_registers instead of
1047 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1048 new regno parameter.
1049 (store_ppc_registers): Call store_vsx_registers with -1 for the
1050 new regno parameter.
1051 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1052 (ppc_collect_vsxregset): Remove.
1054 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1056 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1058 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1059 for vector register offset fields.
1060 (ppc64_fbsd_reg_offsets): Likewise.
1061 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1062 to vector register offset fields.
1063 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1064 to vector register offset fields.
1065 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1066 vector register offset fields.
1067 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1068 initializers for vector register offset fields.
1069 (rs6000_aix64_reg_offsets): Likewise.
1070 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1071 (ppc_supply_vrregset): Remove.
1072 (ppc_collect_vrregset): Remove.
1073 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1074 (ppc_linux_vrregset) : New function.
1075 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1076 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1077 (ppc32_linux_vrregset): Remove.
1078 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1079 and use result instead of ppc32_linux_vrregset.
1080 (ppc32_linux_reg_offsets): Remove initializers for vector register
1082 (ppc64_linux_reg_offsets): Likewise.
1083 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1084 * ppc-linux-nat.c: Include regset.h.
1085 (gdb_vrregset_t): Adjust comment to account for little-endian
1087 (supply_vrregset, fill_vrregset): Remove.
1088 (fetch_altivec_register, store_altivec_register): Remove.
1089 (fetch_altivec_registers): Add regno parameter. Get regset using
1090 ppc_linux_vrregset. Use regset to supply registers.
1091 (store_altivec_registers): Add regno parameter. Get regset using
1092 ppc_linux_vrregset. Use regset to collect registers.
1093 (fetch_register): Call fetch_altivec_registers instead of
1094 fetch_altivec_register.
1095 (store_register): Call store_altivec_registers instead of
1096 store_altivec_register.
1097 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1098 the new regno parameter.
1099 (store_ppc_registers): Call store_altivec_registers with -1 for
1100 the new regno parameter.
1102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1104 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1105 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1106 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1107 (gdb_vrregset_t): Change array type size to
1108 PPC_LINUX_SIZEOF_VRREGSET.
1109 (gdb_vsxregset_t): Change array type size to
1110 PPC_LINUX_SIZEOF_VSXREGSET.
1111 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1112 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1113 PPC_LINUX_SIZEOF_VSXREGSET.
1115 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1117 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1118 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1120 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1121 ppc_linux_target_wordsize with tid.
1122 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1124 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1125 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1126 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1127 tid parameter. Remove static specifier.
1128 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1129 (ppc_linux_target_wordsize): New declaration.
1131 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1133 * arch/ppc-linux-common.c: New file.
1134 * arch/ppc-linux-common.h: New file.
1135 * arch/ppc-linux-tdesc.h: New file.
1136 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1137 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1138 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1139 arch/ppc-linux-tdesc.h.
1140 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1141 arch/ppc-linux-tdesc.h.
1142 (ppc_linux_nat_target::read_description): Remove target
1143 description matching code. Fill a ppc_linux_features struct and
1144 call ppc_linux_match_description with it. Move comment about ISA
1145 2.05 to ppc-linux-common.c.
1146 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1147 arch/ppc-linux-tdesc.h.
1148 (ppc_linux_core_read_description): Remove target description
1149 matching code. Fill a ppc_linux_features struct and call
1150 ppc_linux_match_description with it.
1151 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1152 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1153 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1154 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1155 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1156 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1157 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1158 (tdesc_powerpc_e500l): Remove.
1160 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1162 * ada-lang.c (catch_assert_command): Pass empty string instead
1163 of NULL for excep_string argument.
1165 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1167 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1168 the width of the requested register exceeds the width of the
1171 2018-05-21 Tom Tromey <tom@tromey.com>
1173 * printcmd.c (output_command): Remove.
1174 (output_command_const): Rename to output_command.
1175 * valprint.h (output_command): Rename from output_command_const.
1176 * tracepoint.c (trace_dump_actions): Call output_command.
1178 2018-05-21 Tom Tromey <tom@tromey.com>
1180 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1181 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1182 * ada-lang.h (create_ada_exception_catchpoint): Update.
1183 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1185 (create_excep_cond_exprs, ~ada_catchpoint)
1186 (should_stop_exception, print_one_exception)
1187 (print_mention_exception, print_recreate_exception): Update.
1188 (ada_get_next_arg): Remove.
1189 (catch_ada_exception_command_split): Use std::string. Change type
1190 of "excep_string", "cond_string".
1191 (catch_ada_exception_command): Update.
1192 (create_ada_exception_catchpoint): Change type of excep_string.
1193 (ada_exception_sal): Remove excep_string parameter.
1194 (~ada_catchpoint): Remove.
1196 2018-05-21 Tom Tromey <tom@tromey.com>
1198 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1201 2018-05-21 Tom Tromey <tom@tromey.com>
1203 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1204 Return unique_xmalloc_ptr.
1205 (print_it_exception): Update.
1207 2018-05-21 Tom Tromey <tom@tromey.com>
1209 * tracepoint.c (trace_dump_actions): Use std::string.
1211 2018-05-21 Tom Tromey <tom@tromey.com>
1213 * symfile.c (reread_symbols): Use std::string for original_name.
1215 2018-05-21 Tom Tromey <tom@tromey.com>
1217 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1218 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1221 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1223 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1225 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1226 * objfiles.c (get_objfile_bfd_data): Allocate
1227 objfile_per_bfd_storage with obstack_new when allocating on
1230 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1232 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1234 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1235 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1236 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1237 (add_pending): Likewise.
1238 (parse_symbol): Likewise.
1239 (parse_partial_symbols): Likewise.
1240 (psymtab_to_symtab_1): Likewise.
1241 (new_psymtab): Likewise.
1242 (elfmdebug_build_psymtabs): Likewise.
1243 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1244 * objfiles.c (get_objfile_bfd_data): Likewise.
1245 (objfile_register_static_link): Likewise.
1246 * psymtab.c (allocate_psymtab): Likewise.
1247 * stabsread.c (read_member_functions): Likewise.
1248 * xcoffread.c (xcoff_end_psymtab): Likewise.
1250 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1252 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1253 compiler supports std::is_trivially_constructible.
1254 * common/poison.h: Include obstack.h.
1255 (IsMallocable): Define to is_trivially_constructible if the
1256 compiler supports it, define to true_type otherwise.
1260 (XOBNEWVEC): Redefine.
1261 * gdb_obstack.h (obstack_zalloc): New.
1262 (OBSTACK_ZALLOC): Redefine.
1263 (obstack_calloc): New.
1264 (OBSTACK_CALLOC): Redefine.
1266 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1267 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1269 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1270 obstack_calloc/obstack_zalloc.
1271 (gdbarch_obstack_zalloc): Remove.
1272 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1274 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1276 * stack.c (backtrace_command_1): Remove useless variable int i.
1278 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1280 * stack.c (print_frame_info): Fix comment.
1282 2018-05-18 Tom Tromey <tom@tromey.com>
1284 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1285 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1286 (~dwarf2_per_objfile): Update
1287 (dwarf2_get_dwz_file): Use new.
1288 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1291 2018-05-18 Tom Tromey <tom@tromey.com>
1293 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1295 * dwarf2read.c (struct dwp_file): Add constructor and
1297 (open_and_init_dwp_file): Return a unique_ptr.
1298 (dwarf2_per_objfile, create_dwp_hash_table)
1299 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1300 (lookup_dwo_unit_in_dwp): Update.
1301 (open_and_init_dwp_file, get_dwp_file): Update.
1303 2018-05-18 Tom Tromey <tom@tromey.com>
1305 * dwarf2read.c (dwarf2_per_objfile): Update.
1306 (struct mapped_index): Add initializers.
1307 (dwarf2_read_index): Use new.
1308 (dw2_symtab_iter_init): Update.
1309 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1312 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1314 * dwarf2read.c (mapped_index) <total_size>: Remove.
1316 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1318 * unittests/format_pieces-selftests.c (test_format_specifier):
1321 2018-05-18 Tom Tromey <tom@tromey.com>
1323 * c-typeprint.c (maybe_print_hole): New function.
1324 (c_print_type_struct_field_offset): Update.
1325 (c_type_print_base_struct_union): Call maybe_print_hole.
1327 2018-05-17 Keith Seitz <keiths@redhat.com>
1329 * breakpoint.c (build_bpstat_chain): New function, moved from
1331 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1332 If no stop chain is passed, call build_bpstat_chain to build it.
1333 * breakpoint.h (build_bpstat_chain): Declare.
1334 (bpstat_stop_status): Move documentation here from breakpoint.c.
1335 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1336 build the stop chain and pass it to skip_inline_frames.
1337 Pass this stop chain to bpstat_stop_status.
1338 * inline-frame.c: Include breakpoint.h.
1339 (stopped_by_user_bp_inline_frame): New function.
1340 (skip_inline_frames): Add parameter `stop_chain'.
1341 Move documention to inline-frame.h.
1342 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1343 whether the frame should be elided.
1344 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1345 Add moved documentation and update for new parameter.
1347 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1351 unittests/format_pieces-selftests.c.
1352 * common/format.h (format_piece) <operator==>: New.
1353 (format_pieces) <operator[]>: Remove.
1354 * common/format.c (format_pieces::format_pieces): Handle \e.
1355 * unittests/format_pieces-selftests.c: New.
1357 2018-05-17 Tom Tromey <tom@tromey.com>
1360 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1361 (dw2_instantiate_symtab): Add skip_partial parameter.
1362 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1363 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1364 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1365 (dw2_expand_symtabs_matching_one)
1366 (dw2_find_pc_sect_compunit_symtab)
1367 (dw2_debug_names_lookup_symbol)
1368 (dw2_debug_names_expand_symtabs_for_function): Update.
1369 (init_cutu_and_read_dies): Add skip_partial parameter.
1370 (process_psymtab_comp_unit, build_type_psymtabs_1)
1371 (process_skeletonless_type_unit, load_partial_comp_unit)
1372 (psymtab_to_symtab_1): Update.
1373 (load_full_comp_unit): Add skip_partial parameter.
1374 (process_imported_unit_die, dwarf2_read_addr_index)
1375 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1376 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1377 (read_signatured_type): Update.
1379 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1381 * value.c (release_value): Remove unused variable.
1382 (record_latest_value): Likewise.
1383 (access_value_history): Likewise.
1384 (preserve_values): Likewise.
1386 2018-05-17 Tom Tromey <tom@tromey.com>
1388 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1391 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1394 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1395 Also handle registers whose width is not a multiple of
1397 (linux_nat_trad_target::store_register): Likewise.
1399 2018-05-16 Tom Tromey <tom@tromey.com>
1401 * gdbcore.h (core_bfd): Redefine.
1402 * corelow.c (core_target::close): Update.
1403 (core_target_open): Update.
1404 * progspace.h (struct program_space) <cbfd>: Now a
1407 2018-05-16 Tom Tromey <tom@tromey.com>
1410 * symfile-add-flags.h (enum symfile_add_flags)
1411 <SYMFILE_NOT_FILENAME>: New constant.
1412 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1413 objfile name from BFD.
1414 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1415 * minidebug.c (find_separate_debug_file_in_section): Put
1416 ".gnu_debugdata" into BFD's file name.
1418 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1420 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1423 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1426 * aarch64-tdep.c (aarch64_analyze_prologue,
1427 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1428 Indicate not interested in errors.
1430 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1432 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1433 Supply the MIPS_ZERO_REGNUM register.
1435 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1437 * mips-tdep.c (mask_address_var): Make variable static.
1439 2018-05-14 Tom Tromey <tom@tromey.com>
1441 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1443 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1445 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1446 FXSAVE_ADDR for the mxcsr register.
1448 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1450 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1452 2018-05-11 Pedro Alves <palves@redhat.com>
1454 * corelow.c (core_target) <core_target>: No longer inline.
1455 Initialize m_core_gdbarch, m_core_vec and build the section table
1457 <~core_target>: New.
1458 <core_gdbarch, get_core_register_section>: New methods.
1459 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1460 factored out from ...
1461 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1463 (sniff_core_bfd): Add gdbarch parameter.
1464 (core_close): Delete, merged into ...
1465 (core_target::close): ... here. Delete self.
1466 (core_close_cleanup): Delete.
1467 (core_target_open): Allocate a core_target on the heap. Use a
1468 unique_ptr instead of a cleanup. Bits moved into the core_target
1469 ctor. Adjust to use core_target methods instead of globals.
1470 (get_core_register_section): Rename to ...
1471 (core_target::get_core_register_section): ... this and adjust.
1472 (struct get_core_registers_cb_data): New.
1473 (get_core_registers_cb): Use it. Use bool.
1474 (core_target::fetch_registers, core_target::files_info)
1475 (core_target::xfer_partial, core_target::read_description)
1476 (core_target::pid_to, core_target::thread_name): Adjust to
1477 reference class fields instead of globals.
1478 * target.h (struct target_ops_deleter, target_ops_up): New.
1480 2018-05-11 Pedro Alves <palves@redhat.com>
1482 * corefile.c (core_file_command): Move to corelow.c.
1483 * corelow.c (the_core_target): Delete.
1484 (core_file_command): Moved from corefile.c. Check exec_bfd
1485 instead of the_core_target. Use target_detach instead of calling
1486 into the_core_target directly.
1487 (maybe_say_no_core_file_now): New.
1488 (core_target::detach): Use it.
1489 (_initialize_corelow): Remove references to the_core_target.
1490 * gdbcore.h (the_core_target): Delete.
1492 2018-05-11 Tom Tromey <tromey@redhat.com>
1493 Pedro Alves <palves@redhat.com>
1495 * corefile.c (core_bfd): Remove.
1496 * gdbcore.h (core_bfd): Now a macro.
1497 * progspace.h (struct program_space) <cbfd>: New field.
1499 2018-05-11 Tom Tromey <tom@tromey.com>
1501 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1504 2018-05-10 Tom Tromey <tom@tromey.com>
1506 * configure: Rebuild.
1507 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1509 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1512 * regformats/regdat.sh: Adjust script, following the addition
1513 of the new expedite_regs parameter to init_target_desc.
1515 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1518 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1519 set_gdbarch_significant_addr_bit.
1520 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1521 set_gdbarch_significant_addr_bit.
1522 * utils.c (address_significant): Update to sign extend addr.
1524 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1526 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1527 (xtensa_linux_init_abi): Limit tdep->num_regs by
1528 tdep->num_nopriv_regs.
1529 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1530 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1533 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1535 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1537 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1539 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1540 (I387_MXCSR_INIT_VAL): New constant.
1541 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1542 buffer if it was supplied by the inferior.
1543 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1544 (i387_xsave_get_clear_bv): New function.
1545 (i387_supply_xsave): Only read x87 control registers from the
1546 xsave buffer if the feature is enabled, and the state will have
1547 been written, otherwise, provide a suitable default.
1548 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1549 including x87 control registers. Update control registers if they
1550 have changed from the default value, and mark features as enabled
1552 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1554 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1556 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1558 2018-05-07 Tom Tromey <tom@tromey.com>
1560 * configure: Rebuild.
1561 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1563 2018-05-07 Tom Tromey <tom@tromey.com>
1566 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1567 bit. Use correct value for VDIV.
1569 2018-05-04 Tom Tromey <tom@tromey.com>
1571 * configure: Rebuild.
1572 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1574 2018-05-04 Tom Tromey <tom@tromey.com>
1576 * linux-record.c (record_linux_system_call) <case
1577 RECORD_SYS_RECVFROM>: Add "break".
1579 2018-05-04 Tom Tromey <tom@tromey.com>
1581 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1582 Add missing "break".
1583 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1584 Add missing "break".
1586 2018-05-04 Tom Tromey <tom@tromey.com>
1588 * rs6000-tdep.c (ppc_process_record_op4)
1589 (ppc_process_record_op63): Add fall-through comment.
1591 2018-05-04 Tom Tromey <tom@tromey.com>
1593 * i386-tdep.c (i386_process_record): Add fall-through comment.
1595 2018-05-04 Tom Tromey <tom@tromey.com>
1597 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1600 2018-05-04 Tom Tromey <tom@tromey.com>
1602 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1603 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1604 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1606 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1608 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1611 2018-05-04 Tom Tromey <tom@tromey.com>
1613 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1615 2018-05-04 Tom Tromey <tom@tromey.com>
1617 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1618 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1619 * symfile.c (section_is_mapped): Fix fall-through comment.
1620 * stabsread.c (define_symbol, read_member_functions): Fix
1621 fall-through comment.
1622 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1624 * remote.c (remote_wait_as): Fix fall-through comment.
1625 * p-exp.y (yylex): Fix fall-through comment.
1626 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1628 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1629 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1630 * jv-exp.y (yylex): Fix fall-through comment.
1631 * go-exp.y (lex_one_token): Fix fall-through comment.
1632 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1633 fall-through comment.
1634 * f-exp.y (yylex): Fix fall-through comment.
1635 * dwarf2read.c (process_die): Fix fall-through comments.
1636 * dbxread.c (process_one_symbol): Fix fall-through comment.
1637 * d-exp.y (lex_one_token): Fix fall-through comment.
1638 * cp-name-parser.y (yylex): Fix fall-through comment.
1639 * coffread.c (coff_symtab_read): Fix fall-through comment.
1640 * c-exp.y (lex_one_token): Fix fall-through comment.
1641 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1643 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1646 2018-05-04 Tom Tromey <tom@tromey.com>
1649 * NEWS: Mention gdb.execute change.
1650 * gdbcmd.h (execute_control_command): Don't declare.
1651 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1652 execute_control_commands, execute_control_commands_to_string.
1653 * cli/cli-script.h (execute_control_commands)
1654 (execute_control_commands_to_string): Declare.
1655 (execute_control_command): Add from_tty parameter.
1656 * cli/cli-script.c (execute_control_commands)
1657 (execute_control_commands_to_string): New functions.
1658 (execute_user_command): Use execute_control_commands.
1659 (execute_control_command_1): Add "from_tty" parameter. Update.
1660 (execute_control_command): Likewise.
1662 2018-05-04 Tom Tromey <tom@tromey.com>
1665 * NEWS: Mention that breakpoint commands are writable.
1666 * python/py-breakpoint.c (bppy_set_commands): New function.
1667 (breakpoint_object_getset) <"commands">: Use it.
1669 2018-05-04 Tom Tromey <tom@tromey.com>
1671 * tracepoint.c (actions_command): Update.
1672 * mi/mi-cmd-break.c (mi_command_line_array)
1673 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1674 (mi_read_next_line): Remove.
1675 (mi_cmd_break_commands): Update.
1676 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1678 * cli/cli-script.c (get_command_line): Update.
1679 (process_next_line): Use function_view. Constify.
1680 (recurse_read_control_structure, read_command_lines)
1681 (read_command_lines_1): Change argument types to function_view.
1682 (do_define_command, document_command): Update.
1683 * breakpoint.h (check_tracepoint_command): Don't declare.
1684 * breakpoint.c (check_tracepoint_command): Remove.
1685 (commands_command_1, create_tracepoint_from_upload): Update.
1687 2018-05-04 Tom Tromey <tom@tromey.com>
1690 * cli/cli-script.h (enum command_control_type) <define_control>:
1692 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1693 (build_command_line, execute_control_command_1)
1694 (process_next_line): Likewise.
1695 (do_define_command): New function, extracted from define_command.
1696 (define_command): Use it.
1698 2018-05-04 Tom Tromey <tom@tromey.com>
1700 * tracepoint.c (actions_command): Update.
1701 * cli/cli-script.h (read_command_lines): Update.
1702 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1703 (MAX_TMPBUF): Remove define.
1704 (define_command): Use string_printf.
1705 (document_command): Likewise.
1706 * breakpoint.c (commands_command_1): Update.
1708 2018-05-04 Tom Tromey <tom@tromey.com>
1710 * top.c (execute_command): Update.
1711 * cli/cli-script.h (print_command_lines): Now varargs.
1712 * cli/cli-script.c (print_command_lines): Now varargs.
1713 (execute_control_command_1) <case while_control, case if_control>:
1716 2018-05-04 Tom Tromey <tom@tromey.com>
1718 * tracepoint.c (all_tracepoint_actions): Rename from
1719 all_tracepoint_actions_and_cleanup. Change return type.
1720 (actions_command, encode_actions_1, encode_actions)
1721 (trace_dump_actions, tdump_command): Update.
1722 * remote.c (remote_download_command_source): Update.
1723 * python/python.c (gdbpy_eval_from_control_command)
1724 (python_command, python_interactive_command): Update.
1725 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1726 * guile/guile.c (guile_command)
1727 (gdbscm_eval_from_control_command, guile_command): Update.
1728 * compile/compile.c (compile_code_command)
1729 (compile_print_command, compile_to_object): Update.
1730 * cli/cli-script.h (struct command_lines_deleter): New.
1731 (counted_command_line): New typedef.
1732 (struct command_line): Add constructor, destructor.
1733 <body_list>: Remove.
1734 <body_list_0, body_list_1>: New members.
1735 (command_line_up): Remove typedef.
1736 (read_command_lines, read_command_lines_1, get_command_line):
1738 (copy_command_lines): Don't declare.
1739 * cli/cli-script.c (build_command_line): Use "new".
1740 (get_command_line): Return counted_command_line.
1741 (print_command_lines, execute_user_command)
1742 (execute_control_command_1, while_command, if_command): Update.
1743 (realloc_body_list): Remove.
1744 (process_next_line, recurse_read_control_structure): Update.
1745 (read_command_lines, read_command_lines_1): Return counted_command_line.
1746 (free_command_lines): Use "delete".
1747 (copy_command_lines): Remove.
1748 (define_command, document_command, show_user_1): Update.
1749 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1750 a counted_command_line.
1751 * breakpoint.h (counted_command_line): Remove typedef.
1752 (breakpoint_set_commands): Update.
1753 * breakpoint.c (check_no_tracepoint_commands)
1754 (validate_commands_for_breakpoint): Update.
1755 (breakpoint_set_commands): Change commands to be a
1756 counted_command_line.
1757 (commands_command_1, update_dprintf_command_list)
1758 (create_tracepoint_from_upload): Update.
1760 2018-05-04 Tom Tromey <tom@tromey.com>
1762 * cli/cli-decode.h (cmd_list_element): New constructor.
1763 (~cmd_list_element): New destructor.
1764 (struct cmd_list_element): Add initializers.
1765 * cli/cli-decode.c (do_add_cmd): Use "new".
1766 (delete_cmd): Use "delete".
1768 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1769 Pedro Alves <palves@redhat.com>
1771 PR breakpoints/19806 and support for PR external/20207.
1772 * NEWS: Mention Aarch64 watchpoint improvements.
1773 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1774 watchpoints and PR external/20207 watchpoints.
1775 * nat/aarch64-linux-hw-point.c
1776 (kernel_supports_any_contiguous_range): New.
1777 (aarch64_watchpoint_offset): New.
1778 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1779 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1780 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1781 (aarch64_align_watchpoint): New parameters aligned_offset_p and
1782 next_addr_orig_p. Support PR external/20207 watchpoints.
1783 (aarch64_downgrade_regs): New.
1784 (aarch64_dr_state_insert_one_point): New parameters offset and
1786 (aarch64_dr_state_remove_one_point): Likewise.
1787 (aarch64_handle_breakpoint): Update caller.
1788 (aarch64_handle_aligned_watchpoint): Likewise.
1789 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1791 (aarch64_linux_set_debug_regs): Remove const from state. Call
1792 aarch64_downgrade_regs.
1793 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1794 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1795 (DR_CONTROL_MASK): ... this.
1796 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1797 (unsigned int aarch64_watchpoint_offset): New prototype.
1798 (aarch64_linux_set_debug_regs): Remove const from state.
1799 * utils.c (align_up, align_down): Move to ...
1800 * common/common-utils.c (align_up, align_down): ... here.
1801 * utils.h (align_up, align_down): Move to ...
1802 * common/common-utils.h (align_up, align_down): ... here.
1804 2018-05-04 Joel Brobecker <brobecker@adacore.com>
1806 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1807 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1808 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1809 Re-implement to match the ABI as summarized in GCC's
1810 gcc/config/sparc/sparc.c. All callers updated.
1811 (sparc32_store_arguments): Remove assertion.
1813 2018-05-04 Tom Tromey <tom@tromey.com>
1815 * printcmd.c: Don't include tui.h.
1816 (decode_format): Use skip_spaces.
1818 2018-05-04 Tom Tromey <tom@tromey.com>
1821 * printcmd.c (last_count): New global.
1822 (x_command): Use saved count when repeating.
1824 2018-05-04 Tom Tromey <tom@tromey.com>
1826 * nto-procfs.c (do_closedir_cleanup): Remove.
1827 (procfs_pidlist): Use gdb_dir_up.
1828 * procfs.c (do_closedir_cleanup): Remove.
1829 (proc_update_threads): Use gdb_dir_up.
1830 * common/filestuff.h (struct gdb_dir_deleter): New.
1831 (gdb_dir_up): New typedef.
1833 2018-05-04 Tom Tromey <tom@tromey.com>
1835 * ada-lang.c (print_mention_exception): Use std::string.
1837 2018-05-04 Tom Tromey <tom@tromey.com>
1839 * ada-lang.c (create_excep_cond_exprs): Update.
1840 (ada_exception_catchpoint_cond_string): Use std::string.
1842 2018-05-04 Tom Tromey <tom@tromey.com>
1844 * ada-lang.c (xget_renaming_scope): Return std::string.
1845 (old_renaming_is_invisible): Update.
1847 2018-05-04 Tom Tromey <tom@tromey.com>
1849 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1850 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1852 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
1854 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1856 2018-05-04 Tom Tromey <tom@tromey.com>
1858 * remote.c (remote_query_supported_append): Change type.
1859 (remote_check_symbols): Update.
1861 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
1864 * configure.ac: Prepend libpython.
1865 * python/python-config.py: Likewise.
1866 * configure: Regenerate.
1868 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
1870 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1872 2018-05-03 Pedro Alves <palves@redhat.com>
1875 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1876 override. Write 'true' instead of '1'.
1877 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1880 2018-05-02 Pedro Alves <palves@redhat.com>
1882 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1883 add_inf_child_target.
1884 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1885 add_inf_child_target.
1886 * aix-thread.c (aix_thread_target_info): New.
1887 (aix_thread_target) <shortname, longname, doc>: Delete.
1889 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1890 add_inf_child_target.
1891 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1892 add_inf_child_target.
1893 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1894 add_inf_child_target.
1895 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1896 add_inf_child_target.
1897 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1898 add_inf_child_target.
1899 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1900 add_inf_child_target.
1901 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1902 add_inf_child_target.
1903 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1904 add_inf_child_target.
1905 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1906 add_inf_child_target.
1907 * bfd-target.c (target_bfd_target_info): New.
1908 (target_bfd) <shortname, longname, doc>: Delete.
1910 * bsd-kvm.c (bsd_kvm_target_info): New.
1911 (bsd_kvm_target) <shortname, longname, doc>: Delete.
1913 (bsd_kvm_target::open): Rename to ...
1914 (bsd_kvm_target_open): ... this. Adjust.
1915 * bsd-uthread.c (bsd_uthread_target_info): New.
1916 (bsd_uthread_target) <shortname, longname, doc>: Delete.
1918 * corefile.c (core_file_command): Adjust.
1919 * corelow.c (core_target_info): New.
1920 (core_target) <shortname, longname, doc>: Delete.
1922 (core_target::open): Rename to ...
1923 (core_target_open): ... this. Adjust.
1924 * ctf.c (ctf_target_info): New.
1925 (ctf_target) <shortname, longname, doc>: Delete.
1927 (ctf_target::open): Rename to ...
1928 (ctf_target_open): ... this.
1929 (_initialize_ctf): Adjust.
1930 * exec.c (exec_target_info): New.
1931 (exec_target) <shortname, longname, doc>: Delete.
1933 (exec_target::open): Rename to ...
1934 (exec_target_open): ... this.
1935 * gdbcore.h (core_target_open): Declare.
1936 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1937 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1938 add_inf_child_target.
1939 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1940 add_inf_child_target.
1941 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1942 add_inf_child_target.
1943 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1944 add_inf_child_target.
1945 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1946 add_inf_child_target.
1947 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1948 add_inf_child_target.
1949 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1950 add_inf_child_target.
1951 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1952 add_inf_child_target.
1953 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1954 add_inf_child_target.
1955 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1956 add_inf_child_target.
1957 * inf-child.c (inf_child_target_info): New.
1958 (inf_child_target::info): New.
1959 (inf_child_open_target): Remove 'target' parameter. Use
1960 get_native_target instead.
1961 (inf_child_target::open): Delete.
1962 (add_inf_child_target): New.
1963 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1966 (add_inf_child_target): Declare.
1967 (inf_child_open_target): Declare.
1968 * linux-thread-db.c (thread_db_target_info): New.
1969 (thread_db_target) <shortname, longname, doc>: Delete.
1971 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1972 add_inf_child_target.
1973 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1974 add_inf_child_target.
1975 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1976 add_inf_child_target.
1977 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1978 add_inf_child_target.
1979 * make-target-delegates (print_class): Adjust.
1980 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1981 add_inf_child_target.
1982 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1983 add_inf_child_target.
1984 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1985 add_inf_child_target.
1986 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1987 add_inf_child_target.
1988 * nto-procfs.c (nto_native_target_info): New.
1989 (nto_procfs_target_native) <shortname, longname, doc>:
1992 (nto_procfs_target_info): New.
1993 (nto_procfs_target_procfs) <shortname, longname, doc>:
1996 (init_procfs_targets): Adjust.
1997 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1998 add_inf_child_target.
1999 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2000 add_inf_child_target.
2001 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2002 add_inf_child_target.
2003 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2004 add_inf_child_target.
2005 * ravenscar-thread.c (ravenscar_target_info): New.
2006 (ravenscar_thread_target) <shortname, longname, doc>:
2009 * record-btrace.c (record_btrace_target_info):
2010 (record_btrace_target) <shortname, longname, doc>: Delete.
2012 (record_btrace_target::open): Rename to ...
2013 (record_btrace_target_open): ... this. Adjust.
2014 * record-full.c (record_longname, record_doc): New.
2015 (record_full_base_target) <shortname, longname, doc>: Delete.
2017 (record_full_target_info): New.
2018 (record_full_target): <shortname>: Delete.
2020 (record_full_core_open_1, record_full_open_1): Update comments.
2021 (record_full_base_target::open): Rename to ...
2022 (record_full_open): ... this.
2023 (cmd_record_full_restore): Update.
2024 (_initialize_record_full): Update.
2025 * remote-sim.c (remote_sim_target_info): New.
2026 (gdbsim_target) <shortname, longname, doc>: Delete.
2028 (gdbsim_target::open): Rename to ...
2029 (gdbsim_target_open): ... this.
2030 (_initialize_remote_sim): Adjust.
2031 * remote.c (remote_doc): New.
2032 (remote_target_info): New.
2033 (remote_target) <shortname, longname, doc>: Delete.
2035 (extended_remote_target_info): New.
2036 (extended_remote_target) <shortname, longname, doc>: Delete.
2038 (remote_target::open_1): Make static. Adjust.
2039 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2040 * s390-linux-nat.c (_initialize_s390_nat): Use
2041 add_inf_child_target.
2042 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2043 add_inf_child_target.
2044 * sol-thread.c (thread_db_target_info): New.
2045 (sol_thread_target) <shortname, longname, doc>: Delete.
2047 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2048 add_inf_child_target.
2049 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2050 add_inf_child_target.
2051 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2052 add_inf_child_target.
2053 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2054 add_inf_child_target.
2055 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2056 add_inf_child_target.
2057 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2058 add_inf_child_target.
2059 * spu-linux-nat.c (_initialize_spu_nat): Use
2060 add_inf_child_target.
2061 * spu-multiarch.c (spu_multiarch_target_info): New.
2062 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2064 * target-delegates.c: Regenerate.
2065 * target.c: Include <unordered_map>.
2066 (target_ops_p): Delete.
2067 (DEF_VEC_P(target_ops_p)): Delete.
2068 (target_factories): New.
2069 (test_target_info): New.
2070 (test_target_ops::info): New.
2071 (open_target): Adjust to use target_factories.
2072 (add_target_with_completer): Rename to ...
2073 (add_target): ... this. Change prototype. Register target_info
2074 and open callback in target_factories. Register target_info in
2075 command context instead of target_ops.
2076 (add_target): Delete old implementation.
2077 (add_deprecated_target_alias): Change prototype. Adjust.
2078 (the_native_target): New.
2079 (set_native_target, get_native_target): New.
2080 (find_default_run_target): Use the_native_target.
2081 (find_attach_target, find_run_target): Simplify.
2082 (target_ops::open): Delete.
2083 (dummy_target_info): New.
2084 (dummy_target::shortname, dummy_target::longname)
2085 (dummy_target::doc): Delete.
2086 (dummy_target::info): New.
2087 (debug_target::shortname, debug_target::longname)
2088 (debug_target::doc): Delete.
2089 (debug_target::info): New.
2090 * target.h (struct target_info): New.
2091 (target_ops::~target_ops): Add comment.
2092 (target_ops::info): New.
2093 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2094 longer virtual. Implement in terms of target_info.
2095 (set_native_target, get_native_target): Declare.
2096 (target_open_ftype): New.
2097 (add_target, add_target_with_completer)
2098 (add_deprecated_target_alias): Change prototype.
2099 (test_target) <shortname, longname, doc>: Delete.
2101 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2102 add_inf_child_target.
2103 * tracefile-tfile.c (tfile_target_info): New.
2104 (tfile_target) <shortname, longname, doc>: Delete.
2106 (tfile_target::open): Rename to ...
2107 (tfile_target_open): ... this.
2108 (_initialize_tracefile_tfile): Adjust.
2109 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2110 add_inf_child_target.
2111 * windows-nat.c (_initialize_windows_nat): Use
2112 add_inf_child_target.
2113 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2114 add_inf_child_target.
2116 2018-05-02 Pedro Alves <palves@redhat.com>
2118 * linux-nat.h (linux_nat_target) <low_new_thread,
2119 low_delete_thread, low_new_fork, low_forget_process,
2120 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2121 New virtual methods.
2122 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2123 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2124 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2125 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2126 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2128 * linux-fork.c (delete_fork): Adjust to call low method.
2129 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2130 (linux_nat_new_fork, linux_nat_forget_process_hook)
2131 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2132 (linux_nat_status_is_event):
2133 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2134 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2136 (sigtrap_is_event): Rename to ...
2137 (linux_nat_target::low_status_is_event): ... this.
2138 (linux_nat_set_status_is_event): Delete.
2139 (save_stop_reason, linux_nat_wait_1)
2140 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2142 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2143 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2144 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2145 (linux_nat_set_prepare_to_resume): Delete.
2146 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2147 low virtual methods.
2148 * amd64-linux-nat.c: Likewise.
2149 * arm-linux-nat.c: Likewise.
2150 * i386-linux-nat.c: Likewise.
2151 * ia64-linux-nat.c: Likewise.
2152 * mips-linux-nat.c: Likewise.
2153 * ppc-linux-nat.c: Likewise.
2154 * s390-linux-nat.c: Likewise.
2155 * sparc64-linux-nat.c: Likewise.
2156 * x86-linux-nat.c: Likewise.
2157 * x86-linux-nat.h: Include "nat/x86-linux.h".
2158 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2159 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2162 2018-05-02 Pedro Alves <palves@redhat.com>
2164 * target.h (target_ops)
2165 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2166 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2167 stopped_by_watchpoint, have_continuable_watchpoint,
2168 stopped_data_address, watchpoint_addr_within_range,
2169 can_accel_watchpoint_condition, can_run, thread_alive,
2170 has_all_memory, has_memory, has_stack, has_registers,
2171 has_execution, can_async_p, is_async_p, supports_non_stop,
2172 always_non_stop_p, can_execute_reverse, supports_multi_process,
2173 supports_enable_disable_tracepoint,
2174 supports_disable_randomization, supports_string_tracing,
2175 supports_evaluation_of_breakpoint_conditions,
2176 can_run_breakpoint_commands, filesystem_is_local,
2177 can_download_tracepoint, get_trace_state_variable_value,
2178 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2179 record_is_replaying, record_will_replay,
2180 augmented_libraries_svr4_read>: Adjust to return bool.
2181 * aarch64-linux-nat.c: All implementations adjusted.
2182 * aix-thread.c: All implementations adjusted.
2183 * arm-linux-nat.c: All implementations adjusted.
2184 * breakpoint.c: All implementations adjusted.
2185 * bsd-kvm.c: All implementations adjusted.
2186 * bsd-uthread.c: All implementations adjusted.
2187 * corelow.c: All implementations adjusted.
2188 * ctf.c: All implementations adjusted.
2189 * darwin-nat.c: All implementations adjusted.
2190 * darwin-nat.h: All implementations adjusted.
2191 * exec.c: All implementations adjusted.
2192 * fbsd-nat.c: All implementations adjusted.
2193 * fbsd-nat.h: All implementations adjusted.
2194 * gnu-nat.c: All implementations adjusted.
2195 * gnu-nat.h: All implementations adjusted.
2196 * go32-nat.c: All implementations adjusted.
2197 * ia64-linux-nat.c: All implementations adjusted.
2198 * inf-child.c: All implementations adjusted.
2199 * inf-child.h: All implementations adjusted.
2200 * inf-ptrace.c: All implementations adjusted.
2201 * inf-ptrace.h: All implementations adjusted.
2202 * linux-nat.c: All implementations adjusted.
2203 * linux-nat.h: All implementations adjusted.
2204 * mips-linux-nat.c: All implementations adjusted.
2205 * nto-procfs.c: All implementations adjusted.
2206 * ppc-linux-nat.c: All implementations adjusted.
2207 * procfs.c: All implementations adjusted.
2208 * ravenscar-thread.c: All implementations adjusted.
2209 * record-btrace.c: All implementations adjusted.
2210 * record-full.c: All implementations adjusted.
2211 * remote-sim.c: All implementations adjusted.
2212 * remote.c: All implementations adjusted.
2213 * s390-linux-nat.c: All implementations adjusted.
2214 * sol-thread.c: All implementations adjusted.
2215 * spu-multiarch.c: All implementations adjusted.
2216 * target-delegates.c: All implementations adjusted.
2217 * target.c: All implementations adjusted.
2218 * target.h: All implementations adjusted.
2219 * tracefile-tfile.c: All implementations adjusted.
2220 * tracefile.c: All implementations adjusted.
2221 * tracefile.h: All implementations adjusted.
2222 * windows-nat.c: All implementations adjusted.
2223 * x86-linux-nat.h: All implementations adjusted.
2224 * x86-nat.h: All implementations adjusted.
2226 2018-05-02 Pedro Alves <palves@redhat.com>
2228 * make-target-delegates (scan_target_h): Don't trim lines here.
2229 Replace sequences of tabs and/or whitespace with a single
2231 (top level, parsing methods): Trim each line before processing it
2234 2018-05-02 Pedro Alves <palves@redhat.com>
2235 John Baldwin <jhb@freebsd.org>
2237 * target.h (enum strata) <debug_stratum>: New.
2238 (struct target_ops) <all delegation methods>: Replace by C++
2239 virtual methods, and drop "to_" prefix. All references updated
2241 <to_shortname, to_longname, to_doc, to_data,
2242 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2243 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2244 virtual methods. All references updated throughout.
2245 <can_attach, supports_terminal_ours, can_create_inferior,
2246 get_thread_control_capabilities, attach_no_wait>: New
2248 <insert_breakpoint, remove_breakpoint>: Now
2249 TARGET_DEFAULT_NORETURN methods.
2250 <info_proc>: Now returns bool.
2252 (OPS_MAGIC): Delete.
2253 (current_target): Delete. All references replaced by references
2255 (target_stack): ... this. New.
2256 (target_shortname, target_longname): Adjust.
2257 (target_can_run): Now a function declaration.
2258 (default_child_has_all_memory, default_child_has_memory)
2259 (default_child_has_stack, default_child_has_registers)
2260 (default_child_has_execution): Remove target_ops parameter.
2261 (complete_target_initialization): Delete.
2262 (memory_breakpoint_target): New template class.
2263 (test_target_ops): Refactor as a C++ class with virtual methods.
2264 * make-target-delegates (NAME_PART): Tighten.
2265 (POINTER_PART, CP_SYMBOL): New.
2266 (SIMPLE_RETURN_PART): Reimplement.
2267 (VEC_RETURN_PART): Expect less.
2268 (RETURN_PART, VIRTUAL_PART): New.
2269 (METHOD): Adjust to C++ virtual methods.
2270 (scan_target_h): Remove reference to C99.
2271 (dname): Output "target_ops::" prefix.
2272 (write_function_header): Adjust to output a C++ class method.
2273 (write_declaration): New.
2274 (write_delegator): Adjust to output a C++ class method.
2275 (tdname): Output "dummy_target::" prefix.
2276 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2278 (tdefault_names, debug_names): Delete.
2279 (return_types, tdefaults, styles, argtypes_array): New.
2280 (top level): All methods are delegators.
2282 (top level): Print dummy_target and debug_target classes.
2283 * target-delegates.c: Regenerate.
2284 * target-debug.h (target_debug_print_enum_info_proc_what)
2285 (target_debug_print_thread_control_capabilities)
2286 (target_debug_print_thread_info_p): New.
2287 * target.c (dummy_target): Delete.
2288 (the_dummy_target, the_debug_target): New.
2289 (target_stack): Now extern.
2290 (set_targetdebug): Push/unpush debug target.
2291 (default_child_has_all_memory, default_child_has_memory)
2292 (default_child_has_stack, default_child_has_registers)
2293 (default_child_has_execution): Remove target_ops parameter.
2294 (complete_target_initialization): Delete.
2295 (add_target_with_completer): No longer call
2296 complete_target_initialization.
2297 (target_supports_terminal_ours): Use regular delegation.
2298 (update_current_target): Delete.
2299 (push_target): No longer check magic number. Don't call
2300 update_current_target.
2301 (unpush_target): Don't call update_current_target.
2302 (target_is_pushed): No longer check magic number.
2303 (target_require_runnable): Skip for all stratums over
2305 (target_ops::info_proc): New.
2306 (target_info_proc): Use find_target_at and
2307 find_default_run_target.
2308 (target_supports_disable_randomization): Use regular delegation.
2309 (target_get_osdata): Use find_target_at.
2310 (target_ops::open, target_ops::close, target_ops::can_attach)
2311 (target_ops::attach, target_ops::can_create_inferior)
2312 (target_ops::create_inferior, target_ops::can_run)
2313 (target_can_run): New.
2314 (default_fileio_target): Use regular delegation.
2315 (target_ops::fileio_open, target_ops::fileio_pwrite)
2316 (target_ops::fileio_pread, target_ops::fileio_fstat)
2317 (target_ops::fileio_close, target_ops::fileio_unlink)
2318 (target_ops::fileio_readlink): New.
2319 (target_fileio_open_1, target_fileio_unlink)
2320 (target_fileio_readlink): Always call the target method. Handle
2322 (return_zero, return_zero_has_execution): Delete.
2323 (init_dummy_target): Delete.
2324 (dummy_target::dummy_target, dummy_target::shortname)
2325 (dummy_target::longname, dummy_target::doc)
2326 (debug_target::debug_target, debug_target::shortname)
2327 (debug_target::longname, debug_target::doc): New.
2328 (target_supports_delete_record): Use regular delegation.
2329 (setup_target_debug): Delete.
2330 (maintenance_print_target_stack): Skip debug_stratum.
2331 (initialize_targets): Instantiate the_dummy_target and
2333 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2335 (target_auxv_search, fprint_target_auxv): Adjust.
2336 (info_auxv_command): Adjust to use target_stack.
2337 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2338 * exceptions.c (print_flush): Handle a NULL target_stack.
2339 * regcache.c (target_ops_no_register): Refactor as class with
2342 * exec.c (exec_target): New class.
2343 (exec_ops): Now an exec_target.
2344 (exec_open, exec_close_1, exec_get_section_table)
2345 (exec_xfer_partial, exec_files_info, exec_has_memory)
2346 (exec_make_note_section): Refactor as exec_target methods.
2347 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2349 (exec_target::find_memory_regions): New.
2350 (_initialize_exec): Don't call init_exec_ops.
2351 * gdbcore.h (exec_file_clear): Delete.
2353 * corefile.c (core_target): Delete.
2354 (core_file_command): Adjust.
2355 * corelow.c (core_target): New class.
2356 (the_core_target): New.
2357 (core_close): Remove target_ops parameter.
2358 (core_close_cleanup): Adjust.
2359 (core_target::close): New.
2360 (core_open, core_detach, get_core_registers, core_files_info)
2361 (core_xfer_partial, core_thread_alive, core_read_description)
2362 (core_pid_to_str, core_thread_name, core_has_memory)
2363 (core_has_stack, core_has_registers, core_info_proc): Rework as
2364 core_target methods.
2365 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2366 (_initialize_corelow): Initialize the_core_target.
2367 * gdbcore.h (core_target): Delete.
2368 (the_core_target): New.
2370 * ctf.c: (ctf_target): New class.
2371 (ctf_ops): Now a ctf_target.
2372 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2373 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2374 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2376 (init_ctf_ops): Delete.
2377 (_initialize_ctf): Don't call it.
2378 * tracefile-tfile.c (tfile_target): New class.
2379 (tfile_ops): Now a tfile_target.
2380 (tfile_open, tfile_close, tfile_files_info)
2381 (tfile_get_tracepoint_status, tfile_trace_find)
2382 (tfile_fetch_registers, tfile_xfer_partial)
2383 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2384 Refactor as tfile_target methods.
2385 (tfile_xfer_partial_features): Remove target_ops parameter.
2386 (init_tfile_ops): Delete.
2387 (_initialize_tracefile_tfile): Don't call it.
2388 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2389 (tracefile_has_stack, tracefile_has_registers)
2390 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2391 tracefile_target methods.
2392 (init_tracefile_ops): Delete.
2393 (tracefile_target::tracefile_target): New.
2394 * tracefile.h: Include "target.h".
2395 (tracefile_target): New class.
2396 (init_tracefile_ops): Delete.
2398 * spu-multiarch.c (spu_multiarch_target): New class.
2399 (spu_ops): Now a spu_multiarch_target.
2400 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2401 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2402 (spu_search_memory, spu_mourn_inferior): Refactor as
2403 spu_multiarch_target methods.
2404 (init_spu_ops): Delete.
2405 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2406 complete_target_initialization.
2408 * ravenscar-thread.c (ravenscar_thread_target): New class.
2409 (ravenscar_ops): Now a ravenscar_thread_target.
2410 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2411 (ravenscar_thread_alive, ravenscar_pid_to_str)
2412 (ravenscar_fetch_registers, ravenscar_store_registers)
2413 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2414 (ravenscar_stopped_by_hw_breakpoint)
2415 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2416 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2417 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2419 (init_ravenscar_thread_ops): Delete.
2420 (_initialize_ravenscar): Remove references to
2421 init_ravenscar_thread_ops and complete_target_initialization.
2423 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2424 (bsd_uthread_target): New class.
2425 (bsd_uthread_ops): Now a bsd_uthread_target.
2426 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2427 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2428 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2429 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2430 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2431 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2432 (bsd_uthread_target): Delete function.
2433 (_initialize_bsd_uthread): Remove reference to
2434 complete_target_initialization.
2436 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2437 (target_bfd): ... this new class.
2438 (target_bfd_xfer_partial, target_bfd_get_section_table)
2439 (target_bfd_close): Refactor as target_bfd methods.
2440 (target_bfd::~target_bfd): New.
2441 (target_bfd_reopen): Adjust.
2442 (target_bfd::close): New.
2444 * record-btrace.c (record_btrace_target): New class.
2445 (record_btrace_ops): Now a record_btrace_target.
2446 (record_btrace_open, record_btrace_stop_recording)
2447 (record_btrace_disconnect, record_btrace_close)
2448 (record_btrace_async, record_btrace_info)
2449 (record_btrace_insn_history, record_btrace_insn_history_range)
2450 (record_btrace_insn_history_from, record_btrace_call_history)
2451 (record_btrace_call_history_range)
2452 (record_btrace_call_history_from, record_btrace_record_method)
2453 (record_btrace_is_replaying, record_btrace_will_replay)
2454 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2455 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2456 (record_btrace_store_registers, record_btrace_prepare_to_store)
2457 (record_btrace_to_get_unwinder)
2458 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2459 (record_btrace_commit_resume, record_btrace_wait)
2460 (record_btrace_stop, record_btrace_can_execute_reverse)
2461 (record_btrace_stopped_by_sw_breakpoint)
2462 (record_btrace_supports_stopped_by_sw_breakpoint)
2463 (record_btrace_stopped_by_hw_breakpoint)
2464 (record_btrace_supports_stopped_by_hw_breakpoint)
2465 (record_btrace_update_thread_list, record_btrace_thread_alive)
2466 (record_btrace_goto_begin, record_btrace_goto_end)
2467 (record_btrace_goto, record_btrace_stop_replaying_all)
2468 (record_btrace_execution_direction)
2469 (record_btrace_prepare_to_generate_core)
2470 (record_btrace_done_generating_core): Refactor as
2471 record_btrace_target methods.
2472 (init_record_btrace_ops): Delete.
2473 (_initialize_record_btrace): Remove reference to
2474 init_record_btrace_ops.
2475 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2476 the execution_direction global.
2477 (record_full_base_target, record_full_target)
2478 (record_full_core_target): New classes.
2479 (record_full_ops): Now a record_full_target.
2480 (record_full_core_ops): Now a record_full_core_target.
2481 (record_full_target::detach, record_full_target::disconnect)
2482 (record_full_core_target::disconnect)
2483 (record_full_target::mourn_inferior, record_full_target::kill):
2485 (record_full_open, record_full_close, record_full_async): Refactor
2486 as methods of the record_full_base_target class.
2487 (record_full_resume, record_full_commit_resume): Refactor
2488 as methods of the record_full_target class.
2489 (record_full_wait, record_full_stopped_by_watchpoint)
2490 (record_full_stopped_data_address)
2491 (record_full_stopped_by_sw_breakpoint)
2492 (record_full_supports_stopped_by_sw_breakpoint)
2493 (record_full_stopped_by_hw_breakpoint)
2494 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2495 methods of the record_full_base_target class.
2496 (record_full_store_registers, record_full_xfer_partial)
2497 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2498 Refactor as methods of the record_full_target class.
2499 (record_full_can_execute_reverse, record_full_get_bookmark)
2500 (record_full_goto_bookmark, record_full_execution_direction)
2501 (record_full_record_method, record_full_info, record_full_delete)
2502 (record_full_is_replaying, record_full_will_replay)
2503 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2504 (record_full_stop_replaying): Refactor as methods of the
2505 record_full_base_target class.
2506 (record_full_core_resume, record_full_core_kill)
2507 (record_full_core_fetch_registers)
2508 (record_full_core_prepare_to_store)
2509 (record_full_core_store_registers, record_full_core_xfer_partial)
2510 (record_full_core_insert_breakpoint)
2511 (record_full_core_remove_breakpoint)
2512 (record_full_core_has_execution): Refactor
2513 as methods of the record_full_core_target class.
2514 (record_full_base_target::supports_delete_record): New.
2515 (init_record_full_ops): Delete.
2516 (init_record_full_core_ops): Delete.
2517 (record_full_save): Refactor as method of the
2518 record_full_base_target class.
2519 (_initialize_record_full): Remove references to
2520 init_record_full_ops and init_record_full_core_ops.
2522 * remote.c (remote_target, extended_remote_target): New classes.
2523 (remote_ops): Now a remote_target.
2524 (extended_remote_ops): Now an extended_remote_target.
2525 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2526 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2527 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2528 (remote_pass_signals, remote_set_syscall_catchpoint)
2529 (remote_program_signals, )
2530 (remote_thread_always_alive): Remove target_ops parameter.
2531 (remote_thread_alive, remote_thread_name)
2532 (remote_update_thread_list, remote_threads_extra_info)
2533 (remote_static_tracepoint_marker_at)
2534 (remote_static_tracepoint_markers_by_strid)
2535 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2536 (remote_open): Refactor as methods of remote_target.
2537 (extended_remote_open, extended_remote_detach)
2538 (extended_remote_attach, extended_remote_post_attach):
2539 (extended_remote_supports_disable_randomization)
2540 (extended_remote_create_inferior): : Refactor as method of
2541 extended_remote_target.
2542 (remote_set_permissions, remote_open_1, remote_detach)
2543 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2544 (remote_resume, remote_commit_resume, remote_stop)
2545 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2546 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2547 (remote_prepare_to_store, remote_store_registers)
2548 (remote_flash_erase, remote_flash_done, remote_files_info)
2549 (remote_kill, remote_mourn, remote_insert_breakpoint)
2550 (remote_remove_breakpoint, remote_insert_watchpoint)
2551 (remote_watchpoint_addr_within_range)
2552 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2553 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2554 (remote_supports_stopped_by_sw_breakpoint)
2555 (remote_stopped_by_hw_breakpoint)
2556 (remote_supports_stopped_by_hw_breakpoint)
2557 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2558 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2559 (remote_verify_memory): Refactor as methods of remote_target.
2560 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2562 (remote_xfer_partial, remote_get_memory_xfer_limit)
2563 (remote_search_memory, remote_rcmd, remote_memory_map)
2564 (remote_pid_to_str, remote_get_thread_local_address)
2565 (remote_get_tib_address, remote_read_description): Refactor as
2566 methods of remote_target.
2567 (remote_target::fileio_open, remote_target::fileio_pwrite)
2568 (remote_target::fileio_pread, remote_target::fileio_close): New.
2569 (remote_hostio_readlink, remote_hostio_fstat)
2570 (remote_filesystem_is_local, remote_can_execute_reverse)
2571 (remote_supports_non_stop, remote_supports_disable_randomization)
2572 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2573 (remote_supports_enable_disable_tracepoint)
2574 (remote_supports_string_tracing)
2575 (remote_can_run_breakpoint_commands, remote_trace_init)
2576 (remote_download_tracepoint, remote_can_download_tracepoint)
2577 (remote_download_trace_state_variable, remote_enable_tracepoint)
2578 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2579 (remote_trace_start, remote_get_trace_status)
2580 (remote_get_tracepoint_status, remote_trace_stop)
2581 (remote_trace_find, remote_get_trace_state_variable_value)
2582 (remote_save_trace_data, remote_get_raw_trace_data)
2583 (remote_set_disconnected_tracing, remote_core_of_thread)
2584 (remote_set_circular_trace_buffer, remote_traceframe_info)
2585 (remote_get_min_fast_tracepoint_insn_len)
2586 (remote_set_trace_buffer_size, remote_set_trace_notes)
2587 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2588 (remote_disable_btrace, remote_teardown_btrace)
2589 (remote_read_btrace, remote_btrace_conf)
2590 (remote_augmented_libraries_svr4_read, remote_load)
2591 (remote_pid_to_exec_file, remote_can_do_single_step)
2592 (remote_execution_direction, remote_thread_handle_to_thread_info):
2593 Refactor as methods of remote_target.
2594 (init_remote_ops, init_extended_remote_ops): Delete.
2595 (remote_can_async_p, remote_is_async_p, remote_async)
2596 (remote_thread_events, remote_upload_tracepoints)
2597 (remote_upload_trace_state_variables): Refactor as methods of
2599 (_initialize_remote): Remove references to init_remote_ops and
2600 init_extended_remote_ops.
2602 * remote-sim.c (gdbsim_target): New class.
2603 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2604 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2605 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2606 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2607 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2608 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2609 Refactor as methods of gdbsim_target.
2610 (gdbsim_ops): Now a gdbsim_target.
2611 (init_gdbsim_ops): Delete.
2612 (gdbsim_cntrl_c): Adjust.
2613 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2615 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2616 (the_amd64_linux_nat_target): New.
2617 (amd64_linux_fetch_inferior_registers)
2618 (amd64_linux_store_inferior_registers): Refactor as methods of
2619 amd64_linux_nat_target.
2620 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2621 * i386-linux-nat.c: Don't include "linux-nat.h".
2622 (i386_linux_nat_target): New class.
2623 (the_i386_linux_nat_target): New.
2624 (i386_linux_fetch_inferior_registers)
2625 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2626 as methods of i386_linux_nat_target.
2627 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2628 * inf-child.c (inf_child_ops): Delete.
2629 (inf_child_fetch_inferior_registers)
2630 (inf_child_store_inferior_registers): Delete.
2631 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2632 methods of inf_child_target.
2633 (inf_child_target::supports_terminal_ours)
2634 (inf_child_target::terminal_init)
2635 (inf_child_target::terminal_inferior)
2636 (inf_child_target::terminal_ours_for_output)
2637 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2638 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2640 (inf_child_open, inf_child_disconnect, inf_child_close)
2641 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2642 (inf_child_post_startup_inferior, inf_child_can_run)
2643 (inf_child_pid_to_exec_file): Refactor as methods of
2645 (inf_child_follow_fork): Delete.
2646 (inf_child_target::can_create_inferior)
2647 (inf_child_target::can_attach): New.
2648 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2649 (inf_child_target::has_stack, inf_child_target::has_registers)
2650 (inf_child_target::has_execution): New.
2651 (inf_child_fileio_open, inf_child_fileio_pwrite)
2652 (inf_child_fileio_pread, inf_child_fileio_fstat)
2653 (inf_child_fileio_close, inf_child_fileio_unlink)
2654 (inf_child_fileio_readlink, inf_child_use_agent)
2655 (inf_child_can_use_agent): Refactor as methods of
2657 (return_zero, inf_child_target): Delete.
2658 (inf_child_target::inf_child_target): New.
2659 * inf-child.h: Include "target.h".
2660 (inf_child_target): Delete function prototype.
2661 (inf_child_target): New class.
2662 (inf_child_open_target, inf_child_mourn_inferior)
2663 (inf_child_maybe_unpush_target): Delete.
2664 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2665 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2666 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2667 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2668 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2669 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2670 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2671 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2672 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2673 methods of inf_ptrace_target.
2674 (inf_ptrace_target): Delete function.
2675 * inf-ptrace.h: Include "inf-child.h".
2676 (inf_ptrace_target): Delete function declaration.
2677 (inf_ptrace_target): New class.
2678 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2679 * linux-nat.c (linux_target): New.
2680 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2681 (linux_nat_target::~linux_nat_target): New.
2682 (linux_child_post_attach, linux_child_post_startup_inferior)
2683 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2684 (linux_child_remove_fork_catchpoint)
2685 (linux_child_insert_vfork_catchpoint)
2686 (linux_child_remove_vfork_catchpoint)
2687 (linux_child_insert_exec_catchpoint)
2688 (linux_child_remove_exec_catchpoint)
2689 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2690 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2691 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2692 (linux_nat_stopped_data_address)
2693 (linux_nat_stopped_by_sw_breakpoint)
2694 (linux_nat_supports_stopped_by_sw_breakpoint)
2695 (linux_nat_stopped_by_hw_breakpoint)
2696 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2697 (linux_nat_kill, linux_nat_mourn_inferior)
2698 (linux_nat_xfer_partial, linux_nat_thread_alive)
2699 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2700 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2701 (linux_child_static_tracepoint_markers_by_strid)
2702 (linux_nat_is_async_p, linux_nat_can_async_p)
2703 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2704 (linux_nat_supports_multi_process)
2705 (linux_nat_supports_disable_randomization, linux_nat_async)
2706 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2707 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2708 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2709 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2710 methods of linux_nat_target.
2711 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2712 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2714 (check_stopped_by_watchpoint): Adjust.
2715 (linux_xfer_partial): Delete.
2716 (linux_target_install_ops, linux_target, linux_nat_add_target):
2718 (linux_nat_target::linux_nat_target): New.
2719 * linux-nat.h: Include "inf-ptrace.h".
2720 (linux_nat_target): New.
2721 (linux_target, linux_target_install_ops, linux_nat_add_target):
2722 Delete function declarations.
2723 (linux_target): Declare global.
2724 * linux-thread-db.c (thread_db_target): New.
2725 (thread_db_target::thread_db_target): New.
2726 (thread_db_ops): Delete.
2727 (the_thread_db_target): New.
2728 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2729 (thread_db_update_thread_list, thread_db_pid_to_str)
2730 (thread_db_extra_thread_info)
2731 (thread_db_thread_handle_to_thread_info)
2732 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2733 (thread_db_resume): Refactor as methods of thread_db_target.
2734 (init_thread_db_ops): Delete.
2735 (_initialize_thread_db): Remove reference to init_thread_db_ops.
2736 * x86-linux-nat.c: Don't include "linux-nat.h".
2737 (super_post_startup_inferior): Delete.
2738 (x86_linux_nat_target::~x86_linux_nat_target): New.
2739 (x86_linux_child_post_startup_inferior)
2740 (x86_linux_read_description, x86_linux_enable_btrace)
2741 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2742 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2743 methods of x86_linux_nat_target.
2744 (x86_linux_create_target): Delete. Bits folded ...
2745 (x86_linux_add_target): ... here. Now takes a linux_nat_target
2747 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2748 (x86_linux_nat_target): New class.
2749 (x86_linux_create_target): Delete.
2750 (x86_linux_add_target): Now takes a linux_nat_target pointer.
2751 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2752 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2753 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2754 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2755 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2757 (x86_use_watchpoints): Delete.
2758 * x86-nat.h: Include "breakpoint.h" and "target.h".
2759 (x86_use_watchpoints): Delete.
2760 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2761 (x86_stopped_by_watchpoint, x86_stopped_data_address)
2762 (x86_insert_watchpoint, x86_remove_watchpoint)
2763 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2764 (x86_stopped_by_hw_breakpoint): New declarations.
2765 (x86_nat_target): New template class.
2767 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2768 (the_ppc_linux_nat_target): New.
2769 (ppc_linux_fetch_inferior_registers)
2770 (ppc_linux_can_use_hw_breakpoint)
2771 (ppc_linux_region_ok_for_hw_watchpoint)
2772 (ppc_linux_ranged_break_num_registers)
2773 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2774 (ppc_linux_insert_mask_watchpoint)
2775 (ppc_linux_remove_mask_watchpoint)
2776 (ppc_linux_can_accel_watchpoint_condition)
2777 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2778 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2779 (ppc_linux_watchpoint_addr_within_range)
2780 (ppc_linux_masked_watch_num_registers)
2781 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2782 (ppc_linux_read_description): Refactor as methods of
2783 ppc_linux_nat_target.
2784 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
2786 * procfs.c (procfs_xfer_partial): Delete forward declaration.
2787 (procfs_target): New class.
2788 (the_procfs_target): New.
2789 (procfs_target): Delete function.
2790 (procfs_auxv_parse, procfs_attach, procfs_detach)
2791 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2792 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2793 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2794 (procfs_create_inferior, procfs_update_thread_list)
2795 (procfs_thread_alive, procfs_pid_to_str)
2796 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2797 (procfs_stopped_data_address, procfs_insert_watchpoint)
2798 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2799 (proc_find_memory_regions, procfs_info_proc)
2800 (procfs_make_note_section): Refactor as methods of procfs_target.
2801 (_initialize_procfs): Adjust.
2802 * sol-thread.c (sol_thread_target): New class.
2803 (sol_thread_ops): Now a sol_thread_target.
2804 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2805 (sol_thread_fetch_registers, sol_thread_store_registers)
2806 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2807 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2808 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2809 (init_sol_thread_ops): Delete.
2810 (_initialize_sol_thread): Adjust. Remove references to
2811 init_sol_thread_ops and complete_target_initialization.
2813 * windows-nat.c (windows_nat_target): New class.
2814 (windows_fetch_inferior_registers)
2815 (windows_store_inferior_registers, windows_resume, windows_wait)
2816 (windows_attach, windows_detach, windows_pid_to_exec_file)
2817 (windows_files_info, windows_create_inferior)
2818 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2819 (windows_close, windows_pid_to_str, windows_xfer_partial)
2820 (windows_get_tib_address, windows_get_ada_task_ptid)
2821 (windows_thread_name, windows_thread_alive): Refactor as
2822 windows_nat_target methods.
2823 (do_initial_windows_stuff): Adjust.
2824 (windows_target): Delete function.
2825 (_initialize_windows_nat): Adjust.
2827 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2828 (darwin_mourn_inferior, darwin_kill_inferior)
2829 (darwin_create_inferior, darwin_attach, darwin_detach)
2830 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2831 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2832 (darwin_supports_multi_process): Refactor as darwin_nat_target
2834 (darwin_resume_to, darwin_files_info): Delete.
2835 (_initialize_darwin_inferior): Rename to ...
2836 (_initialize_darwin_nat): ... this. Adjust to C++ification.
2837 * darwin-nat.h: Include "inf-child.h".
2838 (darwin_nat_target): New class.
2839 (darwin_complete_target): Delete.
2840 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2841 (darwin_target): New.
2842 (i386_darwin_fetch_inferior_registers)
2843 (i386_darwin_store_inferior_registers): Refactor as methods of
2845 (darwin_complete_target): Delete, with ...
2846 (_initialize_i386_darwin_nat): ... bits factored out here.
2848 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2849 (the_alpha_linux_nat_target): New.
2850 (alpha_linux_register_u_offset): Refactor as
2851 alpha_linux_nat_target method.
2852 (_initialize_alpha_linux_nat): Adjust.
2853 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2854 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2855 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2856 methods of linux_nat_trad_target.
2857 (linux_trad_target): Delete.
2858 * linux-nat-trad.h (linux_trad_target): Delete function.
2859 (linux_nat_trad_target): New class.
2860 * mips-linux-nat.c (mips_linux_nat_target): New class.
2861 (super_fetch_registers, super_store_registers, super_close):
2863 (the_mips_linux_nat_target): New.
2864 (mips64_linux_regsets_fetch_registers)
2865 (mips64_linux_regsets_store_registers)
2866 (mips64_linux_fetch_registers, mips64_linux_store_registers)
2867 (mips_linux_register_u_offset, mips_linux_read_description)
2868 (mips_linux_can_use_hw_breakpoint)
2869 (mips_linux_stopped_by_watchpoint)
2870 (mips_linux_stopped_data_address)
2871 (mips_linux_region_ok_for_hw_watchpoint)
2872 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2873 (mips_linux_close): Refactor as methods of mips_linux_nat.
2874 (_initialize_mips_linux_nat): Adjust to C++ification.
2876 * aix-thread.c (aix_thread_target): New class.
2877 (aix_thread_ops): Now an aix_thread_target.
2878 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2879 (aix_thread_fetch_registers, aix_thread_store_registers)
2880 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2881 (aix_thread_thread_alive, aix_thread_pid_to_str)
2882 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2883 Refactor as methods of aix_thread_target.
2884 (init_aix_thread_ops): Delete.
2885 (_initialize_aix_thread): Remove references to init_aix_thread_ops
2886 and complete_target_initialization.
2887 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2888 (rs6000_nat_target): New class.
2889 (the_rs6000_nat_target): New.
2890 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2891 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2892 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2893 (super_create_inferior): Delete.
2894 (_initialize_rs6000_nat): Adjust to C++ification.
2896 * arm-linux-nat.c (arm_linux_nat_target): New class.
2897 (the_arm_linux_nat_target): New.
2898 (arm_linux_fetch_inferior_registers)
2899 (arm_linux_store_inferior_registers, arm_linux_read_description)
2900 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2901 (arm_linux_remove_hw_breakpoint)
2902 (arm_linux_region_ok_for_hw_watchpoint)
2903 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2904 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2905 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2906 arm_linux_nat_target.
2907 (_initialize_arm_linux_nat): Adjust to C++ification.
2909 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2910 (the_aarch64_linux_nat_target): New.
2911 (aarch64_linux_fetch_inferior_registers)
2912 (aarch64_linux_store_inferior_registers)
2913 (aarch64_linux_child_post_startup_inferior)
2914 (aarch64_linux_read_description)
2915 (aarch64_linux_can_use_hw_breakpoint)
2916 (aarch64_linux_insert_hw_breakpoint)
2917 (aarch64_linux_remove_hw_breakpoint)
2918 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2919 (aarch64_linux_region_ok_for_hw_watchpoint)
2920 (aarch64_linux_stopped_data_address)
2921 (aarch64_linux_stopped_by_watchpoint)
2922 (aarch64_linux_watchpoint_addr_within_range)
2923 (aarch64_linux_can_do_single_step): Refactor as methods of
2924 aarch64_linux_nat_target.
2925 (super_post_startup_inferior): Delete.
2926 (_initialize_aarch64_linux_nat): Adjust to C++ification.
2928 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2929 (the_hppa_linux_nat_target): New.
2930 (hppa_linux_fetch_inferior_registers)
2931 (hppa_linux_store_inferior_registers): Refactor as methods of
2932 hppa_linux_nat_target.
2933 (_initialize_hppa_linux_nat): Adjust to C++ification.
2935 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2936 (the_ia64_linux_nat_target): New.
2937 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2938 (ia64_linux_stopped_data_address)
2939 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2940 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2941 ia64_linux_nat_target methods.
2942 (super_xfer_partial): Delete.
2943 (_initialize_ia64_linux_nat): Adjust to C++ification.
2945 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2946 (the_m32r_linux_nat_target): New.
2947 (m32r_linux_fetch_inferior_registers)
2948 (m32r_linux_store_inferior_registers): Refactor as
2949 m32r_linux_nat_target methods.
2950 (_initialize_m32r_linux_nat): Adjust to C++ification.
2952 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2953 (the_m68k_linux_nat_target): New.
2954 (m68k_linux_fetch_inferior_registers)
2955 (m68k_linux_store_inferior_registers): Refactor as
2956 m68k_linux_nat_target methods.
2957 (_initialize_m68k_linux_nat): Adjust to C++ification.
2959 * s390-linux-nat.c (s390_linux_nat_target): New class.
2960 (the_s390_linux_nat_target): New.
2961 (s390_linux_fetch_inferior_registers)
2962 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2963 (s390_insert_watchpoint, s390_remove_watchpoint)
2964 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2965 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2966 (s390_auxv_parse, s390_read_description): Refactor as methods of
2967 s390_linux_nat_target.
2968 (_initialize_s390_nat): Adjust to C++ification.
2970 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2971 (the_sparc_linux_nat_target): New.
2972 (_initialize_sparc_linux_nat): Adjust to C++ification.
2973 * sparc-nat.c (sparc_fetch_inferior_registers)
2974 (sparc_store_inferior_registers): Remove target_ops parameter.
2975 * sparc-nat.h (sparc_fetch_inferior_registers)
2976 (sparc_store_inferior_registers): Remove target_ops parameter.
2977 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2978 (the_sparc64_linux_nat_target): New.
2979 (_initialize_sparc64_linux_nat): Adjust to C++ification.
2981 * spu-linux-nat.c (spu_linux_nat_target): New class.
2982 (the_spu_linux_nat_target): New.
2983 (spu_child_post_startup_inferior, spu_child_post_attach)
2984 (spu_child_wait, spu_fetch_inferior_registers)
2985 (spu_store_inferior_registers, spu_xfer_partial)
2986 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2988 (_initialize_spu_nat): Adjust to C++ification.
2990 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2991 (the_tilegx_linux_nat_target): New.
2992 (fetch_inferior_registers, store_inferior_registers):
2993 Refactor as methods.
2994 (_initialize_tile_linux_nat): Adjust to C++ification.
2996 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2997 (the_xtensa_linux_nat_target): New.
2998 (xtensa_linux_fetch_inferior_registers)
2999 (xtensa_linux_store_inferior_registers): Refactor as
3000 xtensa_linux_nat_target methods.
3001 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3003 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3004 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3005 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3006 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3007 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3008 (fbsd_stopped_by_sw_breakpoint)
3009 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3010 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3011 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3012 (fbsd_post_startup_inferior, fbsd_post_attach)
3013 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3014 (fbsd_set_syscall_catchpoint)
3015 (super_xfer_partial, super_resume, super_wait)
3016 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3017 (fbsd_handle_debug_trap): Remove target_ops parameter.
3018 (fbsd_nat_add_target): Delete.
3019 * fbsd-nat.h: Include "inf-ptrace.h".
3020 (fbsd_nat_add_target): Delete.
3021 (USE_SIGTRAP_SIGINFO): Define.
3022 (fbsd_nat_target): New class.
3024 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3025 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3026 (amd64bsd_target): Delete.
3027 * amd64-bsd-nat.h: New file.
3028 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3030 (amd64_fbsd_nat_target): New class.
3031 (the_amd64_fbsd_nat_target): New.
3032 (amd64fbsd_read_description): Refactor as method of
3033 amd64_fbsd_nat_target.
3034 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3035 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3036 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3037 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3038 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3039 (i386bsd_target): Delete.
3040 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3041 (i386bsd_fetch_inferior_registers)
3042 (i386bsd_store_inferior_registers): Declare.
3043 (i386_bsd_nat_target): New class.
3044 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3045 (the_i386_fbsd_nat_target): New.
3046 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3047 i386_fbsd_nat_target methods.
3048 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3049 (_initialize_i386fbsd_nat): Adjust to C++ification.
3050 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3051 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3052 (_initialize_x86_bsd_nat): Adjust to C++ification.
3053 * x86-bsd-nat.h: Include "x86-nat.h".
3054 (x86bsd_target): Delete declaration.
3055 (x86bsd_nat_target): New class.
3057 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3058 (the_aarch64_fbsd_nat_target): New.
3059 (aarch64_fbsd_fetch_inferior_registers)
3060 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3061 aarch64_fbsd_nat_target.
3062 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3063 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3064 (the_alpha_bsd_nat_target): New.
3065 (alphabsd_fetch_inferior_registers)
3066 (alphabsd_store_inferior_registers): Refactor as
3067 alpha_bsd_nat_target methods.
3068 (_initialize_alphabsd_nat): Refactor as methods of
3069 alpha_bsd_nat_target.
3070 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3071 (the_amd64_nbsd_nat_target): New.
3072 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3073 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3074 (the_amd64_obsd_nat_target): New.
3075 (_initialize_amd64obsd_nat): Adjust to C++ification.
3076 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3077 (the_arm_fbsd_nat_target): New.
3078 (arm_fbsd_fetch_inferior_registers)
3079 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3080 (_initialize_arm_fbsd_nat): Refactor as methods of
3081 arm_fbsd_nat_target.
3082 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3083 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3084 (the_arm_netbsd_nat_target): New.
3085 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3086 arm_netbsd_nat_target.
3087 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3088 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3089 (the_hppa_nbsd_nat_target): New.
3090 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3091 hppa_nbsd_nat_target methods.
3092 (_initialize_hppanbsd_nat): Adjust to C++ification.
3093 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3094 (the_hppa_obsd_nat_target): New.
3095 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3096 methods of hppa_obsd_nat_target.
3097 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3099 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3100 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3102 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3103 (_initialize_i386obsd_nat): Use add_target.
3104 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3105 (the_m68k_bsd_nat_target): New.
3106 (m68kbsd_fetch_inferior_registers)
3107 (m68kbsd_store_inferior_registers): Refactor as methods of
3108 m68k_bsd_nat_target.
3109 (_initialize_m68kbsd_nat): Adjust to C++ification.
3110 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3111 (the_mips_fbsd_nat_target): New.
3112 (mips_fbsd_fetch_inferior_registers)
3113 (mips_fbsd_store_inferior_registers): Refactor as methods of
3114 mips_fbsd_nat_target.
3115 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3117 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3118 (the_mips_nbsd_nat_target): New.
3119 (mipsnbsd_fetch_inferior_registers)
3120 (mipsnbsd_store_inferior_registers): Refactor as methods of
3121 mips_nbsd_nat_target.
3122 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3123 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3124 (the_mips64_obsd_nat_target): New.
3125 (mips64obsd_fetch_inferior_registers)
3126 (mips64obsd_store_inferior_registers): Refactor as methods of
3127 mips64_obsd_nat_target.
3128 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3130 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3132 * nbsd-nat.h: Include "inf-ptrace.h".
3133 (nbsd_nat_target): New class.
3134 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3135 (obsd_wait): Refactor as methods of obsd_nat_target.
3136 (obsd_add_target): Delete.
3137 * obsd-nat.h: Include "inf-ptrace.h".
3138 (obsd_nat_target): New class.
3139 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3140 (the_ppc_fbsd_nat_target): New.
3141 (ppcfbsd_fetch_inferior_registers)
3142 (ppcfbsd_store_inferior_registers): Refactor as methods of
3143 ppc_fbsd_nat_target.
3144 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3146 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3147 (the_ppc_nbsd_nat_target): New.
3148 (ppcnbsd_fetch_inferior_registers)
3149 (ppcnbsd_store_inferior_registers): Refactor as methods of
3150 ppc_nbsd_nat_target.
3151 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3152 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3153 (the_ppc_obsd_nat_target): New.
3154 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3155 methods of ppc_obsd_nat_target.
3156 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3158 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3159 (the_sh_nbsd_nat_target): New.
3160 (shnbsd_fetch_inferior_registers)
3161 (shnbsd_store_inferior_registers): Refactor as methods of
3163 (_initialize_shnbsd_nat): Adjust to C++ification.
3164 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3165 (inf_ptrace_xfer_partial): Delete.
3166 (sparc_xfer_partial, sparc_target): Delete.
3167 * sparc-nat.h (sparc_fetch_inferior_registers)
3168 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3169 (sparc_target): Delete function declaration.
3170 (sparc_target): New template class.
3171 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3172 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3173 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3174 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3176 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3177 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3178 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3179 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3181 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3182 (the_vax_bsd_nat_target): New.
3183 (vaxbsd_fetch_inferior_registers)
3184 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3186 (_initialize_vaxbsd_nat): Adjust to C++ification.
3188 * bsd-kvm.c (bsd_kvm_target): New class.
3189 (bsd_kvm_ops): Now a bsd_kvm_target.
3190 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3191 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3192 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3194 (bsd_kvm_return_one): Delete.
3195 (bsd_kvm_add_target): Adjust to C++ification.
3197 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3198 (nto_procfs_target_procfs): New classes.
3199 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3200 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3201 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3202 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3203 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3204 (procfs_remove_hw_breakpoint, procfs_resume)
3205 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3206 (procfs_kill_inferior, procfs_store_registers)
3207 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3208 as methods of nto_procfs_target.
3209 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3210 (nto_native_ops): Delete.
3211 (procfs_open, procfs_native_open): Delete.
3212 (nto_native_ops): Now an nto_procfs_target_native.
3213 (init_procfs_targets): Adjust to C++ification.
3214 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3215 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3216 Refactor as methods of nto_procfs_target.
3218 * go32-nat.c (go32_nat_target): New class.
3219 (the_go32_nat_target): New.
3220 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3221 (go32_store_registers, go32_xfer_partial, go32_files_info)
3222 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3223 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3224 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3225 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3226 (go32_target): Delete.
3227 (_initialize_go32_nat): Adjust to C++ification.
3229 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3230 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3231 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3232 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3234 (gnu_target): Delete.
3235 * gnu-nat.h (gnu_target): Delete.
3236 (gnu_nat_target): New class.
3237 * i386-gnu-nat.c (gnu_base_target): New.
3238 (i386_gnu_nat_target): New class.
3239 (the_i386_gnu_nat_target): New.
3240 (_initialize_i386gnu_nat): Adjust to C++ification.
3242 2018-05-02 Pedro Alves <palves@redhat.com>
3244 * bfd-target.c (target_bfd_xclose): Rename to ...
3245 (target_bfd_close): ... this.
3246 (target_bfd_reopen): Adjust.
3247 * target.c (target_close): Remove references to to_xclose.
3248 * target.h (target_ops::to_xclose): Delete.
3249 (target_ops::to_close): Update comments.
3251 2018-05-02 Pedro Alves <palves@redhat.com>
3253 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3255 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3256 * inf-ptrace.c (inf_ptrace_register_u_offset)
3257 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3258 (inf_ptrace_store_register, inf_ptrace_store_registers)
3259 (inf_ptrace_trad_target): Move to ...
3260 * linux-nat-trad.c: ... this new file.
3261 * linux-nat-trad.h: New file.
3262 * linux-nat.c (linux_target_install_ops): Make extern.
3263 (linux_trad_target): Delete.
3264 * linux-nat.h (linux_trad_target): Delete declaration.
3265 (linux_target_install_ops): Declare.
3266 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3269 2018-05-02 Pedro Alves <palves@redhat.com>
3271 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3272 procfs_target/add_target here.
3273 * procfs.c (procfs_target): Make static.
3274 (_initialize_procfs): Call add_target here.
3275 * procfs.h (struct target_ops): Remove forward declaration.
3276 (procfs_target): Remove declaration.
3277 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3279 2018-05-02 Pedro Alves <palves@redhat.com>
3281 * procfs.c (procfs_stopped_by_watchpoint)
3282 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3283 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3285 (procfs_use_watchpoints): Delete, move contents...
3286 (procfs_target): ... here.
3287 * procfs.h (procfs_use_watchpoints): Delete declaration.
3288 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3289 procfs_use_watchpoints.
3290 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3291 procfs_use_watchpoints.
3293 2018-05-02 Tom Tromey <tom@tromey.com>
3296 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3297 and var_zuinteger_unlimited.
3298 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3299 and PARAM_ZUINTEGER_UNLIMITED.
3300 (set_parameter_value): Handle var_zuinteger and
3301 var_zuinteger_unlimited.
3302 (add_setshow_generic): Likewise.
3303 (parmpy_init): Likewise.
3305 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3308 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3309 pointer is not null before dereferencing it.
3311 2018-04-30 Tom Tromey <tom@tromey.com>
3313 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3316 2018-04-30 Tom Tromey <tom@tromey.com>
3318 * breakpoint.c (mention): Remove use of is_mi_like_p.
3319 (print_mention_ranged_breakpoint): Likewise.
3320 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3323 2018-04-30 Tom Tromey <tom@tromey.com>
3325 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3327 2018-04-30 Tom Tromey <tom@tromey.com>
3329 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3330 (info_spu_event_command): Remove some uses of is_mi_like_p.
3332 2018-04-30 Tom Tromey <tom@tromey.com>
3334 * python/py-framefilter.c (py_print_single_arg)
3335 (enumerate_locals, py_print_args, py_print_frame): Remove some
3336 uses of is_mi_like_p.
3338 2018-04-30 Tom Tromey <tom@tromey.com>
3341 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3342 * ui-out.h (ui_out::is_mi_like_p): Now const.
3343 (ui_out::do_is_mi_like_p): Now const.
3344 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3346 2018-04-30 Tom Tromey <tom@tromey.com>
3348 * varobj.c (varobj_set_visualizer): Use new_reference.
3349 * python/python.c (gdbpy_decode_line): Use new_reference.
3350 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3353 2018-04-30 Tom Tromey <tom@tromey.com>
3355 * varobj.c (install_new_value): Use new_reference.
3356 * value.h (value_incref): Return void. Swap intro comment with
3358 * value.c (set_value_parent): Use new_reference.
3359 (value_incref): Return void. Update intro comment.
3360 (release_value): Use new_reference.
3361 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3363 2018-04-30 Tom Tromey <tom@tromey.com>
3365 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3366 * gdb_bfd.h (new_bfd_ref): Remove.
3367 (gdb_bfd_open): Update comment.
3368 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3369 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3370 (gdb_bfd_fdopenr): Use new_reference.
3371 * exec.c (exec_file_attach): Use new_reference.
3373 2018-04-30 Tom Tromey <tom@tromey.com>
3375 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3378 2018-04-30 Tom Tromey <tom@tromey.com>
3380 * jit.c (jit_read_code_entry): Use type_align.
3381 * i386-tdep.c (i386_gdbarch_init): Don't call
3382 set_gdbarch_long_long_align_bit.
3383 * gdbarch.sh: Remove long_long_align_bit.
3384 * gdbarch.c, gdbarch.h: Rebuild.
3385 * arc-tdep.c (arc_type_align): New function.
3386 (arc_gdbarch_init): Use arc_type_align. Don't call
3387 set_gdbarch_long_long_align_bit.
3389 2018-04-30 Tom Tromey <tom@tromey.com>
3391 * rust-lang.c (rust_type_alignment): Remove.
3392 (rust_composite_type): Use type_align.
3394 2018-04-30 Tom Tromey <tom@tromey.com>
3396 * NEWS: Mention Type.align.
3397 * python/py-type.c (typy_get_alignof): New function.
3398 (type_object_getset): Add "alignof".
3400 2018-04-30 Tom Tromey <tom@tromey.com>
3404 * std-operator.def (UNOP_ALIGNOF): New operator.
3405 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3407 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3408 * c-lang.c (c_op_print_tab): Add alignof.
3409 * c-exp.y (ALIGNOF): New token.
3410 (exp): Add "ALIGNOF" production.
3411 (ident_tokens): Add _Alignof and alignof.
3413 2018-04-30 Tom Tromey <tom@tromey.com>
3415 * i386-tdep.c (i386_type_align): New function.
3416 (i386_gdbarch_init): Update.
3417 * gdbarch.sh (type_align): New method.
3418 * gdbarch.c, gdbarch.h: Rebuild.
3419 * arch-utils.h (default_type_align): Declare.
3420 * arch-utils.c (default_type_align): New function.
3421 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3422 (struct type) <align_log2>: New field.
3423 <instance_flags>: Now a bitfield.
3424 (TYPE_RAW_ALIGN): New macro.
3425 (type_align, type_raw_align, set_type_align): Declare.
3426 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3428 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3429 (get_alignment, maybe_set_alignment): New functions.
3430 (read_structure_type, read_enumeration_type, read_array_type)
3431 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3432 (read_subrange_type, read_base_type): Set type alignment.
3434 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3436 * dwarf2read.c (read_index_from_section): Use bool.
3438 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3441 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3444 2018-04-29 John Reiser <jreiser@BitWagon.com>
3447 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3448 last step, and do it atomically.
3450 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3452 * compile/compile-c-types.c (convert_int, convert_float):
3455 2018-04-27 Tom Tromey <tom@tromey.com>
3458 * rust-lang.c (rust_inclusive_range_type_p): New function.
3459 (rust_range): Handle inclusive ranges.
3460 (rust_compute_range): Likewise.
3461 * rust-exp.y (struct rust_op) <inclusive>: New field.
3462 (DOTDOTEQ): New constant.
3463 (range_expr): Add "..=" productions.
3464 (operator_tokens): Add "..=" token.
3465 (ast_range): Add "inclusive" parameter.
3466 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3468 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3470 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3471 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3473 * expprint.c (print_subexp_standard): Handle new bounds values.
3474 (dump_subexp_body_standard): Likewise.
3476 2018-04-27 Tom Tromey <tom@tromey.com>
3478 * configure: Rebuild.
3479 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3480 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3482 (class symbol_needs_eval_context): Likewise.
3483 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3484 (mock_mapped_index::symbol_name_at): Use "override". Remove
3486 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3488 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3489 * aarch64-tdep.c (instruction_reader::read): Use "override".
3490 (instruction_reader_test::read): Likewise.
3491 * arm-tdep.c (instruction_reader::read): Use "override".
3492 (instruction_reader_thumb::read): Likewise.
3494 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3497 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3498 instead of remote_send.
3499 (remote_send): Remove.
3501 2018-04-26 Pedro Alves <palves@redhat.com>
3503 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3504 find_function_start_sal instead of find_pc_line.
3506 2018-04-26 Pedro Alves <palves@redhat.com>
3508 * breakpoint.c (set_breakpoint_location_function): Handle
3510 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3511 * elfread.c (elf_symtab_read): Give data symbols with
3512 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3513 (elf_rel_plt_read): Update comment.
3514 * linespec.c (convert_linespec_to_sals): Handle
3516 (minsym_found): Handle mst_data_gnu_ifunc.
3517 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3518 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3519 * parse.c (find_minsym_type_and_address): Handle
3521 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3522 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3523 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3525 <mst_data_gnu_ifunc>: New enumerator.
3527 2018-04-26 Pedro Alves <palves@redhat.com>
3529 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3530 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3531 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3533 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3534 (lookup_minimal_symbol_by_pc): Adjust.
3535 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3536 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3537 * minsyms.h (lookup_msym_prefer): New enum.
3538 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3539 parameter by a lookup_msym_prefer parameter.
3541 2018-04-26 Pedro Alves <palves@redhat.com>
3543 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3544 ends in "@plt" instead of looking at the symbol's section.
3546 2018-04-26 Pedro Alves <palves@redhat.com>
3548 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3550 (find_pc_partial_function_gnu_ifunc): Rename to ...
3551 (find_pc_partial_function): ... this, and remove references to
3553 (find_pc_partial_function): Delete old implementation.
3554 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3556 2018-04-26 Pedro Alves <palves@redhat.com>
3558 * linespec.c (struct bound_minimal_symbol_search_key): New.
3559 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3560 skip first line if we found a GNU ifunc minimal symbol by name.
3561 (compare_msymbols): Change parameters to work with a destructured
3563 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3566 2018-04-26 Pedro Alves <palves@redhat.com>
3568 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3569 ifunc targets here. Instead, if we have an ifunc minsym, use its
3571 (add_location_to_breakpoint): Store the minsym and the objfile in
3572 the breakpoint location.
3573 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3574 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3575 Record the minsym in the sal.
3576 * symtab.h (symtab_and_line) <msymbol>: New field.
3578 2018-04-26 Pedro Alves <palves@redhat.com>
3580 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3581 unless we actually resolved the ifunc.
3583 2018-04-26 Pedro Alves <palves@redhat.com>
3585 * c-exp.y (variable production): Prefer ifunc minsyms over
3586 regular function symbols.
3587 * symtab.c (find_gnu_ifunc): New function.
3588 * minsyms.h (lookup_msym_prefer): New enum.
3589 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3590 parameter by a lookup_msym_prefer parameter.
3591 * symtab.h (find_gnu_ifunc): New declaration.
3593 2018-04-26 Pedro Alves <palves@redhat.com>
3595 * blockframe.c (find_gnu_ifunc_target_type): New function.
3596 (find_function_type): New.
3597 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3598 return a value with a memory address.
3599 (eval_call): For calls to GNU ifunc functions, try to find the
3600 type of the target function from the type that the resolver
3602 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3604 * infcall.c (find_function_return_type): Delete.
3605 (find_function_addr): Add 'function_type' parameter. For calls to
3606 GNU ifunc functions, try to find the type of the target function
3607 from the type that the resolver returns, and return it via
3609 (call_function_by_hand_dummy): Adjust to use the function type
3610 returned by find_function_addr.
3611 (find_function_addr): Add 'function_type' parameter and move
3613 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3616 2018-04-26 Pedro Alves <palves@redhat.com>
3618 * c-exp.y (variable production): Skip finding an alias for ifunc
3621 2018-04-26 Pedro Alves <palves@redhat.com>
3623 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3625 2018-04-25 Pedro Alves <palves@redhat.com>
3627 * infcmd.c (kill_command): Print the pid as string, not the whole
3628 thread's ptid. Add comment. s/has been killed/killed/ in output
3630 * remote.c (remote_detach_1): Print the pid as string, not the
3631 whole thread's ptid.
3633 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3634 Sergio Durigan Junior <sergiodj@redhat.com>
3635 Pedro Alves <palves@redhat.com>
3637 * infcmd.c (kill_command): Print message when inferior has
3639 * inferior.c (print_inferior_events): Remove 'static'. Set as
3641 (add_inferior): Improve message printed when
3642 'print_inferior_events' is on.
3643 (exit_inferior): Remove message printed when
3644 'print_inferior_events' is on.
3645 (detach_inferior): Improve message printed when
3646 'print_inferior_events' is on.
3647 (initialize_inferiors): Use 'add_inferior_silent' to set
3648 'current_inferior_'.
3649 * inferior.h (print_inferior_events): Declare here as
3651 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3652 '[Detaching...]' messages when 'print_inferior_events' is on.
3653 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3654 as prefix/suffix for messages. Remove periods. Fix erroneous
3655 'Detaching after fork from child...', replace it by '... from
3657 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3658 prefix/suffix when printing 'Detaching...' messages. Print
3659 them when 'print_inferior_events' is on.
3660 * remote.c (remote_detach_1): Print message when detaching
3661 from inferior and '!is_fork_parent'.
3663 2018-04-24 Tom Tromey <tom@tromey.com>
3665 * cli-out.h: Reindent.
3667 2018-04-24 Tom Tromey <tom@tromey.com>
3669 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3670 (cli_ui_out::do_field_string): Use fputs_filtered.
3671 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3673 2018-04-23 Tom Tromey <tom@tromey.com>
3675 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3676 gdb::unique_xmalloc_ptr.
3678 2018-04-23 Tom Tromey <tom@tromey.com>
3680 * configure: Rebuild.
3682 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3685 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3686 prepare_for_testing. Set normal_bp to r_debug_state if target
3689 2018-04-21 Pedro Alves <palves@redhat.com>
3690 Rajendra SY <rajendra.sy@gmail.com>
3692 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3693 * remote.c (extended_remote_attach): In all-stop mode, mark the
3694 thread as executing.
3696 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3698 * thread.c (thread_apply_all_command): Fix comment.
3699 (thread_command): Fix comment.
3701 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3703 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3705 * features/aarch64-core.c (create_feature_aarch64_core):
3707 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3709 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3711 * features/i386/32bit-avx512.c
3712 (create_feature_i386_32bit_avx512): Likewise.
3713 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3715 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3717 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3719 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3721 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3723 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3725 * features/i386/64bit-avx512.c
3726 (create_feature_i386_64bit_avx512): Likewise.
3727 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3729 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3731 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3733 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3735 * features/i386/64bit-segments.c
3736 (create_feature_i386_64bit_segments): Likewise.
3737 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3739 * features/i386/x32-core.c
3740 (create_feature_i386_x32_core): Likewise.
3741 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3742 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3743 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3744 * target-descriptions.c: In generated code, don't pass xml
3747 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3749 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3750 (print_xml_feature::visit_post): Likewise.
3751 (print_xml_feature::visit): Likewise.
3752 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3753 (print_xml_feature): Add new class.
3754 * regformats/regdat.sh: Null xmltarget on feature targets.
3755 * target-descriptions.c (struct target_desc): Add xmltarget.
3756 (maintenance_check_tdesc_xml_convert): Add unittest function.
3757 (tdesc_get_features_xml): Add function to get xml.
3758 (maintenance_check_xml_descriptions): Test xml generation.
3759 * xml-tdesc.c (string_read_description_xml): Add function.
3760 * xml-tdesc.h (string_read_description_xml): Add declaration.
3762 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3764 * features/Makefile: Add feature marker to targets with new style
3765 target descriptions.
3766 * regformats/aarch64.dat: Regenerate.
3767 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3768 * regformats/i386/amd64-avx-linux.dat: Likewise.
3769 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3770 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3771 * regformats/i386/amd64-linux.dat: Likewise.
3772 * regformats/i386/amd64-mpx-linux.dat: Likewise.
3773 * regformats/i386/amd64.dat: Likewise.
3774 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3775 * regformats/i386/i386-avx-linux.dat: Likewise.
3776 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3777 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3778 * regformats/i386/i386-linux.dat: Likewise.
3779 * regformats/i386/i386-mmx-linux.dat: Likewise.
3780 * regformats/i386/i386-mpx-linux.dat: Likewise.
3781 * regformats/i386/i386.dat: Likewise.
3782 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3783 * regformats/i386/x32-avx-linux.dat: Likewise.
3784 * regformats/i386/x32-linux.dat: Likewise.
3785 * regformats/tic6x-c62x-linux.dat: Likewise.
3786 * regformats/tic6x-c64x-linux.dat: Likewise.
3787 * regformats/tic6x-c64xp-linux.dat: Likewise.
3788 * regformats/regdat.sh: Parse feature marker.
3790 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3792 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3793 (tdesc_osabi_name): Likewise.
3794 * target-descriptions.c (tdesc_architecture_name): Add new
3796 (tdesc_osabi_name): Likewise.
3798 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3800 * common/tdesc.c (tdesc_predefined_type): Move to here.
3801 (tdesc_named_type): Likewise.
3802 (tdesc_create_vector): Likewise.
3803 (tdesc_create_struct): Likewise.
3804 (tdesc_set_struct_size): Likewise.
3805 (tdesc_create_union): Likewise.
3806 (tdesc_create_flags): Likewise.
3807 (tdesc_create_enum): Likewise.
3808 (tdesc_add_field): Likewise.
3809 (tdesc_add_typed_bitfield): Likewise.
3810 (tdesc_add_bitfield): Likewise.
3811 (tdesc_add_flag): Likewise.
3812 (tdesc_add_enum_value): Likewise.
3813 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3814 (struct tdesc_type_vector): Likewise.
3815 (struct tdesc_type_field): Likewise.
3816 (struct tdesc_type_with_fields): Likewise.
3817 (tdesc_create_enum): Add declaration.
3818 (tdesc_add_typed_bitfield): Likewise.
3819 (tdesc_add_enum_value): Likewise.
3820 * target-descriptions.c (tdesc_type_field): Move from here.
3821 (tdesc_type_builtin): Likewise.
3822 (tdesc_type_vector): Likewise.
3823 (tdesc_type_with_fields): Likewise.
3824 (tdesc_predefined_types): Likewise.
3825 (tdesc_named_type): Likewise.
3826 (tdesc_create_vector): Likewise.
3827 (tdesc_create_struct): Likewise.
3828 (tdesc_set_struct_size): Likewise.
3829 (tdesc_create_union): Likewise.
3830 (tdesc_create_flags): Likewise.
3831 (tdesc_create_enum): Likewise.
3832 (tdesc_add_field): Likewise.
3833 (tdesc_add_typed_bitfield): Likewise.
3834 (tdesc_add_bitfield): Likewise.
3835 (tdesc_add_flag): Likewise.
3836 (tdesc_add_enum_value): Likewise.
3837 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3838 (tdesc_add_typed_bitfield): Likewise.
3839 (tdesc_add_enum_value): Likewise.
3841 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3843 * common/tdesc.c (tdesc_feature::accept): Move to here.
3844 (tdesc_feature::operator==): Likewise.
3845 (tdesc_create_reg): Likewise.
3846 * common/tdesc.h (tdesc_type_kind): Likewise.
3847 (struct tdesc_type): Likewise.
3848 (struct tdesc_feature): Likewise.
3849 * regformats/regdat.sh: Create a feature.
3850 * target-descriptions.c (tdesc_type_kind): Move from here.
3851 (tdesc_type): Likewise.
3852 (tdesc_type_up): Likewise.
3853 (tdesc_feature): Likewise.
3854 (tdesc_create_reg): Likewise.
3856 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3858 * Makefile.in: Add arch/tdesc.c
3859 * common/tdesc.c: New file.
3860 * common/tdesc.h (tdesc_element_visitor): Move to here.
3861 (tdesc_element): Likewise.
3862 (tdesc_reg): Likewise.
3863 (tdesc_reg_up): Likewise.
3864 * regformats/regdef.h (reg): Add offset to constructors.
3865 * target-descriptions.c (tdesc_element_visitor): Move from here.
3866 (tdesc_element): Likewise.
3867 (tdesc_reg): Likewise.
3868 (tdesc_reg_up): Likewise.
3870 2018-04-17 Tom Tromey <tom@tromey.com>
3872 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3875 2018-04-17 Tom Tromey <tom@tromey.com>
3877 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3879 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
3881 * symtab.c (print_symbol_info): Skip printing filename and line
3882 number when `last' is NULL.
3883 (symtab_symbol_info): Use empty string instead of NULL for first
3884 invocation of print_symbol_info.
3885 (rbreak_command): Pass NULL to `last' parameter of
3888 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
3890 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3893 2018-04-16 Pedro Alves <palves@redhat.com>
3895 * MAINTAINERS (sh): Remove.
3896 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3897 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3898 (ALLDEPFILES): Remove sh64-tdep.c.
3899 * NEWS: Mentions that support for SH-5/SH64 is removed.
3900 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3901 (sh*-*-openbsd*): Ditto.
3902 (sh64-*-elf*): Remove.
3904 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3905 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3906 * sh-tdep.c: No longer include "sh64-tdep.h".
3907 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3908 * sh64-tdep.c, sh64-tdep.h: Remove files.
3910 2018-04-16 Pedro Alves <palves@redhat.com>
3912 * MAINTAINERS: Remove m88k.
3913 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3914 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3915 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3916 * NEWS: Mention that support for m88k was removed.
3917 * configure.host (m88*-*-*): Remove support.
3918 * configure.nat (m88k-*-*): Remove support.
3919 * configure.tgt (m88*-*-openbsd*): Remove.
3920 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3922 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
3924 * configure.tgt (x86_tobjs): New variable.
3925 (amd64_tobjs, i386_tobjs): Use it.
3927 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3929 * symtab.c (print_symbol_info): Precede the symbol definition by
3930 the line number when available.
3931 * NEWS: Advertise this enhancement.
3933 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3935 * NEWS (New options): announce set/show record btrace cpu.
3936 * btrace.c: Include record-btrace.h.
3937 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3938 the vendor is unknown.
3939 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
3940 Maybe overwrite the btrace configuration's cpu.
3941 (btrace_compute_ftrace): Add cpu parameter. Update callers.
3942 (btrace_fetch): Add cpu parameter. Update callers.
3943 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3944 Maybe overwrite the btrace configuration's cpu. Skip enabling
3945 errata workarounds if the vendor is unknown.
3946 * python/py-record-btrace.c: Include record-btrace.h.
3947 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3948 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3949 * record-btrace.c (record_btrace_cpu_state_kind): New.
3950 (record_btrace_cpu): New.
3951 (set_record_btrace_cpu_cmdlist): New.
3952 (record_btrace_get_cpu): New.
3953 (require_btrace_thread, record_btrace_info)
3954 (record_btrace_resume_thread): Call record_btrace_get_cpu.
3955 (cmd_set_record_btrace_cpu_none): New.
3956 (cmd_set_record_btrace_cpu_auto): New.
3957 (cmd_set_record_btrace_cpu): New.
3958 (cmd_show_record_btrace_cpu): New.
3959 (_initialize_record_btrace): Initialize set/show record btrace cpu
3961 * record-btrace.h (record_btrace_get_cpu): New.
3963 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3965 * record.c (set_record_command): Fix typo in message.
3967 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3969 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3971 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3973 * infrun.c (process_event_stop_test): Call
3974 gdbarch_in_indirect_branch_thunk.
3975 * gdbarch.sh (in_indirect_branch_thunk): New.
3976 * gdbarch.c: Regenerated.
3977 * gdbarch.h: Regenerated.
3980 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3981 (HFILES_NO_SRCDIR): Add x86-tdep.h.
3982 (ALLDEPFILES): Add x86-tdep.c.
3983 * arch-utils.h (default_in_indirect_branch_thunk): New.
3984 * arch-utils.c (default_in_indirect_branch_thunk): New.
3985 * i386-tdep: Include x86-tdep.h.
3986 (i386_in_indirect_branch_thunk): New.
3987 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3989 * amd64-tdep: Include x86-tdep.h.
3990 (amd64_in_indirect_branch_thunk): New.
3991 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3993 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3996 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3997 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3998 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4001 2018-04-12 Tom Tromey <tom@tromey.com>
4003 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4004 (rust_evaluate_subexp): Likewise.
4006 2018-04-12 Pedro Alves <palves@redhat.com>
4008 * procfs.c (procfs_detach): Make forward declaration's prototype
4009 match definition's protototype.
4010 (proc_get_LDT_entry): Remove stale do_cleanups call.
4012 2018-04-12 Pedro Alves <palves@redhat.com>
4014 * target.h (target_ops::to_has_exited): Delete.
4015 (target_has_exited): Delete.
4016 * target-delegates.c: Regenerate.
4018 2018-04-11 Pedro Alves <palves@redhat.com>
4020 * target.c (fileio_fh_t::t): Add comment.
4021 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4022 (target_fileio_close): Handle a NULL target.
4023 (invalidate_fileio_fh): New.
4024 (target_close): Call it.
4025 * remote.c (remote_hostio_send_command): No longer check whether
4026 remote_desc is open.
4028 2018-04-11 Pedro Alves <palves@redhat.com>
4030 * target.c (fileio_fh_t): Make it a named struct instead of a
4032 (fileio_fh_t::is_closed): New method.
4033 (DEF_VEC_O (fileio_fh_t)): Remove.
4034 (fileio_fhandles): Now a std::vector.
4035 (is_closed_fileio_fh): Delete.
4036 (acquire_fileio_fd): Adjust. Rename parameters.
4037 (release_fileio_fd): Adjust.
4038 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4039 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4040 (target_fileio_close): Adjust.
4042 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4044 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4047 2018-04-10 Pedro Alves <palves@redhat.com>
4049 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4050 (scoped_finish_thread_state): New class.
4051 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4053 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4054 (fetch_inferior_event, normal_stop): Likewise.
4055 * thread.c (finish_thread_state_cleanup): Delete.
4057 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4058 Pedro Alves <palves@redhat.com>
4060 * value.c: Include "selftest.h" and "common/array-view.h".
4061 (struct range) <operator ==>: New.
4062 (test_ranges_contain): New.
4063 (check_ranges_vector): New.
4064 (test_insert_into_bit_range_vector): New.
4065 (_initialize_values): Register selftests.
4066 * common/array-view.h (operator==, operator!=): New.
4068 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4070 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4072 * inline-frame.c: Include <algorithm>.
4073 (struct inline_state): Add constructor.
4074 (inline_state_s): Remove.
4075 (DEF_VEC_O(inline_state_s)): Remove.
4076 (inline_states): Change type to std::vector.
4077 (find_inline_frame_state): Adjust to std::vector.
4078 (allocate_inline_frame_state): Remove.
4079 (clear_inline_frame_state): Adjust to std::vector.
4080 (skip_inline_frames): Adjust to std::vector.
4082 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4084 * tracepoint.h (struct trace_state_variable): Add constructor.
4085 <name>: Change type to std::string.
4086 * tracepoint.c (tsv_s): Remove.
4087 (DEF_VEC_O(tsv_s)): Remove.
4088 (tvariables): Change to std::vector.
4089 (create_trace_state_variable): Adjust to std::vector.
4090 (find_trace_state_variable): Likewise.
4091 (find_trace_state_variable_by_number): Likewise.
4092 (delete_trace_state_variable): Likewise.
4093 (trace_variable_command): Adjust to std::string.
4094 (delete_trace_variable_command): Likewise.
4095 (tvariables_info_1): Adjust to std::vector.
4096 (save_trace_state_variables): Likewise.
4097 (start_tracing): Likewise.
4098 (merge_uploaded_trace_state_variables): Adjust to std::vector
4100 * target.h (struct target_ops)
4101 <to_download_trace_state_variable>: Pass reference to
4102 trace_state_variable.
4103 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4104 * target-delegates.c: Re-generate.
4105 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4106 (mi_tsv_deleted): Likewise.
4107 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4108 * remote.c (remote_download_trace_state_variable): Change
4109 pointer to reference and adjust.
4110 * make-target-delegates (parse_argtypes): Handle references.
4111 (write_function_header): Likewise.
4112 (munge_type): Likewise.
4114 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4116 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4117 string_view-selftests.c.
4118 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4120 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4121 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4122 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4123 * unittests/basic_string_view/element_access/char/1.cc:
4125 * unittests/basic_string_view/element_access/char/empty.cc:
4127 * unittests/basic_string_view/element_access/char/front_back.cc:
4129 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4130 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4132 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4134 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4136 * unittests/basic_string_view/operations/compare/char/1.cc:
4138 * unittests/basic_string_view/operations/compare/char/13650.cc:
4140 * unittests/basic_string_view/operations/copy/char/1.cc:
4142 * unittests/basic_string_view/operations/data/char/1.cc:
4144 * unittests/basic_string_view/operations/find/char/1.cc:
4146 * unittests/basic_string_view/operations/find/char/2.cc:
4148 * unittests/basic_string_view/operations/find/char/3.cc:
4150 * unittests/basic_string_view/operations/find/char/4.cc:
4152 * unittests/basic_string_view/operations/rfind/char/1.cc:
4154 * unittests/basic_string_view/operations/rfind/char/2.cc:
4156 * unittests/basic_string_view/operations/rfind/char/3.cc:
4158 * unittests/basic_string_view/operations/substr/char/1.cc:
4160 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4161 * unittests/string_view-selftests.c: New file.
4163 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4165 * unittests/basic_string_view/capacity/1.cc: New file.
4166 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4167 * unittests/basic_string_view/cons/char/1.cc: New file.
4168 * unittests/basic_string_view/cons/char/2.cc: New file.
4169 * unittests/basic_string_view/cons/char/3.cc: New file.
4170 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4171 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4172 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4173 * unittests/basic_string_view/element_access/char/1.cc: New file.
4174 * unittests/basic_string_view/element_access/char/2.cc: New file.
4175 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4176 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4177 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4178 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4179 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4180 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4181 * unittests/basic_string_view/include.cc: New file.
4182 * unittests/basic_string_view/inserters/char/1.cc: New file.
4183 * unittests/basic_string_view/inserters/char/2.cc: New file.
4184 * unittests/basic_string_view/inserters/char/3.cc: New file.
4185 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4186 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4187 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4188 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4189 * unittests/basic_string_view/literals/types.cc: New file.
4190 * unittests/basic_string_view/literals/values.cc: New file.
4191 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4192 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4193 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4194 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4195 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4196 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4197 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4198 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4199 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4200 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4201 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4202 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4203 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4204 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4205 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4206 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4207 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4208 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4209 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4210 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4211 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4212 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4213 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4214 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4215 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4216 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4217 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4218 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4219 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4220 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4221 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4222 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4223 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4224 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4225 * unittests/basic_string_view/operators/char/2.cc: New file.
4226 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4227 * unittests/basic_string_view/range_access/char/1.cc: New file.
4228 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4229 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4230 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4231 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4232 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4233 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4234 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4235 * unittests/basic_string_view/typedefs.cc: New file.
4236 * unittests/basic_string_view/types/1.cc: New file.
4238 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4240 * common/gdb_string_view.h: Remove libstdc++ implementation
4241 details, adjust to gdb reality.
4242 * common/gdb_string_view.tcc: Likewise.
4243 * cli/cli-script.c (struct string_view): Remove.
4244 (user_args) <m_args>: Change element type to gdb::string_view.
4245 (user_args::insert_args): Adjust.
4247 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4249 * common/gdb_string_view.h: New file.
4250 * common/gdb_string_view.tcc: New file.
4252 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4254 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4255 * configure: Re-generate.
4257 2018-04-09 Pedro Alves <palves@redhat.com>
4259 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4260 (set_target_gdbarch): Call
4261 gdb::observers::architecture_changed.notify instead of
4262 observer_notify_architecture_changed.
4264 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4266 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4267 (do_restore_current_traceframe_cleanup): Remove.
4268 (restore_current_traceframe_cleanup_dtor): Remove.
4269 (make_cleanup_restore_current_traceframe): Remove.
4270 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4272 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4273 * infrun.c (fetch_inferior_event): Use
4274 scoped_restore_current_traceframe.
4276 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4278 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4280 <n_allocated_type_units>: Remove.
4281 <all_type_units>: Change to std::vector.
4282 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4283 to std::vector change.
4284 (dwarf2_per_objfile::get_cutu): Likewise.
4285 (dwarf2_per_objfile::get_tu): Likewise.
4286 (create_signatured_type_table_from_index): Likewise.
4287 (create_signatured_type_table_from_debug_names): Likewise.
4288 (dw2_symtab_iter_next): Likewise.
4289 (dw2_print_stats): Likewise.
4290 (dw2_expand_all_symtabs): Likewise.
4291 (dw2_expand_marked_cus): Likewise.
4292 (dw2_debug_names_iterator::next): Likewise.
4293 (dwarf2_initialize_objfile): Likewise.
4294 (add_signatured_type_cu_to_table): Likewise.
4295 (create_all_type_units): Likewise.
4296 (add_type_unit): Likewise.
4297 (struct tu_abbrev_offset): Add constructor.
4298 (build_type_psymtabs_1): Adjust to std::vector change.
4299 (print_tu_stats): Likewise.
4300 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4301 (write_debug_names): Likewise.
4303 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4305 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4306 Make an std::vector.
4307 <n_comp_units>: Remove.
4308 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4309 to std::vector change.
4310 (dwarf2_per_objfile::get_cutu): Likewise.
4311 (dwarf2_per_objfile::get_cu): Likewise.
4312 (create_cus_from_index): Likewise.
4313 (create_addrmap_from_index): Likewise.
4314 (create_addrmap_from_aranges): Likewise.
4315 (dwarf2_read_index): Likewise.
4316 (dw2_find_last_source_symtab): Likewise.
4317 (dw2_map_symtabs_matching_filename): Likewise.
4318 (dw2_symtab_iter_next): Likewise.
4319 (dw2_print_stats): Likewise.
4320 (dw2_expand_all_symtabs): Likewise.
4321 (dw2_expand_symtabs_with_fullname): Likewise.
4322 (dw2_expand_marked_cus): Likewise.
4323 (dw2_map_symbol_filenames): Likewise.
4324 (create_cus_from_debug_names): Likewise.
4325 (dwarf2_read_debug_names): Likewise.
4326 (dw2_debug_names_iterator::next): Likewise.
4327 (dwarf2_initialize_objfile): Likewise.
4328 (set_partial_user): Likewise.
4329 (dwarf2_build_psymtabs_hard): Likewise.
4330 (read_comp_units_from_section): Remove arguments, adjust to
4332 (create_all_comp_units): Adjust to std::vector and
4333 read_comp_units_from_section changes.
4334 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4336 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4337 (psyms_seen_size): Likewise.
4338 (write_gdbindex): Likewise.
4339 (write_debug_names): Likewise.
4341 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4343 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4344 with dwarf2_per_objfile.
4345 (create_cus_from_index): Likewise.
4346 (create_signatured_type_table_from_index): Likewise.
4347 (dwarf2_read_index): Likewise.
4348 (dwarf2_initialize_objfile): Likewise.
4349 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4350 per_cu rather than get_dwarf2_per_objfile.
4352 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4354 * dwarf2read.h (struct signatured_type): Forward declare.
4355 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4357 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4358 (dw2_get_cutu): ...this.
4359 (dwarf2_per_objfile::get_cu): Rename from...
4360 (dw2_get_cu): ...this.
4361 (dwarf2_per_objfile::get_tu): New.
4362 (create_addrmap_from_index): Adjust.
4363 (create_addrmap_from_aranges): Adjust.
4364 (dw2_find_last_source_symtab): Adjust.
4365 (dw2_map_symtabs_matching_filename): Adjust.
4366 (dw2_symtab_iter_next): Adjust.
4367 (dw2_print_stats): Adjust.
4368 (dw2_expand_all_symtabs): Adjust.
4369 (dw2_expand_symtabs_with_fullname): Adjust.
4370 (dw2_expand_marked_cus): Adjust.
4371 (dw_expand_symtabs_matching_file_matcher): Adjust.
4372 (dw2_map_symbol_filenames): Adjust.
4373 (dw2_debug_names_iterator::next): Adjust.
4374 (dwarf2_initialize_objfile): Adjust.
4375 (set_partial_user): Adjust.
4376 (dwarf2_build_psymtabs_hard): Adjust.
4378 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4380 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4381 Remove unused variables.
4382 (dw2_map_symtabs_matching_filename): Likewise.
4383 (dwarf2_record_block_ranges): Likewise.
4384 (dwarf2_read_addr_index): Likewise.
4385 (follow_die_offset): Likewise.
4387 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4389 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4390 to symbol_file_add_main.
4392 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4395 * mi/mi-console.c (do_fputc_async_safe): New.
4396 (mi_console_file::write_async_safe): New.
4397 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4398 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4400 * ui-file.c (ui_file::putstrn): Adjust call to
4401 fputstrn_unfiltered.
4402 * utils.c (printchar): Replace do_fputs and do_fprintf
4403 parameters by do_fputc.
4404 (fputstr_filtered): Adjust call to printchar.
4405 (fputstr_unfiltered): Likewise.
4406 (fputstrn_filtered): Likewise.
4407 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4409 * utils.h (do_fputc_ftype): New typedef.
4410 (fputstrn_unfiltered): Add do_fputc parameter.
4412 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4414 * regformats/i386/i386-avx.dat: Remove.
4416 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4419 * amd64-tdep.c (amd64_none_init_abi): New function.
4420 (amd64_x32_none_init_abi): New function.
4421 (_initialize_amd64_tdep): Register handlers for x86-64 and
4422 x64_32 with GDB_OSABI_NONE.
4423 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4424 GDB_OSABI_NONE osabi.
4426 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4429 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4431 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4432 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4434 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4436 * common/byte-vector.h (char_vector): New type.
4437 * target.h (target_read_alloc): Return
4438 gdb::optional<byte_vector>.
4439 (target_read_stralloc): Return gdb::optional<char_vector>.
4440 (target_get_osdata): Return gdb::optional<char_vector>.
4441 * target.c (target_read_alloc_1): Templatize. Replacement
4442 manual memory management with vector.
4443 (target_read_alloc): Change return type, adjust.
4444 (target_read_stralloc): Change return type, adjust.
4445 (target_get_osdata): Change return type, adjust.
4446 * auxv.c (struct auxv_info) <length>: Remove.
4447 <data>: Change type to gdb::optional<byte_vector>.
4448 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4449 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4450 (target_auxv_search): Adjust.
4451 (fprint_target_auxv): Adjust.
4452 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4453 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4454 (linux_make_corefile_notes): Adjust.
4455 * osdata.c (get_osdata): Adjust.
4456 * remote.c (remote_get_threads_with_qxfer): Adjust.
4457 (remote_memory_map): Adjust.
4458 (remote_traceframe_info): Adjust.
4459 (btrace_read_config): Adjust.
4460 (remote_read_btrace): Adjust.
4461 (remote_pid_to_exec_file): Adjust.
4462 * solib-aix.c (solib_aix_get_library_list): Adjust.
4463 * solib-dsbt.c (decode_loadmap): Don't free buf.
4464 (dsbt_get_initial_loadmaps): Adjust.
4465 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4466 * solib-target.c (solib_target_current_sos): Adjust.
4467 * tracepoint.c (sdata_make_value): Adjust.
4468 * xml-support.c (xinclude_start_include): Adjust.
4469 (xml_fetch_content_from_file): Adjust.
4470 * xml-support.h (xml_fetch_another): Change return type.
4471 (xml_fetch_content_from_file): Change return type.
4472 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4473 * xml-tdesc.c (file_read_description_xml): Adjust.
4474 (fetch_available_features_from_target): Change return type.
4475 (target_fetch_description_xml): Adjust.
4476 (target_read_description_xml): Adjust.
4478 2018-04-06 Tom Tromey <tom@tromey.com>
4480 * value.c (~value): Update.
4481 (struct value) <contents>: Now unique_xmalloc_ptr.
4482 (value_contents_bits_eq, allocate_value_contents)
4483 (value_contents_raw, value_contents_all_raw)
4484 (value_contents_for_printing, value_contents_for_printing_const)
4485 (set_value_enclosing_type): Update.
4487 2018-04-06 Tom Tromey <tom@tromey.com>
4489 * value.c (range_s): Remove typedef, VEC.
4490 (struct range): Add operator<.
4491 (range_lessthan): Remove.
4492 (ranges_contain): Change type.
4494 (struct value) <unavailable, optimized_out>: Now std::vector.
4495 (value_entirely_available)
4496 (value_entirely_covered_by_range_vector)
4497 (value_entirely_unavailable, value_entirely_optimized_out):
4499 (insert_into_bit_range_vector): Change argument type.
4500 (find_first_range_overlap): Likewise.
4501 (struct ranges_and_idx, value_contents_bits_eq)
4502 (require_not_optimized_out, require_available): Update.
4503 (ranges_copy_adjusted): Change argument types.
4504 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4506 2018-04-06 Tom Tromey <tom@tromey.com>
4508 * value.c (~value): Update.
4509 (struct value) <parent>: Now a value_ref_ptr.
4510 (value_parent, set_value_parent, value_address, value_copy):
4513 2018-04-06 Tom Tromey <tom@tromey.com>
4515 * value.c (struct value): Add constructor, destructor, and member
4517 (allocate_value_lazy, value_decref): Update.
4519 2018-04-06 Tom Tromey <tom@tromey.com>
4521 * value.c (struct value) <released, next>: Remove.
4522 (all_values): Now a std::vector.
4523 (allocate_value_lazy): Update.
4524 (value_next): Remove.
4525 (value_mark, value_free_to_mark, release_value)
4526 (value_release_to_mark): Update.
4528 2018-04-06 Tom Tromey <tom@tromey.com>
4530 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4531 (free_value_chain): Remove.
4532 * value.c (free_value_chain): Remove.
4533 (value_release_to_mark): Return a std::vector.
4534 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4536 (check_condition): Update.
4537 * eval.c (fetch_subexp_value): Change "val_chain" to a
4539 * breakpoint.c (update_watchpoint): Update.
4540 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4542 2018-04-06 Tom Tromey <tom@tromey.com>
4544 * value.h (free_all_values): Remove.
4545 * value.c (free_all_values): Remove.
4547 2018-04-06 Tom Tromey <tom@tromey.com>
4549 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4550 (value_history_chain, value_history_count): Remove.
4551 (value_history): New global.
4552 (record_latest_value, access_value_history, show_values)
4553 (preserve_values): Update.
4555 2018-04-06 Tom Tromey <tom@tromey.com>
4557 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4558 * varobj.c (varobj_set_display_format, varobj_set_value)
4559 (install_default_visualizer, construct_visualizer)
4560 (install_new_value, ~varobj, varobj_get_value_type)
4561 (my_value_of_variable, varobj_editable_p): Update.
4562 * c-varobj.c (c_describe_child, c_value_of_variable)
4563 (cplus_number_of_children, cplus_describe_child): Update.
4564 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4565 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4566 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4568 2018-04-06 Tom Tromey <tom@tromey.com>
4570 * printcmd.c (last_examine_address): Change type to
4572 (do_examine, x_command): Update.
4574 2018-04-06 Tom Tromey <tom@tromey.com>
4576 * value.c (release_value): Update.
4577 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4578 (struct bpstats) <val>: Now a value_ref_ptr.
4579 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4580 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4581 (~watchpoint, print_it_watchpoint, watch_command_1)
4582 (invalidate_bp_value_on_memory_change): Update.
4584 2018-04-06 Tom Tromey <tom@tromey.com>
4586 * varobj.c (varobj_clear_saved_item)
4587 (update_dynamic_varobj_children, install_new_value, ~varobj):
4589 * value.h (value_incref): Move declaration earlier.
4590 (value_decref): Rename from value_free.
4591 (struct value_ref_policy): New.
4592 (value_ref_ptr): New typedef.
4593 (struct value_deleter): Remove.
4594 (gdb_value_up): Remove typedef.
4595 (release_value): Change return type.
4596 (release_value_or_incref): Remove.
4597 * value.c (set_value_parent): Update.
4598 (value_incref): Change return type.
4599 (value_decref): Rename from value_free.
4600 (value_free_to_mark, free_all_values, free_value_chain): Update.
4601 (release_value): Return value_ref_ptr.
4602 (release_value_or_incref): Remove.
4603 (record_latest_value, set_internalvar, clear_internalvar):
4605 * stack.c (info_frame_command): Don't call value_free.
4606 * python/py-value.c (valpy_dealloc, valpy_new)
4607 (value_to_value_object): Update.
4608 * printcmd.c (do_examine): Update.
4609 * opencl-lang.c (lval_func_free_closure): Update.
4610 * mi/mi-main.c (register_changed_p): Don't call value_free.
4611 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4612 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4613 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4615 * guile/scm-value.c (vlscm_free_value_smob)
4616 (vlscm_scm_from_value): Update.
4617 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4618 (frame_unwind_register_unsigned, get_frame_register_bytes)
4619 (put_frame_register_bytes): Don't call value_free.
4620 * findvar.c (address_from_register): Don't call value_free.
4621 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4622 * dwarf2loc.c (entry_data_value_free_closure)
4623 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4624 (dwarf2_evaluate_loc_desc_full): Update.
4625 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4626 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4627 (~watchpoint, watch_command_1)
4628 (invalidate_bp_value_on_memory_change): Update.
4629 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4631 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4634 * warning.m4: Add -Wno-error=deprecated-register.
4635 * configure: Re-generate.
4637 2018-04-05 Tom Tromey <tom@tromey.com>
4639 * linespec.h: Remove include of "vec.h".
4641 2018-04-05 Tom Tromey <tom@tromey.com>
4643 * linespec.c (typep): Remove typedef.
4644 (find_methods, find_superclass_methods): Take a std::vector.
4645 (find_method): Use std::vector.
4647 2018-04-05 Tom Tromey <tom@tromey.com>
4649 * utils.c (compare_strings): Remove.
4650 * utils.h (compare_strings): Remove.
4651 * objc-lang.h (find_imps): Update.
4652 * objc-lang.c (find_methods): Take a std::vector.
4653 (uniquify_strings, find_imps): Likewise.
4654 * linespec.c (find_methods): Take a std::vector.
4655 (decode_objc): Use std::vector.
4656 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4658 (find_method, find_function_symbols): Use std::vector.
4660 2018-04-05 Tom Tromey <tom@tromey.com>
4662 * completer.c (completion_tracker::completion_tracker): Remove
4664 (completion_tracker::discard_completions): Likewise.
4665 * breakpoint.c (ambiguous_names_p): Remove cast.
4666 * ada-lang.c (_initialize_ada_language): Remove cast.
4667 * utils.h (streq): Update.
4668 (streq_hash): Add new declaration.
4669 * utils.c (streq): Return bool.
4670 (streq_hash): New function.
4672 2018-04-05 Tom Tromey <tom@tromey.com>
4674 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4675 Remove a string copy.
4677 2018-04-05 Tom Tromey <tom@tromey.com>
4679 * linespec.c (filter_results): Use std::vector.
4680 (decode_line_2, decode_line_full): Update.
4682 2018-04-05 Tom Tromey <tom@tromey.com>
4684 * linespec.c (canonical_to_fullform): Return std::string.
4685 (filter_results): Update.
4686 (struct decode_line_2_item): Add constructor.
4687 <fullform, displayform>: Now std::string.
4688 (decode_line_2_compare_items): Now a std::sort comparator.
4689 (decode_line_2): Update.
4691 2018-04-05 Tom Tromey <tom@tromey.com>
4693 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4694 (unexpected_linespec_error): Update.
4695 (linespec_parse_basic, parse_linespec): Update.
4697 2018-04-05 Tom Tromey <tom@tromey.com>
4699 * linespec.c (linespec_parse_basic): Reindent.
4701 2018-04-05 Tom Tromey <tom@tromey.com>
4703 * minsyms.h (iterate_over_minimal_symbols): Update.
4704 * minsyms.c (iterate_over_minimal_symbols): Take a
4706 * linespec.c (struct collect_minsyms): Remove.
4707 (compare_msyms): Now a std::sort comparator.
4708 (add_minsym): Add parameters.
4709 (search_minsyms_for_name): Update. Use std::vector.
4711 2018-04-03 Tom Tromey <tom@tromey.com>
4713 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4716 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4718 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4720 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4723 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
4724 printing static type.
4726 2018-04-01 Tom Tromey <tom@tromey.com>
4728 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4729 (rs6000_xfer_shared_libraries): Update.
4731 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
4733 * common/gdb_vecs.h (char_ptr): Remove.
4734 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4736 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4738 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4740 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4742 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4744 * tracepoint.h (struct uploaded_tp): Initialize fields.
4745 <actions, step_actions, cmd_strings>: Change type to
4746 std::vector<char *>.
4747 * tracepoint.c (get_uploaded_tp): Allocate with new.
4748 (free_uploaded_tps): Free with delete.
4749 (parse_tracepoint_definition): Adjust to std::vector change.
4750 * breakpoint.c (read_uploaded_action): Likewise.
4751 (create_tracepoint_from_upload): Likewise.
4752 * ctf.c (ctf_write_uploaded_tp): Likewise.
4753 (SET_ARRAY_FIELD): Likewise.
4754 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4756 2018-03-30 Tom Tromey <tom@tromey.com>
4758 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
4760 (svr4_keep_data_in_core): Update.
4761 (svr4_read_so_list): Update.
4763 2018-03-30 Tom Tromey <tom@tromey.com>
4765 * windows-nat.c (handle_output_debug_string, handle_exception):
4767 * target.h (target_read_string): Update.
4768 * target.c (target_read_string): Change "string" to
4770 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4772 * solib-frv.c (frv_current_sos): Update.
4773 * solib-dsbt.c (dsbt_current_sos): Update.
4774 * solib-darwin.c (darwin_current_sos): Update.
4775 * linux-thread-db.c (inferior_has_bug): Update.
4776 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4777 Update. Remove alloca.
4778 * ada-lang.c (ada_main_name): Update.
4780 2018-03-30 Tom Tromey <tom@tromey.com>
4782 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4783 (struct dwo_file_deleter): New.
4784 (dwo_file_up): New typedef.
4785 (open_and_init_dwo_file): Use dwo_file_up.
4786 (free_dwo_file_cleanup): Remove.
4788 2018-03-30 Tom Tromey <tom@tromey.com>
4790 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4791 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4793 2018-03-30 Tom Tromey <tom@tromey.com>
4795 * dwarf2read.c (class free_cached_comp_units): New class.
4796 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4797 (free_cached_comp_units): Remove function.
4799 2018-03-30 Tom Tromey <tom@tromey.com>
4801 * utils.h (make_cleanup_unpush_target): Remove.
4802 * inf-ptrace.c (struct target_unpusher): New.
4803 (target_unpush_up) New typedef.
4804 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4806 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4808 2018-03-27 Tom Tromey <tom@tromey.com>
4810 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4812 2018-03-27 Pedro Alves <palves@redhat.com>
4813 Tom Tromey <tom@tromey.com>
4815 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4816 destructor. Now a class.
4817 (gdb_readline_wrapper_cleanup): Remove function.
4818 (gdb_readline_wrapper): Remove cleanups.
4820 2018-03-27 Tom Tromey <tom@tromey.com>
4822 * typeprint.h (struct type_print_options) <local_typedefs,
4823 global_typedefs>: Remove "struct" keyword.
4824 (class typedef_hash_table): New class.
4825 (recursively_update_typedef_hash, add_template_parameters)
4826 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4827 (find_typedef_in_hash): Don't declare.
4828 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4829 (typedef_hash_table::recursively_update): Rename from
4830 recursively_update_typedef_hash. Now a member.
4831 (typedef_hash_table::add_template_parameters): Rename from
4832 add_template_parameters. Now a member.
4833 (typedef_hash_table::typedef_hash_table): Now a constructor;
4834 rename from create_typedef_hash.
4835 (typedef_hash_table::~typedef_hash_table): Now a destructor;
4836 rename from free_typedef_hash.
4837 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4838 (do_free_global_table): Remove.
4839 (typedef_hash_table::typedef_hash_table): New constructor; renamed
4840 from copy_type_recursive.
4841 (create_global_typedef_table): Remove.
4842 (typedef_hash_table::find_global_typedef): Now a member of
4844 (typedef_hash_table::find_typedef): Rename from
4845 find_typedef_in_hash; now a member.
4846 (whatis_exp): Update.
4847 * extension.h (struct ext_lang_type_printers): Add constructor and
4849 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4851 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4852 Now a constructor; rename from start_ext_lang_type_printers.
4853 (ext_lang_type_printers): Now a destructor; rename from
4854 free_ext_lang_type_printers.
4855 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4857 (c_type_print_base_struct_union): Update. Remove cleanups.
4859 2018-03-27 Tom Tromey <tom@tromey.com>
4861 * dwarf-index-write.c: Include <cmath>.
4863 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4865 * NEWS: Add entry describing new "set|show varsize-limit" command.
4866 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4868 * printcmd.c (_initialize_printcmd): Add "set var" alias of
4871 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
4873 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4875 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4876 * dwarf-index-common.c: New file.
4877 * dwarf-index-common.h: New file.
4878 * dwarf-index-write.c: New file.
4879 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4880 (struct dwarf2_section_info): Move from here.
4881 (dwarf2_section_info_def): Likewise.
4882 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4883 (offset_type): Likewise.
4884 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4885 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4886 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4887 (byte_swap): Likewise.
4888 (MAYBE_SWAP): Likewise.
4889 (dwarf2_per_cu_ptr): Likewise.
4890 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4891 (struct tu_stats): Likewise.
4892 (struct dwarf2_per_objfile): Likewise.
4893 (struct dwarf2_per_cu_data): Likewise.
4894 (struct signatured_type): Likewise.
4895 (sig_type_ptr): Likewise.
4896 (DEF_VEC_P (sig_type_ptr)): Likewise.
4897 (INDEX4_SUFFIX): Likewise.
4898 (INDEX5_SUFFIX): Likewise.
4899 (DEBUG_STR_SUFFIX): Likewise.
4900 (dwarf2_read_section): Make non-static.
4901 (mapped_index_string_hash): Move from here.
4902 (dwarf5_djb_hash): Likewise.
4903 (file_write): Likewise.
4904 (class data_buf): Likewise.
4905 (struct symtab_index_entry): Likewise.
4906 (struct mapped_symtab): Likewise.
4907 (find_slot): Likewise.
4908 (hash_expand): Likewise.
4909 (add_index_entry): Likewise.
4910 (uniquify_cu_indices): Likewise.
4911 (class c_str_view): Likewise.
4912 (class c_str_view_hasher): Likewise.
4913 (class vector_hasher): Likewise.
4914 (write_hash_table): Likewise.
4915 (psym_index_map): Likewise.
4916 (struct addrmap_index_data): Likewise.
4917 (add_address_entry): Likewise.
4918 (add_address_entry_worker): Likewise.
4919 (write_address_map): Likewise.
4920 (symbol_kind): Likewise.
4921 (write_psymbols): Likewise.
4922 (struct signatured_type_index_data): Likewise.
4923 (write_one_signatured_type): Likewise.
4924 (recursively_count_psymbols): Likewise.
4925 (recursively_write_psymbols): Likewise.
4926 (class debug_names): Likewise.
4927 (check_dwarf64_offsets): Likewise.
4928 (psyms_seen_size): Likewise.
4929 (write_gdbindex): Likewise.
4930 (write_debug_names): Likewise.
4931 (assert_file_size): Likewise.
4932 (write_psymtabs_to_index): Likewise.
4933 (save_gdb_index_command): Likewise.
4934 (_initialize_dwarf2_read): Don't register the "save gdb-index"
4936 * dwarf2read.h: New file.
4938 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4941 * dwarf2read.c (dwarf2_physname): Do not return the demangled
4942 symbol name if the CU's language stores symbol names in linkage
4944 * language.h (struct language_defn)
4945 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
4946 all instances of this struct.
4948 2018-03-26 Tom Tromey <tom@tromey.com>
4950 * stack.c (backtrace_command_1): Remove verbose code.
4952 2018-03-26 Tom Tromey <tom@tromey.com>
4954 * python/py-framefilter.c (py_print_type): Don't catch
4955 exceptions. Return void.
4956 (py_print_value): Likewise.
4957 (py_print_single_arg): Likewise.
4958 (enumerate_args): Don't catch exceptions.
4959 (py_print_args): Likewise.
4960 (py_print_frame): Likewise.
4961 (gdbpy_apply_frame_filter): Catch exceptions here.
4963 2018-03-26 Tom Tromey <tom@tromey.com>
4965 * stack.c (_initialize_stack): Remove trailing newlines from help
4966 text. Add "Usage" line to "backtrace" help.
4968 2018-03-26 Tom Tromey <tom@tromey.com>
4971 * python/py-framefilter.c (py_print_args): Call wrap_hint.
4973 2018-03-26 Tom Tromey <tom@tromey.com>
4975 * python/py-framefilter.c (py_print_single_arg): Return
4976 EXT_LANG_BT_ERROR from catch.
4978 2018-03-26 Tom Tromey <tom@tromey.com>
4981 * stack.c (backtrace_command_1): Move some code into no-filters
4984 2018-03-26 Tom Tromey <tom@tromey.com>
4986 * python/py-framefilter.c (throw_quit_or_print_exception): New
4988 (gdbpy_apply_frame_filter): Use it.
4990 2018-03-26 Tom Tromey <tom@tromey.com>
4993 * python/py-framefilter.c (py_print_type, py_print_value)
4994 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4997 2018-03-26 Tom Tromey <tom@tromey.com>
4999 * python/py-framefilter.c (enumerate_args): Use
5000 gdb::unique_xmalloc_ptr.
5002 2018-03-26 Tom Tromey <tom@tromey.com>
5004 * python/py-framefilter.c (py_print_frame): Return
5006 (gdbpy_apply_frame_filter): Update comment.
5007 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5009 <EXT_LANG_BT_NO_FILTERS>: Change value.
5011 2018-03-26 Tom Tromey <tom@tromey.com>
5014 * stack.c (backtrace_command): Parse "hide" argument.
5015 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5016 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5019 2018-03-26 Tom Tromey <tom@tromey.com>
5021 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5023 (backtrace_command): Remove "fulltrace", add "flags".
5025 2018-03-26 Tom Tromey <tom@tromey.com>
5027 * stack.c (backtrace_command): Rewrite command line parsing.
5029 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5031 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5033 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5035 * filename-seen-cache.h: Add include guard.
5037 2018-03-26 Keith Seitz <keiths@redhat.com>
5039 * symfile.c (place_section): Remove "struct" from section_addr_info
5041 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5042 "struct" keyword from section_addr_info.
5044 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5046 * regformats/regdef.h (reg): Add constructors.
5048 2018-03-25 Pedro Alves <palves@redhat.com>
5050 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5051 if then/else bodies in var_func_name extraction.
5053 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5055 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5056 lookup_minimal_symbol() to find symbol entry.
5057 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5059 2018-03-23 Keith Seitz <keiths@redhat.com>
5062 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5063 nested type definitions for C++, too.
5065 2018-03-23 Tom Tromey <tom@tromey.com>
5067 * machoread.c (struct oso_el): Add a constructor. Don't define as
5069 (macho_register_oso): Remove.
5070 (macho_symtab_read): Take a std::vector.
5071 (oso_el_compare_name): Now a std::sort comparator.
5072 (macho_symfile_read_all_oso): Take a std::vector.
5073 (macho_symfile_read): Use std::vector. Remove cleanups.
5075 2018-03-22 Tom Tromey <tom@tromey.com>
5077 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5078 (record_full_goto_bookmark): Use std::string.
5080 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5083 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5086 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5088 * rs6000-tdep.c (store_insn_p): New function.
5089 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5090 and cr_reg to their unshifted values. Use store_insn_p to
5091 match LR saves using either R1 or fdata->alloca_reg. Use
5092 store_insn_p to match CR saves. Set alloca_reg_offset
5093 when alloca_reg and framep are set. Remove lr_reg shift
5094 when assigning to fdata->lr_register.
5096 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5098 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5099 command line args instead of emitting a warning.
5101 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5103 * tracepoint.h (struct static_tracepoint_marker): Initialize
5104 fields, define default constructor, move constructor and move
5105 assignment, disable the rest.
5106 <str_id, extra>: Make std::string.
5107 (release_static_tracepoint_marker): Remove.
5108 (free_current_marker): Remove.
5109 * tracepoint.c (free_current_marker): Remove.
5110 (parse_static_tracepoint_marker_definition): Adjust to
5111 std::string, use new hex2str overload.
5112 (release_static_tracepoint_marker): Remove.
5113 (print_one_static_tracepoint_marker): Get marker by reference
5114 and adjust to std::string.
5115 (info_static_tracepoint_markers_command): Adjust to std::vector
5117 * target.h (static_tracepoint_marker_p): Remove typedef.
5118 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5119 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5121 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5123 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5124 (target_debug_print_std_vector_static_tracepoint_marker): New.
5125 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5127 (target_debug_print_static_tracepoint_marker_p): ... this.
5128 * target-delegates.c: Re-generate.
5129 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5131 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5132 (decode_static_tracepoint_spec): Adjust to std::vector.
5133 (tracepoint_print_one_detail): Adjust to std::string.
5134 (strace_marker_decode_location): Adjust to std::string.
5135 (update_static_tracepoint): Adjust to std::string, remove call
5136 to release_static_tracepoint_marker.
5137 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5138 Adjust to std::vector.
5139 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5140 (remote_static_tracepoint_markers_by_strid): Adjust to
5142 * common/rsp-low.h (hex2str): New overload with explicit count
5144 * common/rsp-low.c (hex2str): New overload with explicit count
5146 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5147 (_initialize_rsp_low_selftests): Add test_hex2str test.
5148 * unittests/tracepoint-selftests.c
5149 (test_parse_static_tracepoint_marker_definition): Adjust to
5152 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5154 * tracepoint.c (parse_static_tracepoint_marker_definition):
5155 Consider case where the definition is followed by more
5157 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5158 tracepoint-selftests.c.
5159 * unittests/tracepoint-selftests.c: New.
5161 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5163 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5166 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5168 * symtab.c (find_pc_sect_line): fixed indentation.
5170 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5172 * symtab.c (find_pc_sect_line): now uses binary search.
5174 2018-03-19 Tom Tromey <tom@tromey.com>
5176 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5179 2018-03-19 Pedro Alves <palves@redhat.com>
5180 Tom Tromey <tom@tromey.com>
5182 * unittests/observable-selftests.c: New file.
5183 * common/observable.h: New file.
5184 * observable.h: New file.
5185 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5186 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5187 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5188 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5189 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5190 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5191 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5192 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5193 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5194 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5195 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5196 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5197 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5198 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5199 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5200 tui/tui-interp.c, valops.c: Update all users.
5201 * tui/tui-hooks.c (tui_bp_created_observer)
5202 (tui_bp_deleted_observer, tui_bp_modified_observer)
5203 (tui_inferior_exit_observer, tui_before_prompt_observer)
5204 (tui_normal_stop_observer, tui_register_changed_observer):
5206 (tui_observers_token): New global.
5207 (attach_or_detach, tui_attach_detach_observers): New functions.
5208 (tui_install_hooks, tui_remove_hooks): Use
5209 tui_attach_detach_observers.
5210 * record-btrace.c (record_btrace_thread_observer): Remove.
5211 (record_btrace_thread_observer_token): New global.
5212 * observer.sh: Remove.
5213 * observer.c: Rename to observable.c.
5214 * observable.c (namespace gdb_observers): Define new objects.
5215 (observer_debug): Move into gdb_observers namespace.
5216 (struct observer, struct observer_list, xalloc_observer_list_node)
5217 (xfree_observer_list_node, generic_observer_attach)
5218 (generic_observer_detach, generic_observer_notify): Remove.
5219 (_initialize_observer): Update.
5220 Don't include observer.inc.
5221 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5222 (clean mostlyclean): Likewise.
5223 (observer.h, observer.inc): Remove targets.
5224 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5225 (COMMON_SFILES): Use observable.c, not observer.c.
5226 * .gitignore: Remove observer.h.
5228 2018-03-18 Tom Tromey <tom@tromey.com>
5230 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5232 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5234 2018-03-17 Tom Tromey <tom@tromey.com>
5236 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5238 2018-03-17 Tom Tromey <tom@tromey.com>
5240 * target.c (class scoped_target_fd): New.
5241 (target_fileio_close_cleanup): Remove.
5242 (target_fileio_read_alloc_1): Use scoped_target_fd.
5244 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5246 * silent-rules.mk: New.
5247 * Makefile.in: Include silent-rules.mk
5248 (srcdir, VPATH, top_srcdir): Move up.
5249 (COMPILE): Add ECHO_CXX.
5250 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5251 (init.c): Add ECHO_INIT_C.
5252 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5253 (version.c): Add ECHO_GEN.
5254 (printcmd.o): Add ECHO_CXX.
5255 (target-float.o): Add ECHO_CXX.
5256 (ada-exp.o): Add ECHO_CXX.
5257 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5258 (insight$(EXEEXT)): Add ECHO_CXXLD.
5259 * gnulib/configure.ac: Add AM_SILENT_RULES.
5260 * gnulib/aclocal.m4: Re-generate.
5261 * gnulib/configure: Re-generate.
5262 * gnulib/import/Makefile.in: Re-generate.
5264 2018-03-16 Tom Tromey <tom@tromey.com>
5266 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5267 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5268 * utils.c (do_free_section_addr_info)
5269 (make_cleanup_free_section_addr_info): Remove.
5270 * symfile.h (struct other_sections): Add constructor.
5271 (struct section_addr_info): Remove.
5272 (section_addr_info): New typedef.
5273 (struct sym_fns) <sym_offsets>: Change type of parameter.
5274 (build_section_addr_info_from_objfile)
5275 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5276 (default_symfile_offsets, symbol_file_add)
5277 (symbol_file_add_from_bfd)
5278 (build_section_addr_info_from_section_table): Update.
5279 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5280 * symfile.c (alloc_section_addr_info): Remove.
5281 (build_section_addr_info_from_section_table): Change return type.
5283 (build_section_addr_info_from_bfd)
5284 (build_section_addr_info_from_objfile): Likewise.
5285 (free_section_addr_info): Remove.
5286 (relative_addr_info_to_section_offsets): Change type of "addrs".
5287 (addrs_section_compar): Now a std::sort comparator.
5288 (addrs_section_sort): Change return type.
5289 (addr_info_make_relative): Change type of "addrs". Update.
5290 (default_symfile_offsets, syms_from_objfile_1)
5291 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5292 (symbol_file_add_separate): Update.
5293 (symbol_file_add): Change type of "addrs". Update.
5294 (add_symbol_file_command): Update. Remove cleanups.
5295 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5297 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5298 * solib.c (solib_read_symbols): Update.
5299 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5300 * machoread.c (macho_symfile_offsets): Update.
5301 * jit.c (jit_bfd_try_read_symtab): Update.
5303 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5305 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5306 unittests/utils-selftests.c.
5307 * unittests/utils-selftests.c: New file.
5309 2018-03-14 Tom Tromey <tom@tromey.com>
5312 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5315 2018-03-14 Tom Tromey <tom@tromey.com>
5318 * printcmd.c (printf_pointer): Allow "-" in format.
5320 2018-03-14 Tom Tromey <tom@tromey.com>
5322 * printcmd.c (_initialize_printcmd): Add usage to printf.
5324 2018-03-14 Yao Qi <qiyao@sourceware.org>
5326 * MAINTAINERS: Update my email address.
5328 2018-03-13 Tom Tromey <tom@tromey.com>
5330 * machoread.c (macho_check_dsym): Change filenamep to a
5332 (macho_symfile_read): Update.
5333 * symfile.c (load_command): Use std::string.
5335 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5337 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5338 to error message string.
5339 (riscv_register_name): Use xsnprintf instead of sprintf.
5340 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5342 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5344 (riscv_push_dummy_call): Likewise.
5346 2018-03-12 Tom Tromey <tom@tromey.com>
5348 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5349 Use gdb::byte_vector.
5350 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5352 2018-03-12 Yao Qi <yao.qi@linaro.org>
5354 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5355 parameter type to readable_regcache.
5356 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5359 2018-03-11 Tom Tromey <tom@tromey.com>
5361 * dwarf2read.c (struct nextfield): Add initializers.
5362 (struct nextfnfield): Remove.
5363 (struct fnfieldlist): Add initializers. Remove "length" and
5364 "head", use std::vector.
5365 (struct decl_field_list): Remove.
5366 (struct field_info): Add initializers.
5367 <fields, baseclasses>: Now std::vector.
5368 <nbaseclasses, nfnfields, typedef_field_list_count,
5369 nested_types_list_count>: Remove.
5370 (dwarf2_add_field, dwarf2_add_type_defn)
5371 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5372 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5373 (process_structure_scope): Update.
5375 2018-03-11 Tom Tromey <tom@tromey.com>
5377 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5378 for use by std::sort.
5379 (build_type_psymtabs_1): Use std::vector.
5381 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5383 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5384 and LIBMPFR in the printed configuration.
5386 2018-03-08 Tom Tromey <tom@tromey.com>
5388 * source.c (get_filename_and_charpos): Use scoped_fd.
5389 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5390 (procfs_pidlist): Likewise.
5391 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5392 (iterate_over_mappings): Likewise.
5394 2018-03-08 Tom Tromey <tom@tromey.com>
5396 * infcall.c (struct call_return_meta_info)
5397 <stack_temporaries_enabled>: Remove.
5398 (get_call_return_value, call_function_by_hand_dummy): Update.
5399 * thread.c (disable_thread_stack_temporaries): Remove.
5400 (enable_thread_stack_temporaries): Remove.
5401 (thread_stack_temporaries_enabled_p): Return bool.
5402 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5403 (get_last_thread_stack_temporary): Update.
5404 * eval.c (evaluate_subexp): Update.
5405 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5406 class, not a function.
5407 (value_ptr, value_vec): Remove typedefs.
5408 (class thread_info) <stack_temporaries_enabled>: Now bool.
5409 <stack_temporaries>: Now a std::vector.
5410 (thread_stack_temporaries_enabled_p)
5411 (value_in_thread_stack_temporaries): Return bool.
5413 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5415 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5416 (getpkt_or_notif_sane_1): Likewise.
5418 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5420 * build-id.c (build_id_to_debug_bfd): Use std::string.
5422 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5424 * build-id.c (find_separate_debug_file_by_buildid): Return
5426 * build-id.h (find_separate_debug_file_by_buildid): Return
5428 * coffread.c (coff_symfile_read): Adjust to std::string.
5429 * elfread.c (elf_symfile_read): Adjust to std::string.
5430 * symfile.c (separate_debug_file_exists): Change parameter to
5432 (find_separate_debug_file): Return std::string.
5433 (find_separate_debug_file_by_debuglink): Return std::string.
5434 * symfile.h (find_separate_debug_file_by_debuglink): Return
5437 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5439 * common/xml-utils.c (xml_escape_text): Move code to...
5440 (xml_escape_text_append): ... this new function.
5441 * common/xml-utils.h (xml_escape_text_append): New declaration.
5442 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5444 (_initialize_xml_utils): register test_xml_escape_text_append as
5447 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5449 * defs.h: Remove MAX_REGISTER_SIZE.
5450 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5452 * python/py-unwind.c (pyuw_sniffer): Likewise.
5454 2018-03-07 Tom Tromey <tom@tromey.com>
5456 * linux-tdep.c (linux_info_proc): Update.
5457 * target.h (struct target_ops) <to_fileio_readlink>: Return
5459 (target_fileio_readlink): Return optional<string>.
5460 * remote.c (remote_hostio_readlink): Return optional<string>.
5461 * inf-child.c (inf_child_fileio_readlink): Return
5463 * target.c (target_fileio_readlink): Return optional<string>.
5465 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5467 * regcache.c (cooked_read_test): Add riscv to the list of
5468 architectures that have a save_reggroup.
5470 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5472 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5473 value is not a dynamic class object.
5475 2018-03-06 Tom Tromey <tom@tromey.com>
5477 * rust-exp.y: Formatting fixes.
5479 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5481 * riscv-tdep.c (riscv_register_name): Remove target description
5483 (riscv_gdbarch_init): Remove target description check.
5485 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5487 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5489 * riscv-tdep.h: Likewise.
5491 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5493 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5494 (riscv_pseudo_register_write): Delete.
5495 (riscv_gdbarch_init): Remove all use of pseudo registers.
5497 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5499 * record-btrace.c (btrace_print_lines): Replace cleanup
5500 parameter with RAII equivalents.
5501 (btrace_insn_history): Replace cleanup with RAII equivalents.
5502 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5503 make_cleanup_ui_out_tuple_begin_end): Remove.
5504 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5505 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5506 make_cleanup_ui_out_list_begin_end): Remove.
5508 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5510 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5511 parameter types to std::vector. Use bool.
5512 (record_btrace_wait): Replace VEC(tp_t) with
5513 std::vector<thread_info *>.
5514 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5516 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5518 * record-btrace.c (record_btrace_disable_callback): Remove.
5519 (struct scoped_btrace_disable): New.
5520 (record_btrace_open): Use scoped_btrace_disable.
5522 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5524 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5525 reading values from registers.
5527 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5529 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5532 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5534 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5535 change parameter type. Use GDB's print functions, and use
5536 core_addr_to_string where appropriate.
5537 (riscv_push_dummy_call): Use core_addr_to_string where
5538 appropriate, update call to riscv_print_arg_location, and reindent
5540 (riscv_return_value): Update call to riscv_print_arg_location.
5542 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5543 Tim Newsome <tim@sifive.com>
5544 Albert Ou <a0u@eecs.berkeley.edu>
5545 Darius Rad <darius@bluespec.com>
5547 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5548 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5549 (ALLDEPFILES): Add riscv-tdep.c
5550 * configure.tgt: Add riscv support.
5551 * riscv-tdep.c: New file.
5552 * riscv-tdep.h: New file.
5553 * NEWS: Mention new target.
5554 * MAINTAINERS: Add entry for riscv.
5556 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5558 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5559 fields within aggregates.
5561 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5563 * record-btrace.c (btrace_print_lines): Change type of flags to
5564 gdb_disassembly_flags.
5566 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5568 * fbsd-nat.c: Include "inf-ptrace.h".
5569 (USE_SIGTRAP_SIGINFO): Conditionally define.
5570 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5571 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5572 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5574 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5576 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5578 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5579 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5580 "supports_stopped_by_hw_breakpoint" target methods.
5582 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5584 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5585 * fbsd-nat.c (debug_fbsd_nat): New variable.
5586 (show_fbsd_nat_debug): New function.
5587 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5588 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5590 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5592 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5593 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5595 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5596 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5599 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5601 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5602 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5604 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5606 * charset.c (struct charset_vector): New.
5607 (charsets): Change type to charset_vector.
5608 (find_charset_names): Adjust.
5610 (_initialize_charset): Adjust.
5612 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5614 * progspace.h (struct program_space) <deleted_solibs>: Change
5615 type to std::vector<std::string>.
5616 * progspace.c (clear_program_space_solib_cache): Adjust.
5617 * breakpoint.c (print_solib_event): Adjust.
5618 (check_status_catch_solib): Adjust.
5619 * solib.c (update_solib_list): Adjust.
5620 * ui-out.h (class ui_out) <field_string>: New overload.
5621 * ui-out.c (ui_out::field_string): New overload.
5623 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5625 * progspace.h (struct program_space): Add constructor and
5626 destructor, initialize fields.
5627 (add_program_space): Remove.
5628 * progspace.c (add_program_space): Rename to...
5629 (program_space::program_space): ... this.
5630 (release_program_space): Rename to...
5631 (program_space::~program_space): ... this.
5632 (delete_program_space): Use delete to delete program_space.
5633 (initialize_progspace): Use new to allocate program_space.
5634 * inferior.c (add_inferior_with_spaces): Likewise.
5635 (clone_inferior_command): Likewise.
5636 * infrun.c (follow_fork_inferior): Likewise.
5637 (handle_vfork_child_exec_or_exit): Likewise.
5639 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5641 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5642 (delim_string_to_char_ptr_vec): Return std::vector of
5643 gdb::unique_xmalloc_ptr.
5644 (dirnames_to_char_ptr_vec_append): Take std::vector of
5645 gdb::unique_xmalloc_ptr.
5646 (dirnames_to_char_ptr_vec): Return std::vector of
5647 gdb::unique_xmalloc_ptr.
5648 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5649 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5650 (delim_string_to_char_ptr_vec): Return an std::vector of
5651 gdb::unique_xmalloc_ptr, adjust the code.
5652 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5653 gdb::unique_xmalloc_ptr, adjust the code.
5654 (dirnames_to_char_ptr_vec): Return an std::vector of
5655 gdb::unique_xmalloc_ptr, adjust the code.
5656 * auto-load.c (auto_load_safe_path_vec): Change type to
5657 std::vector of gdb::unique_xmalloc_ptr.
5658 (auto_load_expand_dir_vars): Return an std::vector of
5659 gdb::unique_xmalloc_ptr, adjust the code.
5660 (auto_load_safe_path_vec_update): Adjust.
5661 (filename_is_in_auto_load_safe_path_vec): Adjust.
5662 (auto_load_objfile_script_1): Adjust.
5663 * build-id.c (build_id_to_debug_bfd): Adjust.
5664 * linux-thread-db.c (thread_db_load_search): Adjust.
5665 * source.c (add_path): Adjust.
5667 * symfile.c (find_separate_debug_file): Adjust.
5668 * utils.c (do_free_char_ptr_vec): Remove.
5669 (make_cleanup_free_char_ptr_vec): Remove.
5671 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5674 * common/pathstuff.c: Conditionally include "<windows.h>".
5676 2018-03-01 Georg Sauthoff <mail@georg.so>
5679 * gcore.in: Quote variables and switch interpreter to bash.
5681 2018-03-01 Tom Tromey <tom@tromey.com>
5683 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5684 assertion. Add assertion for discriminant_index.
5685 (quirk_rust_enum): Use correct base type name in univariant case.
5687 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5689 * record.c (get_call_history_modifiers): Return a
5691 (cmd_record_call_history): Adjust.
5692 * record-btrace.c (record_btrace_call_history): Adjust.
5693 (record_btrace_call_history_range): Adjust.
5694 (record_btrace_call_history_from): Adjust.
5695 * target-debug.h (target_debug_print_record_print_flags): New.
5696 * target-delegates.c: Re-generate.
5697 * target.c (target_call_history): Change flags type.
5698 (target_call_history_from): Likewise.
5699 (target_call_history_range): Likewise.
5700 * target.h (struct target_ops) <target_call_history>: Likewise.
5701 (target_call_history_from): Likewise.
5702 (target_call_history_range): Likewise.
5704 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5705 Simon Marchi <simon.marchi@polymtl.ca>
5707 * common/common-utils.c: Include "sys/stat.h".
5708 (is_regular_file): Move here from "source.c"; change return
5710 * common/common-utils.h (is_regular_file): New prototype.
5711 * common/pathstuff.c (contains_dir_separator): New function.
5712 * common/pathstuff.h (contains_dir_separator): New prototype.
5713 * source.c: Don't include "sys/stat.h".
5714 (is_regular_file): Move to "common/common-utils.c".
5716 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5718 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5719 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5720 * auto-load.c: Include "common/pathstuff.h".
5721 * common/common-def.h (current_directory): Move here.
5722 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5724 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5726 * common/pathstuff.c: New file.
5727 * common/pathstuff.h: New file.
5728 * compile/compile.c: Include "common/pathstuff.h".
5729 * defs.h (current_directory): Move to "common/common-defs.h".
5730 * dwarf2read.c: Include "common/pathstuff.h".
5732 * guile/scm-safe-call.c: Likewise.
5733 * linux-thread-db.c: Likewise.
5735 * nto-tdep.c: Likewise.
5736 * objfiles.c: Likewise.
5737 * source.c: Likewise.
5738 * symtab.c: Likewise.
5739 * utils.c: Include "common/pathstuff.h".
5740 (gdb_realpath): Move to "common/pathstuff.c".
5741 (gdb_realpath_keepfile): Likewise.
5742 (gdb_abspath): Likewise.
5743 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5744 (gdb_realpath_keepfile): Likewise.
5745 (gdb_abspath): Likewise.
5747 2018-02-28 John Baldwin <jhb@FreeBSD.org>
5749 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5750 wildcard process pid for super_resume for kernels with a
5753 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
5755 * compile/compile.c (get_args): Add additional comments
5756 explaining function.
5758 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
5759 Tom Tromey <tom@tromey.com>
5761 * target.h (memory_write_request_s): Remove typedef. Don't define
5763 (target_write_memory_blocks): Change argument to std::vector.
5764 (struct memory_write_request): Add constructor.
5765 * target-memory.c (compare_block_starting_address): Return bool.
5766 Change argument types.
5767 (claim_memory): Change arguments to use std::vector.
5768 (split_regular_and_flash_blocks, blocks_to_erase)
5769 (compute_garbled_blocks): Likewise.
5770 (cleanup_request_data, cleanup_write_requests_vector): Remove.
5771 (target_write_memory_blocks): Change argument to std::vector.
5772 * symfile.c (struct load_section_data): Add constructor and
5773 destructor. Use std::vector for "requests".
5774 (struct load_progress_data): Add initializers.
5775 (load_section_callback): Update. Use "new".
5776 (clear_memory_write_data): Remove.
5777 (generic_load): Update.
5779 2018-02-27 Alan Hayward <alan.hayward@arm.com>
5781 * arch/aarch64.h: Use common/tdesc.h.
5783 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5785 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5786 architecture with a 64-bit ABI.
5788 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5790 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5791 ahead of target description loading.
5793 2018-02-26 Tom Tromey <tom@tromey.com>
5795 * stack.c (backtrace_command_1): Update.
5796 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5798 * python/py-framefilter.c (py_print_frame)
5799 (gdbpy_apply_frame_filter): Change type of "flags".
5800 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5802 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5803 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5804 * extension.h (enum frame_filter_flag): Rename from
5806 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5807 (apply_ext_lang_frame_filter): Change type of "flags".
5808 * extension.c (apply_ext_lang_frame_filter): Change type of
5810 * extension-priv.h (struct extension_language_ops)
5811 <apply_frame_filter>: Change type of "flags".
5813 2018-02-26 Tom Tromey <tom@tromey.com>
5816 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
5817 off-by-one in py_end computation.
5818 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5820 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5823 2018-02-26 Tom Tromey <tom@tromey.com>
5825 * dwarf2read.c (struct variant_field): New.
5826 (struct nextfield) <variant>: New field.
5827 (dwarf2_add_field): Handle DW_TAG_variant_part.
5828 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5829 discriminated union.
5830 (read_structure_type): Handle DW_TAG_variant_part.
5831 (handle_struct_member_die): New function, extracted from
5832 process_structure_scope. Handle DW_TAG_variant.
5833 (process_structure_scope): Handle discriminated unions. Call
5834 handle_struct_member_die.
5836 2018-02-26 Tom Tromey <tom@tromey.com>
5838 * rust-lang.h (rust_last_path_segment): Declare.
5839 * rust-lang.c (rust_last_path_segment): Now public. Change
5841 (struct disr_info): Remove.
5842 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5843 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5844 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5845 (rust_enum_p, rust_enum_variant): New function.
5846 (rust_underscore_fields): Remove "offset" parameter.
5847 (rust_print_enum): New function.
5848 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5849 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5850 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
5852 (rust_internal_print_type): New function, from rust_print_type.
5854 (rust_print_type): Call rust_internal_print_type.
5855 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5856 Update enum handling.
5857 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5858 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5859 (rust_union_quirks): New functions.
5860 (process_full_comp_unit, process_full_type_unit): Call
5862 (process_structure_scope): Update rust_unions if necessary.
5864 2018-02-26 Tom Tromey <tom@tromey.com>
5866 * value.h (value_union_variant): Declare.
5867 * valops.c (value_union_variant): New function.
5868 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5869 (struct discriminant_info): New.
5870 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5872 (struct main_type) <flag_discriminated_union>: New field.
5874 2018-02-26 Tom Tromey <tom@tromey.com>
5876 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5877 unittests/unpack-selftests.c.
5878 * unittests/unpack-selftests.c: New file.
5879 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5881 2018-02-26 Yao Qi <yao.qi@linaro.org>
5883 * dwarf2read.c (struct partial_die_info) <read>: New method.
5884 (read_partial_die): Remove the declaration.
5885 (load_partial_dies): Update.
5886 (partial_die_info::partial_die_info):
5887 (read_partial_die): Change it to partial_die_info::read.
5889 2018-02-26 Yao Qi <yao.qi@linaro.org>
5891 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5892 (fixup_partial_die): Remove declaration.
5893 (scan_partial_symbols): Update.
5894 (partial_die_parent_scope): Likewise.
5895 (partial_die_full_name): Likewise.
5896 (fixup_partial_die): Change it to partial_die_info::fixup.
5898 2018-02-26 Yao Qi <yao.qi@linaro.org>
5900 * dwarf2read.c (read_partial_die): Update the declaration.
5901 (load_partial_dies): Caller update.
5902 (read_partial_die): Remove one argument abbrev_len.
5904 2018-02-26 Yao Qi <yao.qi@linaro.org>
5906 * dwarf2read.c (struct partial_die_info): Add ctor, delete
5907 assignment operator.
5908 (load_partial_dies): Use ctor and copy ctor.
5909 (read_partial_die): Update.
5910 (dwarf2_cu::find_partial_die): Use ctor.
5912 2018-02-26 Yao Qi <yao.qi@linaro.org>
5914 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5915 (find_partial_die_in_comp_unit): Change it to
5916 dwarf2_cu::find_partial_die.
5917 (find_partial_die): Update.
5919 2018-02-26 Yao Qi <yao.qi@linaro.org>
5921 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5924 2018-02-26 Yao Qi <yao.qi@linaro.org>
5926 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5928 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5930 * arch/amd64.h: Use common/tdesc.h.
5931 * arch/i386.c: Likewise.
5932 * arch/i386.h: Likewise.
5933 * arch/tic6x.c: Likewise.
5934 * arch/tdesc.h: Move file from here...
5935 * common/tdesc.h: ...to here.
5936 * features/aarch64-core.c: Regenerate.
5937 * features/aarch64-fpu.c: Regenerate.
5938 * features/i386/32bit-avx.c: Regenerate.
5939 * features/i386/32bit-avx512.c: Regenerate.
5940 * features/i386/32bit-core.c: Regenerate.
5941 * features/i386/32bit-linux.c: Regenerate.
5942 * features/i386/32bit-mpx.c: Regenerate.
5943 * features/i386/32bit-pkeys.c: Regenerate.
5944 * features/i386/32bit-sse.c: Regenerate.
5945 * features/i386/64bit-avx.c: Regenerate.
5946 * features/i386/64bit-avx512.c: Regenerate.
5947 * features/i386/64bit-core.c: Regenerate.
5948 * features/i386/64bit-linux.c: Regenerate.
5949 * features/i386/64bit-mpx.c: Regenerate.
5950 * features/i386/64bit-pkeys.c: Regenerate.
5951 * features/i386/64bit-segments.c: Regenerate.
5952 * features/i386/64bit-sse.c: Regenerate.
5953 * features/i386/x32-core.c: Regenerate.
5954 * features/tic6x-c6xp.c: Regenerate.
5955 * features/tic6x-core.c: Regenerate.
5956 * features/tic6x-gp.c: Regenerate.
5957 * target-descriptions.c: Use common/tdesc.h.
5958 * target-descriptions.h: Likewise.
5960 2018-02-24 Tom Tromey <tom@tromey.com>
5962 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5963 (try_thread_db_load_from_dir, thread_db_load_search): Use
5965 (info_auto_load_libthread_db_compare): Return bool. Change
5967 (info_auto_load_libthread_db): Use std::vector, std::string.
5970 2018-02-24 Tom Tromey <tom@tromey.com>
5972 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5974 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5976 * gdbarch.c: Rebuild.
5977 * gdbarch.h: Rebuild.
5978 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5979 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5980 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5983 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
5985 * gdbtypes.h (sect_offset): Change type to uint64_t.
5986 (sect_offset_str): New function.
5987 * dwarf2read.c (create_addrmap_from_aranges): Use
5989 (error_check_comp_unit_head): Likewise.
5990 (create_debug_type_hash_table): Likewise.
5991 (read_cutu_die_from_dwo): Likewise.
5992 (init_cutu_and_read_dies): Likewise.
5993 (init_cutu_and_read_dies_no_follow): Likewise.
5994 (process_psymtab_comp_unit_reader): Likewise.
5995 (partial_die_parent_scope): Likewise.
5996 (peek_die_abbrev): Likewise.
5997 (process_queue): Likewise.
5998 (dwarf2_physname): Likewise.
5999 (read_namespace_alias): Likewise.
6000 (read_import_statement): Likewise.
6001 (create_dwo_cu_reader): Likewise.
6002 (create_cus_hash_table): Likewise.
6003 (lookup_dwo_cutu): Likewise.
6004 (inherit_abstract_dies): Likewise.
6005 (read_func_scope): Likewise.
6006 (read_call_site_scope): Likewise.
6007 (dwarf2_add_member_fn): Likewise.
6008 (read_common_block): Likewise.
6009 (read_module_type): Likewise.
6010 (read_typedef): Likewise.
6011 (read_subrange_type): Likewise.
6012 (load_partial_dies): Likewise.
6013 (read_partial_die): Likewise.
6014 (find_partial_die): Likewise.
6015 (read_str_index): Likewise.
6016 (dwarf2_string_attr): Likewise.
6017 (build_error_marker_type): Likewise.
6018 (lookup_die_type): Likewise.
6019 (dump_die_shallow): Likewise.
6020 (follow_die_ref): Likewise.
6021 (dwarf2_fetch_die_loc_sect_off): Likewise.
6022 (dwarf2_fetch_constant_bytes): Likewise.
6023 (follow_die_sig): Likewise.
6024 (get_signatured_type): Likewise.
6025 (get_DW_AT_signature_type): Likewise.
6026 (dwarf2_find_containing_comp_unit): Likewise.
6027 (set_die_type): Likewise.
6029 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6031 * arch/aarch64.c: Include "common-defs.h".
6032 * arch/amd64.c: Likewise.
6033 * arch/i386.c: Likewise.
6035 2018-02-21 Tom Tromey <tom@tromey.com>
6037 * value.h: (extract_field_op): Update.
6038 * eval.c (extract_field_op): Return a const char *.
6039 * expression.h (parse_expression_for_completion): Update.
6040 * completer.c (complete_expression): Update.
6041 (add_struct_fields): Make fieldname const.
6042 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6043 (mark_completion_tag, parse_exp_in_context_1): Update.
6044 (parse_expression_for_completion): Change "name" to
6045 unique_xmalloc_ptr*.
6047 2018-02-21 Tom Tromey <tom@tromey.com>
6049 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6051 2018-02-21 Yao Qi <yao.qi@linaro.org>
6053 * avr-tdep.c (avr_read_pc): Change parameter type to
6055 * gdbarch.sh (read_pc): Likewise.
6056 * gdbarch.c: Re-generated.
6057 * gdbarch.h: Re-generated.
6058 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6060 * ia64-tdep.c (ia64_read_pc): Likewise.
6061 * mips-tdep.c (mips_read_pc): Likewise.
6062 * spu-tdep.c (spu_read_pc): Likewise.
6064 2018-02-21 Yao Qi <yao.qi@linaro.org>
6066 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6067 * regcache-dump.c: New file.
6068 * regcache.c: Move register_dump to regcache-dump.c.
6069 (maintenance_print_registers): Likewise.
6070 (maintenance_print_raw_registers): Likewise.
6071 (maintenance_print_cooked_registers): Likewise.
6072 (maintenance_print_register_groups): Likewise.
6073 (maintenance_print_remote_registers): Likewise.
6074 (_initialize_regcache): Likewise.
6075 * regcache.h (register_dump): Moved from regcache.c.
6077 2018-02-21 Yao Qi <yao.qi@linaro.org>
6079 * regcache.c (regcache::regcache): Update.
6080 (regcache::invalidate): Move it to detached_regcache::invalidate.
6081 (get_thread_arch_aspace_regcache): Update.
6082 (regcache::raw_update): Update.
6083 (regcache::cooked_read): Remove some code.
6084 (regcache::cooked_read_value): Likewise.
6085 (regcache::raw_write): Remove assert on m_readonly_p.
6086 (regcache::raw_supply_integer): Move it to
6087 detached_regcache::raw_supply_integer.
6088 (regcache::raw_supply_zeroed): Likewise.
6089 * regcache.h (detached_regcache) <raw_supply_integer>: New
6091 <raw_supply_zeroed, invalidate>: Likewise.
6092 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6093 <invalidate>: Likewise.
6094 <m_readonly_p>: Removed.
6096 2018-02-21 Yao Qi <yao.qi@linaro.org>
6098 * infcmd.c (get_return_value): Let stop_regs point to
6099 get_current_regcache.
6100 * regcache.c (regcache::regcache): Remove.
6101 (register_dump_reg_buffer): New class.
6102 (regcache_print): Adjust.
6103 * regcache.h (regcache): Remove constructors.
6105 2018-02-21 Yao Qi <yao.qi@linaro.org>
6107 * regcache.c (class register_dump): New class.
6108 (register_dump_regcache, register_dump_none): New class.
6109 (register_dump_remote, register_dump_groups): New class.
6110 (regcache_print): Update.
6111 * regcache.h (regcache_dump_what): Move it to regcache.c.
6112 (regcache) <dump>: Remove.
6114 2018-02-21 Yao Qi <yao.qi@linaro.org>
6116 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6118 (jit_unwind_reg_set_impl): Call raw_supply.
6119 (jit_frame_sniffer): Use reg_buffer_rw.
6120 * record-full.c (record_full_core_regbuf): Change its type.
6121 (record_full_core_open_1): Use reg_buffer_rw.
6122 (record_full_close): Likewise.
6123 (record_full_core_fetch_registers): Use regcache->raw_supply.
6124 (record_full_core_store_registers): Likewise.
6125 * regcache.c (regcache::get_register_status): Move it to
6127 (regcache_raw_set_cached_value): Remove.
6128 (regcache::raw_set_cached_value): Remove.
6129 (regcache::raw_write): Call raw_supply.
6130 (regcache::raw_supply): Move it to reg_buffer_rw.
6131 * regcache.h (regcache_raw_set_cached_value): Remove.
6132 (reg_buffer_rw): New class.
6134 2018-02-21 Yao Qi <yao.qi@linaro.org>
6136 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6137 readonly_detached_regcache.
6138 (dummy_frame_prev_register): Use regcache->cooked_read.
6139 * frame.c (frame_save_as_regcache): Change return type.
6140 (frame_pop): Update.
6141 * frame.h (frame_save_as_regcache): Update declaration.
6142 * inferior.h (get_infcall_suspend_state_regcache): Update
6144 * infrun.c (infcall_suspend_state) <registers>: use
6145 readonly_detached_regcache.
6146 (save_infcall_suspend_state): Don't use regcache_dup.
6147 (get_infcall_suspend_state_regcache): Change return type.
6148 * linux-fork.c (struct fork_info) <savedregs>: Change to
6149 readonly_detached_regcache.
6151 (fork_save_infrun_state): Don't use regcache_dup.
6152 (info_checkpoints_command): Adjust.
6153 * mi/mi-main.c (register_changed_p): Update declaration.
6154 (mi_cmd_data_list_changed_registers): Use
6155 readonly_detached_regcache.
6156 (register_changed_p): Change parameter type to
6157 readonly_detached_regcache.
6158 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6159 readonly_detached_regcache.
6160 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6161 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6163 (regcache::save): Move it to reg_buffer.
6164 (regcache::restore): Change parameter type.
6165 (regcache_dup): Remove.
6166 * regcache.h (reg_buffer) <save>: New method.
6167 (readonly_detached_regcache): New class.
6168 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6169 readonly_detached_regcache.
6170 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6172 2018-02-21 Yao Qi <yao.qi@linaro.org>
6174 * frame.c (frame_save_as_regcache): Use regcache method save.
6175 (frame_pop): Use regcache method restore.
6176 * infrun.c (restore_infcall_suspend_state): Likewise.
6177 * linux-fork.c (fork_load_infrun_state): Likewise.
6178 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6180 * regcache.c (regcache_save): Remove.
6181 (regcache::restore): More asserts.
6182 (regcache_cpy): Remove.
6183 * regcache.h (regcache_save): Remove the declaration.
6184 (regcache::restore): Move from private to public.
6185 Remove the friend declaration of regcache_cpy.
6186 (regcache_cpy): Remove declaration.
6188 2018-02-21 Yao Qi <yao.qi@linaro.org>
6190 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6191 parameter type to 'readable_regcache *'.
6192 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6193 * arm-tdep.c (arm_neon_quad_read): Likewise.
6194 (arm_pseudo_read): Likewise.
6195 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6196 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6197 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6198 * gdbarch.c: Re-generated.
6199 * gdbarch.h: Re-generated.
6200 * gdbarch.sh (pseudo_register_read): Change parameter type to
6201 'readable_regcache *'.
6202 (pseudo_register_read_value): Likewise.
6203 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6204 (h8300_pseudo_register_read): Likewise.
6205 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6206 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6207 (i386_pseudo_register_read_into_value): Likewise.
6208 (i386_pseudo_register_read_value): Likewise.
6209 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6211 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6212 * m32c-tdep.c (m32c_raw_read): Likewise.
6213 (m32c_read_flg): Likewise.
6214 (m32c_banked_register): Likewise.
6215 (m32c_banked_read): Likewise.
6216 (m32c_sb_read): Likewise.
6217 (m32c_part_read): Likewise.
6218 (m32c_cat_read): Likewise.
6219 (m32c_r3r2r1r0_read): Likewise.
6220 (m32c_pseudo_register_read): Likewise.
6221 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6222 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6223 (mep_pseudo_cr64_read): Likewise.
6224 (mep_pseudo_register_read): Likewise.
6225 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6226 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6227 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6228 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6229 (regcache::cooked_read): Likewise.
6230 (regcache::cooked_read_value): Likewise.
6231 (regcache_cooked_read_signed):
6232 (regcache::cooked_read): Likewise.
6233 * regcache.h (readable_regcache): New class.
6234 (regcache): Inherit readable_regcache. Move some methods to
6236 * rl78-tdep.c (rl78_pseudo_register_read): Change
6237 parameter type to 'readable_regcache *'.
6238 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6239 (e500_pseudo_register_read): Change parameter type to
6240 'readable_regcache *'.
6241 (dfp_pseudo_register_read): Likewise.
6242 (vsx_pseudo_register_read): Likewise.
6243 (efpr_pseudo_register_read): Likewise.
6244 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6245 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6246 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6247 (sh64_pseudo_register_read): Likewise.
6248 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6249 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6250 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6251 (spu_pseudo_register_read): Likewise.
6252 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6253 (xtensa_pseudo_register_read): Likewise.
6255 2018-02-21 Yao Qi <yao.qi@linaro.org>
6257 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6258 (regcache::arch): Move it to reg_buffer::arch.
6259 (regcache::register_buffer): Likewise.
6260 (regcache::assert_regnum): Likewise.
6261 (regcache::num_raw_registers): Likewise.
6262 * regcache.h (reg_buffer): New class.
6263 (regcache): Inherit reg_buffer.
6265 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6267 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6268 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6270 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6272 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6274 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6276 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6277 (SFILES): Remove common/*.c files.
6278 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6279 * common/common.host: Add common reference.
6280 * configure.ac: Likewise.
6281 * configure: Regenerate.
6283 2018-02-16 Yao Qi <yao.qi@linaro.org>
6285 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6286 (block_initialize_namespace): Use new.
6287 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6288 (dwarf2_free_objfile): Use delete.
6289 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6290 (copy_type_recursive): Use new.
6291 * gdb_obstack.h (allocate_on_obstack): New.
6293 2018-02-15 Yao Qi <yao.qi@linaro.org>
6296 * inferior.c (exit_inferior_1): Reset inf->control.
6298 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6300 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6303 2018-02-14 Pedro Alves <palves@redhat.com>
6305 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6306 frame_cleanup_after_sniffer on exception.
6308 2018-02-14 Tom Tromey <tom@tromey.com>
6310 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6312 (solib_bfd_open): Make pathname const.
6313 * solib.c (solib_bfd_open): Make pathname const.
6314 * solib-spu.c (spu_bfd_fopen): Make name const.
6315 (spu_bfd_open): Make pathname const.
6316 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6317 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6319 2018-02-14 Tom Tromey <tom@tromey.com>
6321 * symfile.c (symfile_bfd_open): Update.
6322 * source.h (openp, source_full_path_of, find_and_open_source):
6323 Change argument type to unique_xmalloc_ptr.
6324 * source.c (openp): Take a unique_xmalloc_ptr.
6325 (source_full_path_of, find_and_open_source): Likewise.
6326 (open_source_file, symtab_to_fullname): Update.
6327 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6329 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6330 (exec_file_find): Update.
6331 * psymtab.c (psymtab_to_fullname): Update.
6332 * nto-tdep.h (nto_find_and_open_solib): Update.
6333 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6335 * exec.c (exec_file_attach): Update.
6336 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6337 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6339 2018-02-14 Tom Tromey <tom@tromey.com>
6341 * solib.c: Include source.h.
6342 * nto-tdep.c: Include source.h.
6343 * mi/mi-cmd-env.c: Include source.h.
6344 * infcmd.c: Include source.h.
6345 * exec.c: Include source.h.
6346 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6347 (add_path, directory_switch, source_path, init_source_path): Move
6349 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6350 (add_path, directory_switch, source_path, init_source_path):
6353 2018-02-14 Tom Tromey <tom@tromey.com>
6355 * solist.h (exec_file_find, solib_find): Return
6357 (solib_bfd_fopen): Take a const char *.
6358 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6359 (exec_file_find, solib_find): Likewise.
6360 (solib_bfd_fopen): Do not take ownership of "pathname".
6361 (solib_bfd_open): Use unique_xmalloc_ptr.
6362 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6363 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6364 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6365 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6367 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6369 * ada-lang.c (name_match_type_from_name): Remove reference to
6370 ada_name_for_lookup in function's documentation.
6371 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6373 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6375 * defs.h (enum openp_flags): New enum.
6376 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6377 Move to enum openp_flags.
6378 (openp_flags): New enum flags.
6379 (openp): Change parameter type to openp_flags.
6380 * source.c (openp): Change parameter type to openp_flags.
6381 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6382 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6384 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6386 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6389 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6391 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6393 (class dwarf2_queue_guard): ...the destructor of this new class.
6394 (dw2_do_instantiate_symtab): Create instance of the new class
6395 dwarf2_queue_guard, remove cleanup.
6397 2018-02-09 Tom Tromey <tom@tromey.com>
6399 * source.c (find_source_lines): Don't reference past the end of
6402 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6404 * remote.c (remote_btrace_maybe_reopen): Change error message.
6405 * btrace.c (btrace_enable): Likewise.
6406 (parse_xml_btrace): Likewise.
6407 (parse_xml_btrace_conf): Likewise.
6409 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6411 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6412 (linux_enable_pt, linux_enable_bts): Call
6413 diagnose_perf_event_open_fail.
6415 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6417 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6418 Remove parameter and change return type. Update callers. Move it.
6419 (linux_enable_bts, linux_enable_pt): Improve error message.
6420 (linux_enable_pt): Remove zero buffer size check.
6421 (linux_enable_btrace): Improve error messages. Remove NULL return
6424 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6426 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6427 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6428 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6429 (linux_supports_pt, linux_supports_btrace): Remove.
6430 (linux_enable_bts): Call cpu_supports_bts.
6431 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6432 * remote.c (remote_supports_btrace): Remove.
6433 (init_remote_ops): Remove remote_supports_btrace.
6434 * target-delegates.c: Regenerated.
6435 * target.c (target_supports_btrace): Remove.
6436 * target.h (target_ops) <to_supports_btrace>: Remove
6437 (target_supports_btrace): Remove.
6438 * x86-linux-nat.c (x86_linux_create_target): Remove
6439 linux_supports_btrace.
6441 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6443 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6445 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6446 exception and use message in own exception.
6448 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6450 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6451 (perf_event_pt_event_type): Use gdb_file_up.
6452 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6453 scoped_fd, and scoped_mmap.
6455 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6457 * common/scoped_mmap.h: New.
6458 * unittests/scoped_mmap-selftest.c: New.
6459 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6460 unittests/scoped_mmap-selftest.c.
6462 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6464 * common/scoped_fd.h: New.
6465 * unittests/scoped_fd-selftest.c: New.
6466 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6467 unittests/scoped_fd-selftest.c.
6469 2018-02-09 Tom Tromey <tom@tromey.com>
6471 * auto-load.c (auto_load_section_scripts): Use
6472 gdb::unique_xmalloc_ptr.
6474 2018-02-09 Tom Tromey <tom@tromey.com>
6476 * auto-load.c (execute_script_contents): Use std::string.
6478 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6480 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6481 Python function, rather than a new command.
6483 2018-02-08 Tom Tromey <tom@tromey.com>
6485 * solib.c (solib_find_1): Use std::string.
6486 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6488 2018-02-08 Tom Tromey <tom@tromey.com>
6490 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6492 2018-02-08 Tom Tromey <tom@tromey.com>
6494 * source.c (find_source_lines): Use gdb::def_vector.
6496 2018-02-08 Tom Tromey <tom@tromey.com>
6498 * macrocmd.c (struct temporary_macro_definition): New.
6499 (macro_define_command): Use temporary_macro_definition. Remove
6501 (free_macro_definition_ptr): Remove.
6503 2018-02-08 Tom Tromey <tom@tromey.com>
6505 * macroexp.c (maybe_expand): Use std::string.
6507 2018-02-08 Tom Tromey <tom@tromey.com>
6509 * macroexp.c (struct macro_buffer): Add initializers for some
6511 (init_buffer, init_shared_buffer, free_buffer)
6512 (free_buffer_return_text): Remove.
6513 (macro_buffer): New constructors.
6514 (~macro_buffer): New destructor.
6515 (macro_buffer::set_shared): New method.
6516 (macro_buffer::resize_buffer, macro_buffer::appendc)
6517 (macro_buffer::appendmem): Now methods, not free functions.
6518 (set_token, append_tokens_without_splicing, stringify)
6519 (macro_stringify): Update.
6520 (gather_arguments): Change return type. Remove argc_p argument,
6521 add args_ptr argument. Use std::vector.
6522 (substitute_args): Remove argc argument. Accept std::vector.
6523 (expand): Update. Use std::vector.
6524 (scan, macro_expand, macro_expand_next): Update.
6526 2018-02-08 Tom Tromey <tom@tromey.com>
6528 * symtab.c (default_collect_symbol_completion_matches_break_on):
6529 Use unique_xmalloc_ptr.
6530 * macroscope.h: (sal_macro_scope, user_macro_scope)
6531 (default_macro_scope): Return unique_xmalloc_ptr.
6532 * macroscope.c (sal_macro_scope, user_macro_scope)
6533 (default_macro_scope): Return unique_xmalloc_ptr.
6534 * macroexp.h (macro_expand, macro_expand_once): Return
6536 * macroexp.c (macro_expand, macro_expand_once): Return
6538 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6539 (info_macro_command, info_macros_command): Use
6541 * compile/compile-c-support.c (write_macro_definitions): Use
6543 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6545 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6547 * value.c (value_static_field): Assign field type instead of
6548 containing type when returning an optimized out value.
6550 2018-02-06 Yao Qi <yao.qi@linaro.org>
6552 * ft32-tdep.c (ft32_read_pc): Remove.
6553 (ft32_write_pc): Remove.
6554 (ft32_gdbarch_init): Update.
6555 * m32r-tdep.c (m32r_read_pc): Remove.
6556 (m32r_gdbarch_init): Update.
6557 * mep-tdep.c (mep_read_pc): Remove.
6558 (mep_gdbarch_init): Update.
6559 * microblaze-tdep.c (microblaze_write_pc): Remove.
6560 (microblaze_gdbarch_init): Update.
6561 * mn10300-tdep.c (mn10300_read_pc): Remove.
6562 (mn10300_write_pc): Remove.
6563 (mn10300_gdbarch_init): Update.
6564 * moxie-tdep.c (moxie_read_pc): Remove.
6565 (moxie_write_pc): Remove.
6566 (moxie_gdbarch_init): Update.
6568 2018-02-06 Yao Qi <yao.qi@linaro.org>
6570 * expprint.c (print_subexp_standard): Handle
6571 OP_F77_UNDETERMINED_ARGLIST.
6572 (dump_subexp_body_standard): Likewise.
6574 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6576 * target-descriptions.c (tdesc_element_visitor) Add empty
6578 (tdesc_type): Move make_gdb_type from here.
6579 (tdesc_type_builtin): Likewise.
6580 (tdesc_type_vector): Likewise.
6581 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6582 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6583 (make_gdb_type_union): Likewise.
6584 (make_gdb_type_flags): Likewise.
6585 (make_gdb_type_enum): Likewise.
6586 (make_gdb_type): New function.
6587 (tdesc_register_type): Use static make_gdb_type.
6589 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6591 * infcmd.c (default_print_one_register_info): Align natural-format
6592 column values consistently one under another.
6593 (pad_to_column): New function.
6595 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6597 * dwarf2read.c (dwarf2_physname): Move commment.
6599 2018-02-01 Leszek Swirski <leszeks@google.com>
6601 * varobj.c (varobj_formatted_print_options): Allow recursive
6602 pretty printing if pretty printing is enabled.
6604 2018-02-01 Leszek Swirski <leszeks@google.com>
6606 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6607 names after a structop as a filename.
6609 2018-02-01 Yao Qi <yao.qi@linaro.org>
6611 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6612 (arm_record_coproc_data_proc): Likewise.
6614 2018-02-01 Yao Qi <yao.qi@linaro.org>
6616 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6618 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6620 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6621 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6623 2018-01-31 Pedro Alves <palves@redhat.com>
6625 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6626 * inflow.c (child_terminal_save_inferior): Wrap reference to
6627 tcgetpgrp in HAVE_TERMIOS_H.
6628 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6630 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6631 always iterate over all inferiors.
6632 (gdbsim_cntrl_c): Adjust.
6633 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6635 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6637 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6638 index type is objfile-owned if the element type is as well.
6640 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6644 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6646 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6647 "features/s390x-linux64.c".
6648 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6649 s390_linux32 and s390x_linux64.
6650 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6652 * s390-tdep.c: Include "features/s390-linux32.c" and
6653 "features/s390x-linux64.c".
6654 (s390_tdesc_valid): Add check for tdesc_has_registers.
6655 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6656 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6657 tdesc_s390x_linux64.
6658 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6659 tdesc_s390x_linux64 to...
6660 * s390-tdep.h: ...here.
6662 2018-01-30 Pedro Alves <palves@redhat.com>
6665 * config.in, configure: Regenerate.
6666 * configure.ac: Check for getpgid.
6667 * go32-nat.c (go32_pass_ctrlc): New.
6668 (go32_target): Install it.
6669 * inf-child.c (inf_child_target): Install
6670 child_terminal_save_inferior, child_pass_ctrlc and
6672 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6673 (inf_ptrace_target): No longer install it.
6674 * infcmd.c (interrupt_target_1): Adjust.
6675 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6676 (child_interrupt): Declare.
6677 (inferior::terminal_state): New.
6678 * inflow.c (struct terminal_info): Update comments.
6679 (inferior_process_group): Delete.
6680 (terminal_is_ours): Delete.
6681 (gdb_tty_state): New.
6682 (child_terminal_init): Adjust.
6683 (is_gdb_terminal, sharing_input_terminal_1)
6684 (sharing_input_terminal): New functions.
6685 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6686 Set the process's actual process group in the foreground if
6687 possible. Handle is_ours_for_output/is_ours distinction. Don't
6688 mark terminal as the inferior's if not sharing GDB's terminal.
6689 Don't check attach_flag.
6690 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6691 pass down a target_terminal_state.
6692 (child_terminal_save_inferior): New, factored out from ...
6693 (child_terminal_ours_1): ... this. Handle
6694 target_terminal_state::is_ours_for_output.
6695 (child_interrupt, child_pass_ctrlc): New.
6696 (inflow_inferior_exit): Clear the inferior's terminal_state.
6697 (copy_terminal_info): Copy the inferior's terminal state.
6698 (_initialize_inflow): Remove reference to terminal_is_ours.
6699 * inflow.h (inferior_process_group): Delete.
6700 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6701 * procfs.c (procfs_target): Don't install procfs_interrupt.
6702 (procfs_interrupt): Delete.
6703 * remote.c (remote_serial_quit_handler): Adjust.
6704 (remote_interrupt): Remove ptid parameter. Adjust.
6705 * target-delegates.c: Regenerate.
6706 * target.c: Include "terminal.h".
6707 (target_terminal::terminal_state): Rename to ...
6708 (target_terminal::m_terminal_state): ... this.
6709 (target_terminal::init): Adjust.
6710 (target_terminal::inferior): Adjust to per-inferior
6712 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6713 (target_terminal::ours, target_terminal::ours_for_output): Use
6714 target_terminal_is_ours_kind.
6715 (target_interrupt): Remove ptid parameter. Adjust.
6716 (default_target_pass_ctrlc): Adjust.
6717 * target.h (target_ops::to_terminal_save_inferior): New field.
6718 (target_ops::to_interrupt): Remove ptid_t parameter.
6719 (target_interrupt): Remove ptid_t parameter. Update comment.
6720 (target_pass_ctrlc): Update comment.
6721 * target/target.h (target_terminal_state): New scoped enum,
6723 (target_terminal::terminal_state): ... here.
6724 (target_terminal::inferior): Update comments.
6725 (target_terminal::restore_inferior): New.
6726 (target_terminal::is_inferior, target_terminal::is_ours)
6727 (target_terminal::is_ours_for_output): Adjust.
6728 (target_terminal::scoped_restore_terminal_state): Adjust to
6729 rename, and call restore_inferior() instead of inferior().
6730 (target_terminal::scoped_restore_terminal_state::m_state): Change
6732 (target_terminal::terminal_state): Rename to ...
6733 (target_terminal::m_terminal_state): ... this and change type.
6735 2018-01-30 Pedro Alves <palves@redhat.com>
6737 * linux-nat.c (wait_for_signal): New function.
6738 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6740 (async_terminal_is_ours)
6741 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6742 (linux_nat_add_target): Don't override
6743 to_terminal_inferior/to_terminal_ours.
6745 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
6747 * remote.c (remote_follow_fork): Don't call "detach_inferior".
6749 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
6751 * dwarf2read.c (free_dwo_files): Add forward-declaration.
6752 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6753 dwarf2_per_objfile_free here.
6754 (dwarf2_per_objfile_free): Remove.
6755 (_initialize_dwarf2_read): Don't register
6756 dwarf2_per_objfile_free as a registry cleanup.
6758 2018-01-27 Eli Zaretskii <eliz@gnu.org>
6760 Avoid compilation errors in MinGW native builds
6762 The error is triggered by including python-internal.h, and the
6765 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6766 from build-gnulib/import/math.h:27,
6767 from d:/usr/Python26/include/pyport.h:235,
6768 from d:/usr/Python26/include/Python.h:58,
6769 from python/python-internal.h:94,
6770 from python/py-arch.c:24:
6771 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6775 This happens because Python headers define 'hypot' to expand t
6776 '_hypot' in the Windows builds.
6777 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6778 'hypoth'. This avoids a compilation error.
6780 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6782 * MAINTAINERS (Write After Approval): Fix ordering.
6784 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6786 * MAINTAINERS (Write After Approval): Add Alan Hayward.
6788 2018-01-26 Alan Modra <amodra@gmail.com>
6790 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6791 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6792 Remove nop. Make const. Comment.
6793 (powerpc32_plt_stub_so_2): New.
6794 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6795 Correct count. Update uses.
6796 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6797 Move common code reading PLT entry word. Correct
6798 powerpc32_plt_stub PLT address calculation.
6799 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6800 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6801 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6802 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6803 (ppc64_standard_linkage8): Likewise.
6804 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6805 Correct insns description.
6806 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6808 2018-01-24 Pedro Alves <palves@redhat.com>
6810 GCC PR libstdc++/83906
6811 * gdbtypes.c (operator==(const dynamic_prop &,
6812 const dynamic_prop &)): New.
6813 (operator==(const range_bounds &, const range_bounds &)): New.
6814 (check_types_equal): Use them instead of memcmp.
6815 * gdbtypes.h (operator==(const dynamic_prop &,
6816 const dynamic_prop &)): Declare.
6817 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6818 (operator==(const range_bounds &, const range_bounds &)): Declare.
6819 (operator!=(const range_bounds &, const range_bounds &)): Declare.
6821 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6823 * s390-linux-tdep.c (s390_record_address_mask)
6824 (s390_record_calc_disp_common, s390_record_calc_disp)
6825 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6826 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6827 (s390_process_record): Move to s390-tdep.c.
6828 (s390_linux_init_abi_any): Adjust.
6829 * s390-tdep.c (s390_record_address_mask)
6830 (s390_record_calc_disp_common, s390_record_calc_disp)
6831 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6832 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6833 (s390_process_record): Moved from s390-linux-tdep.c
6834 (s390_gdbarch_init): Adjust.
6836 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6838 * s390-linux-nat.c (s390-tdep.h): New include.
6839 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6840 (HFILES_NO_SRCDIR): Add s390-tdep.h.
6841 (ALLDEPFILES): Add s390-tdep.c.
6842 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6843 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6844 * s390-tdep.h: ...this. New file.
6845 * s390-linux-tdep.c (s390-tdep.h): New include.
6846 (_initialize_s390_tdep): Rename to...
6847 (_initialize_s390_linux_tdep): ...this and adjust.
6848 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6849 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6851 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6852 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6853 (s390_is_partial_instruction, s390_software_single_step)
6854 (is_non_branch_ril, s390_displaced_step_copy_insn)
6855 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6856 (s390_prologue_data, s390_addr, s390_store, s390_load)
6857 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6858 (s390_register_call_saved, s390_guess_tracepoint_registers)
6859 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6860 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6861 (s390_pseudo_register_name, s390_pseudo_register_type)
6862 (s390_pseudo_register_read, s390_pseudo_register_write)
6863 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6864 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6865 (s390_addr_bits_remove, s390_address_class_type_flags)
6866 (s390_address_class_type_flags_to_name)
6867 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6868 (s390_function_arg_float, s390_function_arg_vector)
6869 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6870 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6871 (s390_frame_align, s390_register_return_value, s390_return_value)
6872 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6873 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6874 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6875 (s390_trad_frame_prev_register, s390_unwind_cache)
6876 (s390_prologue_frame_unwind_cache)
6877 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6878 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6879 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6880 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6881 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6882 (s390_frame_base_address, s390_local_base_address)
6883 (s390_frame_base, s390_gcc_target_options)
6884 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6885 (s390_validate_reg_range, s390_tdesc_valid)
6886 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6887 * s390-tdep.c: ...this. New file.
6889 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6891 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6892 (s390_process_record, s390_gdbarch_tdep_alloc)
6893 (s390_linux_init_abi_any): Use/set new hook.
6895 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6897 * s390-linux-tdep.c (osabi.h): New include.
6898 (s390_linux_init_abi_31, s390_linux_init_abi_64)
6899 (s390_linux_init_abi_any): New functions.
6900 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6902 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6904 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6905 tdesc_has_registers check
6907 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6909 * s390-linux-tdep.c (s390_tdesc_valid): New function.
6910 (s390_validate_reg_range): New macro.
6911 (s390_gdbarch_init): Adjust.
6913 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6915 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6916 (s390_gdbarch_tdep_alloc): Adjust.
6917 (s390_gdbarch_init): Adjust.
6919 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6921 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6922 <have_tdb>: Change type to bool.
6923 (s390_gdbarch_tdep_alloc): Adjust.
6924 (s390_gdbarch_init): Adjust.
6926 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6928 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6929 (gdbarch_tdep) <have_upper, have_vx>: New fields.
6930 (s390_gdbarch_tdep_alloc): New function.
6931 (s390_gdbarch_init): Allocate tdep at start and use its fields
6932 instead of separate variables.
6934 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6936 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6937 when looking for cached gdbarch and add comment for remaining.
6939 2018-01-22 Pedro Alves <palves@redhat.com>
6940 Sergio Durigan Junior <sergiodj@redhat.com>
6942 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6945 2018-01-22 Maciej W. Rozycki <macro@mips.com>
6947 * MAINTAINERS: Update my company e-mail address.
6949 2018-01-22 Yao Qi <yao.qi@linaro.org>
6951 * regcache.c (cooked_write_test): New function.
6952 (_initialize_regcache): Register the test.
6954 2018-01-22 Yao Qi <yao.qi@linaro.org>
6956 * ia64-tdep.c (ia64_pseudo_register_read): Call
6957 regcache->cooked_read instead of regcache_cooked_read_unsigned.
6958 * m32c-tdep.c (m32c_cat_read): Likewise.
6959 (m32c_r3r2r1r0_read): Likewise.
6960 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6961 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6963 2018-01-22 Yao Qi <yao.qi@linaro.org>
6965 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6966 method raw_read instead of regcache_raw_read.
6967 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6968 * arm-tdep.c (arm_neon_quad_read): Likewise.
6969 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6970 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6971 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6972 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6973 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6974 (i386_pseudo_register_read_into_value): Likewise.
6975 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6976 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6977 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6978 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6979 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6980 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6981 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6982 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6983 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6985 2018-01-22 Yao Qi <yao.qi@linaro.org>
6987 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6988 * configure.tgt: Remove target mt.
6989 * mt-tdep.c: Remove.
6990 * regcache.c (cooked_read_test): Remove the check for mt.
6992 2018-01-22 Yao Qi <yao.qi@linaro.org>
6994 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6995 instead of gdbarch_pseudo_register_read_value.
6997 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6999 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7002 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7004 * linespec.c (create_sals_line_offset): Remove code that preserved
7005 the symtab_and_line's line number.
7007 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7009 * varobj.c (varobj_create): Don't set valid_block when creating a
7012 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7014 * varobj.c (varobj_create): Remove out of date comment.
7016 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7019 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7020 updating innermost block.
7021 * parse.c (innermost_block_tracker::update): Take extra type
7022 parameter, and check types match before updating innermost block.
7023 (write_dollar_variable): Update innermost block for registers.
7024 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7025 (innermost_block_tracker::innermost_block_tracker): Initialise
7027 (innermost_block_tracker::reset): Take type parameter.
7028 (innermost_block_tracker::update): Take type parameter, and pass
7029 type through as needed.
7030 (innermost_block_tracker::m_types): New member.
7031 * varobj.c (varobj_create): Pass type when reseting innermost
7034 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7036 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7037 * ada-lang.c (resolve_subexp): Likewise.
7038 * breakpoint.c (set_breakpoint_condition) Likewise.
7039 (watch_command_1) Likewise.
7040 * c-exp.y (variable): Likewise.
7041 * d-exp.y (PrimaryExpression): Likewise.
7042 * f-exp.y (variable): Likewise.
7043 * go-exp.y (variable): Likewise.
7044 * m2-exp.y (variable): Likewise.
7045 * objfiles.c (objfile::~objfile): Likewise.
7046 * p-exp.y (variable): Likewise.
7047 * parse.c (innermost_block): Change type.
7048 * parser-defs.h (class innermost_block_tracker): New.
7049 (innermost_block): Change to innermost_block_tracker.
7050 * printcmd.c (display_command): Switch to innermost_block API.
7051 (do_one_display): Likewise.
7052 * rust-exp.y (do_one_display): Likewise.
7053 * symfile.c (clear_symtab_users): Likewise.
7054 * varobj.c (varobj_create): Switch to innermost_block API, replace
7055 use of innermost_block with block stored on varobj object.
7057 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7059 * expression.h (innermost_block): Remove declaration.
7060 * varobj.c: Add 'parser-defs.h' include.
7062 2018-01-19 Tom Tromey <tom@tromey.com>
7064 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7065 symbols in the static and global blocks.
7067 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7069 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7070 gdb_ptrace.h, and move including gdb_wait.h ...
7071 * nat/linux-ptrace.h: ... to here.
7073 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7075 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7076 inf_ptrace_detach_success.
7077 (inf_ptrace_detach_success): Add inferior parameter, use it
7078 instead of inferior_ptid, pass it to detach_inferior.
7079 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7081 * inferior.c (detach_inferior): Add overload that takes an
7083 * inferior.h (detach_inferior): Likewise.
7084 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7085 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7086 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7088 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7090 * target.h (struct target_ops) <to_detach>: Add inferior
7092 (target_detach): Likewise.
7093 * target.c (dispose_inferior): Pass inferior down.
7094 (target_detach): Pass inferior down. Assert that it is equal to
7095 the current inferior.
7096 * aix-thread.c (aix_thread_detach): Pass inferior down.
7097 * corefile.c (core_file_command): Pass current_inferior() down.
7098 * corelow.c (core_detach): Add inferior parameter.
7099 * darwin-nat.c (darwin_detach): Likewise.
7100 * gnu-nat.c (gnu_detach): Likewise.
7101 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7102 * infcmd.c (detach_command): Pass current_inferior() down to
7104 * infrun.c (follow_fork_inferior): Pass parent_inf to
7106 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7108 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7109 * linux-thread-db.c (thread_db_detach): Likewise.
7110 * nto-procfs.c (procfs_detach): Likewise.
7111 * procfs.c (procfs_detach): Likewise.
7112 * record.c (record_detach): Likewise.
7113 * record.h (struct inferior): Forward-declare.
7114 (record_detach): Add inferior parameter.
7115 * remote-sim.c (gdbsim_detach): Likewise.
7116 * remote.c (remote_detach_1): Likewise.
7117 (remote_detach): Likewise.
7118 (extended_remote_detach): Likewise.
7119 * sol-thread.c (sol_thread_detach): Likewise.
7120 * target-debug.h (target_debug_print_inferior_p): New macro.
7121 * target-delegates.c: Re-generate.
7122 * top.c (kill_or_detach): Pass inferior down to target_detach.
7123 * windows-nat.c (windows_detach): Add inferior parameter.
7125 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7127 * target.h (struct target_ops) <to_detach>: Remove args
7129 (target_detach): Likewise.
7130 * target.c (dispose_inferior): Adjust.
7131 (target_detach): Remove args parameter, adjust.
7132 * aix-thread.c (aix_thread_detach): Adjust.
7133 * corefile.c (core_file_command): Adjust.
7134 * corelow.c (core_detach): Adjust.
7135 * darwin-nat.c (darwin_detach): Adjust.
7136 * gnu-nat.c (gnu_detach): Adjust.
7137 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7138 * infcmd.c (detach_command): Adjust
7139 * infrun.c (follow_fork_inferior): Adjust.
7140 (handle_vfork_child_exec_or_exit): Adjust.
7141 * linux-fork.c (linux_fork_detach): Remove args parameter.
7142 * linux-fork.h (linux_fork_detach): Likewise.
7143 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7144 * linux-thread-db.c (thread_db_detach): Likewise.
7145 * nto-procfs.c (procfs_detach): Likewise.
7146 * procfs.c (procfs_detach): Likewise.
7147 (do_detach): Remove signo parameter.
7148 * record.c (record_detach): Remove args parameter.
7149 * record.h (record_detach): Likewise.
7150 * remote-sim.c (gdbsim_detach): Likewise.
7151 * remote.c (remote_detach_1): Likewise.
7152 (remote_detach): Likewise.
7153 (extended_remote_detach): Likewise.
7154 * sol-thread.c (sol_thread_detach): Likewise.
7155 * target-delegates.c: Re-generate.
7156 * top.c (struct qt_args) <args>: Remove field.
7157 (kill_or_detach): Don't pass args.
7158 (quit_force): Don't set args.
7159 * windows-nat.c (windows_detach): Remove args parameter.
7161 2018-01-19 Yao Qi <yao.qi@linaro.org>
7163 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7164 (arm_linux_init_abi): Install it.
7166 2018-01-19 Yao Qi <yao.qi@linaro.org>
7168 * osabi.c (gdb_osabi_names): Extend the regexp for
7169 arm-linux-gnueabihf.
7171 2018-01-18 Yao Qi <yao.qi@linaro.org>
7173 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7175 (abbrev_table::add_abbrev): Update.
7176 (abbrev_table::lookup_abbrev): Update.
7178 2018-01-18 Yao Qi <yao.qi@linaro.org>
7180 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7182 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7184 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7187 2018-01-17 Tom Tromey <tom@tromey.com>
7189 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7191 2018-01-17 Tom Tromey <tom@tromey.com>
7193 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7194 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7195 (create_array_type_with_stride): Update.
7196 * dwarf2read.c (set_die_type): Update.
7198 2018-01-17 Tom Tromey <tom@tromey.com>
7200 * dwarf2read.c (delayed_method_info): Remove typedef.
7201 (dwarf2_cu::method_info): Now a std::vector.
7202 (add_to_method_list): Update.
7203 (free_delayed_list): Remove.
7204 (compute_delayed_physnames): Update.
7205 (process_full_comp_unit, process_full_type_unit): Clear the method
7206 list. Remove cleanups.
7207 (psymtab_include_file_name): Add name_holder parameter. Use
7209 (dwarf_decode_lines): Update.
7211 2018-01-17 Tom Tromey <tom@tromey.com>
7212 Simon Marchi <simon.marchi@ericsson.com>
7214 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7215 (dwarf2_per_objfile::free_cached_comp_units)
7216 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7217 (init_cutu_and_read_dies_no_follow): Update.
7218 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7219 (dwarf2_cu::~dwarf2_cu): New.
7220 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7221 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7223 2018-01-17 Tom Tromey <tom@tromey.com>
7224 Simon Marchi <simon.marchi@ericsson.com>
7226 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7227 (struct die_reader_specs) <abbrev_table>: New member.
7228 (struct abbrev_table): Add constructor.
7229 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7230 <abbrev_obstack>: Now an auto_obstack.
7231 (abbrev_table_up): New typedef.
7232 (init_cu_die_reader): Add abbrev_table parameter.
7233 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7234 Add result_dwo_abbrev_table.
7235 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7236 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7238 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7240 (skip_children): Update.
7241 (abbrev_table::alloc_abbrev): Rename from
7242 abbrev_table_alloc_abbrev.
7243 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7244 (abbrev_table::lookup_abbrev): Rename from
7245 abbrev_table_lookup_abbrev.
7246 (abbrev_table_read_table): Return abbrev_table_up.
7247 (abbrev_table_free, abbrev_table_free_cleanup)
7248 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7249 (load_partial_dies): Update.
7251 2018-01-17 Tom Tromey <tom@tromey.com>
7253 * dwarf2read.c (dwarf2_compute_name): Update comment.
7254 (read_func_scope, read_variable): Update.
7255 (new_symbol): Remove.
7256 (new_symbol_full): Rename to new_symbol.
7258 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7261 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7262 a warning instead of throwing an error, set section size to 0 and return
7264 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7266 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7268 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7270 (linux_ptrace_attach_fail_reason_string): Likewise.
7271 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7273 (linux_ptrace_attach_fail_reason_string): Likewise.
7274 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7276 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7278 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7280 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7283 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7284 checking for fs_base/gs_base fields in struct user_regs_struct.
7285 * configure: Regenerate.
7287 2018-01-17 Yao Qi <yao.qi@linaro.org>
7289 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7291 (aarch64_linux_init_abi): Install it to gdbarch hook
7294 2018-01-15 Pedro Alves <palves@redhat.com>
7296 * common/signals-state-save-restore.c
7297 (save_original_signals_state): Fix typos.
7299 2017-01-12 Tom Tromey <tom@tromey.com>
7300 Sergio Durigan Junior <sergiodj@redhat.com>
7302 * Makefile.in (install-only): Install gdb-add-index.
7304 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7306 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7308 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7310 * infrun.c (keep_going_pass_signal): Clear step-over info when
7311 insert_breakpoints fails.
7313 2018-01-11 Pedro Alves <palves@redhat.com>
7316 * infrun.c (resume): Rename to ...
7317 (resume_1): ... this.
7318 (resume): Reimplement as wrapper around resume_1.
7320 2018-01-11 Pedro Alves <palves@redhat.com>
7323 * remote.c (remote_parse_stop_reply): Default to the last-set
7324 general thread instead of to 'magic_null_ptid'.
7326 2018-01-10 Pedro Alves <palves@redhat.com>
7328 * language.h (language_get_symbol_name_matcher): Rename ...
7329 (get_symbol_name_matcher): ... this.
7330 * language.c (language_get_symbol_name_matcher): Ditto.
7331 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7334 2018-01-10 Pedro Alves <palves@redhat.com>
7338 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7339 Adjust to use language_get_symbol_name_matcher instead of
7340 language_defn::la_get_symbol_name_matcher.
7341 * language.c (language_get_symbol_name_matcher): If in Ada mode
7342 and the lookup name is a verbatim match, return Ada's matcher.
7343 * language.h (language_get_symbol_name_matcher): Adjust comment.
7344 (ada_lookup_name_info::verbatim_p):: New method.
7346 2018-01-10 Pedro Alves <palves@redhat.com>
7349 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7350 minsym's language is language_auto or language_cplus, pass down
7351 language_ada instead.
7352 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7354 2018-01-10 Pedro Alves <palves@redhat.com>
7357 * minsyms.c (linkage_name_str): New function.
7358 (iterate_over_minimal_symbols): Use it.
7360 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7362 * NEWS: Document that 'info proc' now works on FreeBSD.
7364 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7366 * configure.ac: Check for kinfo_getfile in libutil.
7367 * configure: Regenerate.
7368 * config.in: Regenerate.
7369 * fbsd-nat.c: Include "fbsd-tdep.h".
7370 (fbsd_fetch_cmdline): New.
7371 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7372 rather than calling error.
7373 (fbsd_info_proc): New.
7374 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7375 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7376 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7378 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7380 * fbsd-nat.c (struct free_deleter): Remove.
7381 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7383 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7385 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7386 NULL for an empty pathname.
7388 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7390 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7391 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7392 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7393 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7394 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7395 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7396 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7397 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7398 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7399 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7400 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7401 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7402 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7403 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7404 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7406 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7408 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7409 (gnu_xfer_auxv): New function.
7410 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7413 2018-01-08 Yao Qi <yao.qi@linaro.org>
7414 Simon Marchi <simon.marchi@ericsson.com>
7416 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7418 (COMMON_OBS): Remove selftest.o.
7419 * configure.ac: Append selftest-arch.c and common/selftest.c to
7420 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7421 * configure: Re-generated.
7422 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7424 (maintenance_info_selftests): Likewise.
7426 2018-01-08 Xavier Roirand <roirand@adacore.com>
7428 * ada-valprint.c (val_print_packed_array_elements): Use
7429 proper number of elements when printing an array indexed
7430 by an enumeration type.
7432 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7434 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7435 (dw2_get_file_names_reader): Adjust.
7436 (lookup_dwo_signatured_type): Adjust.
7437 (lookup_dwp_signatured_type): Adjust.
7438 (lookup_signatured_type): Adjust.
7439 (create_type_unit_group): Adjust.
7440 (get_type_unit_group): Adjust.
7441 (process_psymtab_comp_unit_reader): Adjust.
7442 (build_type_psymtabs_reader): Adjust.
7443 (scan_partial_symbols): Adjust.
7444 (add_partial_symbol): Adjust.
7445 (add_partial_subprogram): Adjust.
7446 (peek_die_abbrev): Adjust.
7447 (fixup_go_packaging): Adjust.
7448 (process_imported_unit_die): Adjust.
7449 (dwarf2_compute_name): Adjust.
7450 (dwarf2_physname): Adjust.
7451 (read_import_statement): Adjust.
7452 (handle_DW_AT_stmt_list): Adjust.
7453 (read_file_scope): Adjust.
7454 (read_func_scope): Adjust.
7455 (read_lexical_block_scope): Adjust.
7456 (read_call_site_scope): Adjust.
7457 (read_variable): Adjust.
7458 (dwarf2_rnglists_process): Adjust.
7459 (dwarf2_ranges_process): Adjust.
7460 (dwarf2_ranges_read): Adjust.
7461 (dwarf2_get_pc_bounds): Adjust.
7462 (dwarf2_record_block_ranges): Adjust.
7463 (dwarf2_add_field): Adjust.
7464 (dwarf2_add_member_fn): Adjust.
7465 (read_structure_type): Adjust.
7466 (process_structure_scope): Adjust.
7467 (read_enumeration_type): Adjust.
7468 (read_array_type): Adjust.
7469 (mark_common_block_symbol_computed): Adjust.
7470 (read_common_block): Adjust.
7471 (read_namespace_type): Adjust.
7472 (read_namespace): Adjust.
7473 (read_module_type): Adjust.
7474 (read_tag_pointer_type): Adjust.
7475 (read_tag_ptr_to_member_type): Adjust.
7476 (read_tag_string_type): Adjust.
7477 (read_subroutine_type): Adjust.
7478 (read_typedef): Adjust.
7479 (read_base_type): Adjust.
7480 (attr_to_dynamic_prop): Adjust.
7481 (read_subrange_type): Adjust.
7482 (read_unspecified_type): Adjust.
7483 (dwarf2_read_abbrevs): Adjust.
7484 (load_partial_dies): Adjust.
7485 (read_partial_die): Adjust.
7486 (find_partial_die): Adjust.
7487 (guess_partial_die_structure_name): Adjust.
7488 (fixup_partial_die): Adjust.
7489 (read_attribute_value): Adjust.
7490 (read_addr_index): Adjust.
7491 (read_addr_index_from_leb128): Adjust.
7492 (read_str_index): Adjust.
7493 (dwarf2_string_attr): Adjust.
7494 (get_debug_line_section): Adjust.
7495 (dwarf_decode_line_header): Adjust.
7496 (lnp_state_machine::check_line_address): Adjust.
7497 (dwarf_decode_lines_1): Adjust.
7498 (dwarf_decode_lines): Adjust.
7499 (dwarf2_start_symtab): Adjust.
7500 (var_decode_location): Adjust.
7501 (new_symbol_full): Adjust.
7502 (dwarf2_const_value_data): Adjust.
7503 (dwarf2_const_value_attr): Adjust.
7504 (dwarf2_const_value): Adjust.
7506 (die_containing_type): Adjust.
7507 (build_error_marker_type): Adjust.
7508 (lookup_die_type): Adjust.
7509 (guess_full_die_structure_name): Adjust.
7510 (anonymous_struct_prefix): Adjust.
7511 (determine_prefix): Adjust.
7512 (dwarf2_name): Adjust.
7513 (follow_die_ref_or_sig): Adjust.
7514 (follow_die_offset): Adjust.
7515 (follow_die_ref): Adjust.
7516 (follow_die_sig_1): Adjust.
7517 (follow_die_sig): Adjust.
7518 (get_signatured_type): Adjust.
7519 (get_DW_AT_signature_type): Adjust.
7520 (decode_locdesc): Adjust.
7521 (dwarf_decode_macros): Adjust.
7522 (cu_debug_loc_section): Adjust.
7523 (fill_in_loclist_baton): Adjust.
7524 (dwarf2_symbol_mark_computed): Adjust.
7525 (init_one_comp_unit): Don't assign
7526 dwarf2_cu::dwarf2_per_objfile.
7527 (set_die_type): Adjust.
7529 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7531 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7532 <dwarf2_per_objfile>: New field.
7533 (dwarf2_per_objfile): Remove global.
7534 (get_dwarf2_per_objfile): New function.
7535 (set_dwarf2_per_objfile): New function.
7536 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7538 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7539 (read_abbrev_offset): Likewise.
7540 (read_indirect_string): Likewise.
7541 (read_indirect_line_string): Likewise.
7542 (read_indirect_string_at_offset): Likewise.
7543 (read_indirect_string_from_dwz): Likewise.
7544 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7546 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7547 (create_all_comp_units): Change objfile parameter to
7549 (create_all_type_units): Likewise.
7550 (process_queue): Add dwarf2_per_objfile parameter.
7551 (read_and_check_comp_unit_head): Likewise.
7552 (lookup_dwo_unit_in_dwp): Likewise.
7553 (get_dwp_file): Likewise.
7554 (process_cu_includes): Likewise.
7555 (struct free_dwo_file_cleanup_data): New struct.
7556 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7557 set_dwarf2_per_objfile.
7558 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7559 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7560 context, adjust calls.
7561 (dw2_instantiate_symtab): Likewise.
7562 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7563 (dw2_get_cu): Likewise.
7564 (create_cu_from_index_list): Change objfile parameter to
7566 (create_cus_from_index_list): Get dwarf2_per_objfile from
7567 context, adjust calls.
7568 (create_cus_from_index): Likewise.
7569 (create_signatured_type_table_from_index): Change objfile
7570 parameter to dwarf2_per_objfile.
7571 (create_signatured_type_table_from_debug_names): Change objfile
7572 parameter to dwarf2_per_objfile.
7573 (create_addrmap_from_index): Likewise.
7574 (create_addrmap_from_aranges): Likewise.
7575 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7576 (dw2_setup): Remove.
7577 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7579 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7580 get_dwarf2_per_objfile.
7581 (dw2_forget_cached_source_info): Likewise.
7582 (dw2_map_symtabs_matching_filename): Likewise.
7583 (struct dw2_symtab_iterator) <index>: Remove.
7584 <dwarf2_per_objfile>: New field.
7585 (dw2_symtab_iter_init): Replace index parameter with
7587 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7588 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7589 (dw2_print_stats): Likewise.
7590 (dw2_dump): Likewise.
7591 (dw2_expand_symtabs_for_function): Likewise.
7592 (dw2_expand_all_symtabs): Likewise.
7593 (dw2_expand_symtabs_with_fullname): Likewise.
7594 (dw2_expand_marked_cus): Replace index and objfile parameters
7595 with dwarf2_per_objfile.
7596 (dw_expand_symtabs_matching_file_matcher): Add
7597 dwarf2_per_objfile parameter and adjust calls.
7598 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7600 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7601 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7603 (create_cus_from_debug_names_list): Replace objfile parameter
7604 with dwarf2_per_objfile and adjust calls.
7605 (create_cus_from_debug_names): Likewise.
7606 (dwarf2_read_debug_names): Likewise.
7607 (mapped_debug_names::namei_to_name): Adjust call.
7608 (dw2_debug_names_iterator::next): Likewise.
7609 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7610 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7611 (dw2_debug_names_dump): Likewise.
7612 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7613 (dw2_debug_names_expand_symtabs_matching): Likewise.
7614 (dwarf2_initialize_objfile): Likewise.
7615 (dwarf2_build_psymtabs): Likewise.
7616 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7618 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7619 (read_and_check_comp_unit_head): Likewise.
7620 (read_abbrev_offset): Likewise.
7621 (create_debug_type_hash_table): Likewise.
7622 (create_debug_types_hash_table): Likewise.
7623 (create_all_type_units): Replace objfile parameter with
7625 (add_type_unit): Add dwarf2_per_objfile parameter.
7626 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7627 with dwarf2_per_objfile.
7628 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7629 (lookup_dwp_signatured_type): Likewise.
7630 (lookup_signatured_type): Likewise.
7631 (read_cutu_die_from_dwo): Likewise.
7632 (init_tu_and_read_dwo_dies): Likewise.
7633 (init_cutu_and_read_dies): Likewise.
7634 (init_cutu_and_read_dies_no_follow): Likewise.
7635 (allocate_type_unit_groups_table): Add objfile parameter.
7636 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7637 (get_type_unit_group): Likewise.
7638 (process_psymtab_comp_unit): Update call.
7639 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7640 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7641 (print_tu_stats): Likewise.
7642 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7644 (build_type_psymtabs): Change objfile parameter to
7646 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7647 passed in void* parameter.
7648 (process_skeletonless_type_units): Change objfile parameter to
7650 (set_partial_user): Likewise.
7651 (dwarf2_build_psymtabs_hard): Likewise.
7652 (read_comp_units_from_section): Likewise.
7653 (create_all_comp_units): Likewise.
7654 (scan_partial_symbols): Update calls.
7655 (add_partial_symbol): Likewise.
7656 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7657 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7658 (process_queue): Add dwarf2_per_objfile parameter.
7659 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7660 (compute_compunit_symtab_includes): Likewise.
7661 (process_cu_includes): Add dwarf2_per_objfile parameter.
7662 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7663 (process_full_type_unit): Likewise.
7664 (process_imported_unit_die): Update call.
7665 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7666 (read_file_scope): Likewise.
7667 (allocate_dwo_file_hash_table): Add objfile parameter.
7668 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7669 (create_cus_hash_table): Likewise.
7670 (create_dwp_hash_table): Likewise.
7671 (create_dwo_unit_in_dwp_v1): Likewise.
7672 (create_dwp_v2_section): Likewise.
7673 (create_dwo_unit_in_dwp_v2): Likewise.
7674 (lookup_dwo_unit_in_dwp): Likewise.
7675 (try_open_dwop_file): Likewise.
7676 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7677 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7678 cleanup to include a reference to dwarf2_per_objfile.
7679 (open_dwp_file): Add dwarf2_per_objfile parameter.
7680 (open_and_init_dwp_file): Likewise.
7681 (get_dwp_file): Likewise.
7682 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7683 (queue_and_load_all_dwo_tus): Update call.
7684 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7686 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7687 (dwarf2_ranges_process): Likewise.
7688 (dwarf2_get_pc_bounds): Likewise.
7689 (mark_common_block_symbol_computed): Likewise.
7690 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7691 (dwarf2_read_abbrevs): Update call.
7692 (read_partial_die): Use dwarf2_per_objfile from cu.
7693 (find_partial_die): Likewise.
7694 (fixup_partial_die): Likewise.
7695 (read_attribute_value): Likewise.
7696 (read_indirect_string_at_offset_from): Add objfile parameter.
7697 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7699 (read_indirect_string_from_dwz): Add objfile parameter.
7700 (read_indirect_string): Add objfile parameter.
7701 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7702 (read_addr_index): Use dwarf2_per_objfile from cu.
7703 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7705 (read_str_index): Use dwarf2_per_objfile from cu.
7706 (get_debug_line_section): Likewise.
7707 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7708 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7709 (new_symbol_full): Use dwarf2_per_objfile from cu.
7710 (build_error_marker_type): Likewise.
7711 (lookup_die_type): Likewise.
7712 (determine_prefix): Likewise.
7713 (follow_die_offset): Likewise.
7714 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7715 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7716 (dwarf2_fetch_die_type_sect_off): Likewise.
7717 (dwarf2_get_die_type): Likewise.
7718 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7719 (get_signatured_type): Likewise.
7720 (get_DW_AT_signature_type): Likewise.
7721 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7722 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7723 (cu_debug_loc_section): Likewise.
7724 (fill_in_loclist_baton): Likewise.
7725 (dwarf2_symbol_mark_computed): Likewise.
7726 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7728 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7730 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7731 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7732 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7733 (set_die_type): Use dwarf2_free_objfile from cu.
7734 (get_die_type_at_offset): Likewise.
7735 (dwarf2_per_objfile_free): Don't assign global variable.
7736 (debug_names) <constructor>: Add dwarf2_per_objfile
7737 parameter, update m_debugstrlookup construction.
7738 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7740 <m_dwarf2_per_objfile>: New field.
7741 <lookup>: Use m_dwarf2_per_objfile.
7742 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7743 (psyms_seen_size): Likewise.
7744 (write_gdbindex): Replace objfile parameter with
7746 (write_debug_names): Likewise.
7747 (write_psymtabs_to_index): Likewise.
7748 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7751 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7753 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7754 <dwarf2_per_objfile>: New field.
7755 (struct dwarf2_per_cu_data) <objfile>: Remove.
7756 <dwarf2_per_objfile>: New field.
7757 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7759 (create_signatured_type_table_from_index): Likewise.
7760 (create_debug_type_hash_table): Likewise.
7761 (fill_in_sig_entry_from_dwo_entry): Likewise.
7762 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7763 (create_type_unit_group): Assign dwarf2_per_objfile instead of
7765 (create_partial_symtab): Access objfile through
7767 (process_psymtab_comp_unit_reader): Likewise.
7768 (read_comp_units_from_section): Likewise.
7769 (scan_partial_symbols): Likewise.
7770 (add_partial_symbol): Likewise.
7771 (add_partial_subprogram): Likewise.
7772 (peek_die_abbrev): Likewise.
7773 (fixup_go_packaging): Likewise.
7774 (process_full_comp_unit): Likewise.
7775 (process_full_type_unit): Likewise.
7776 (process_imported_unit_die): Likewise.
7777 (dwarf2_compute_name): Likewise.
7778 (dwarf2_physname): Likewise.
7779 (read_import_statement): Likewise.
7780 (create_cus_hash_table): Assign dwarf2_physname instead of
7782 (read_func_scope): Access objfile through dwarf2_per_objfile.
7783 (read_lexical_block_scope): Likewise.
7784 (read_call_site_scope): Likewise.
7785 (read_variable): Likewise.
7786 (dwarf2_rnglists_process): Likewise.
7787 (dwarf2_ranges_process): Likewise.
7788 (dwarf2_ranges_read): Likewise.
7789 (dwarf2_record_block_ranges): Likewise.
7790 (dwarf2_add_field): Likewise.
7791 (dwarf2_add_member_fn): Likewise.
7792 (read_structure_type): Likewise.
7793 (process_structure_scope): Likewise.
7794 (read_enumeration_type): Likewise.
7795 (read_array_type): Likewise.
7796 (read_common_block): Likewise.
7797 (read_namespace_type): Likewise.
7798 (read_namespace): Likewise.
7799 (read_module_type): Likewise.
7800 (read_tag_pointer_type): Likewise.
7801 (read_tag_ptr_to_member_type): Likewise.
7802 (read_tag_string_type): Likewise.
7803 (read_subroutine_type): Likewise.
7804 (read_typedef): Likewise.
7805 (read_base_type): Likewise.
7806 (attr_to_dynamic_prop): Likewise.
7807 (read_subrange_type): Likewise.
7808 (read_unspecified_type): Likewise.
7809 (load_partial_dies): Likewise.
7810 (read_partial_die): Likewise.
7811 (find_partial_die): Likewise.
7812 (guess_partial_die_structure_name): Likewise.
7813 (fixup_partial_die): Likewise.
7814 (read_attribute_value): Likewise.
7815 (read_addr_index_from_leb128): Likewise.
7816 (dwarf2_read_addr_index): Likewise.
7817 (dwarf2_string_attr): Likewise.
7818 (lnp_state_machine::check_line_address): Likewise.
7819 (dwarf_decode_lines_1): Likewise.
7820 (dwarf_decode_lines): Likewise.
7821 (dwarf2_start_symtab): Likewise.
7822 (var_decode_location): Likewise.
7823 (new_symbol_full): Likewise.
7824 (dwarf2_const_value_data): Likewise.
7825 (dwarf2_const_value_attr): Likewise.
7826 (dwarf2_const_value): Likewise.
7827 (die_type): Likewise.
7828 (die_containing_type): Likewise.
7829 (lookup_die_type): Likewise.
7830 (guess_full_die_structure_name): Likewise.
7831 (anonymous_struct_prefix): Likewise.
7832 (dwarf2_name): Likewise.
7833 (follow_die_ref_or_sig): Likewise.
7834 (follow_die_offset): Likewise.
7835 (follow_die_ref): Likewise.
7836 (dwarf2_fetch_die_loc_sect_off): Likewise.
7837 (dwarf2_fetch_constant_bytes): Likewise.
7838 (dwarf2_fetch_die_type_sect_off): Likewise.
7839 (dwarf2_get_die_type): Likewise.
7840 (follow_die_sig): Likewise.
7841 (decode_locdesc): Likewise.
7842 (dwarf2_per_cu_objfile): Likewise.
7843 (dwarf2_per_cu_text_offset): Likewise.
7844 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7846 (set_die_type): Access objfile through
7849 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7851 * valprint.c (converted_character_d): Remove typedef.
7852 (DEF_VEC_O (converted_character_d)): Remove.
7853 (count_next_character): Use std::vector.
7854 (print_converted_chars_to_obstack): Likewise.
7855 (generic_printstr): Likewise.
7857 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7859 * xml-support.h (struct gdb_xml_value): Add constructor.
7860 <value>: Change type to unique_xmalloc_ptr.
7861 (gdb_xml_value_s): Remove typedef.
7862 (DEF_VEC_O (gdb_xml_value_s)): Remove.
7863 (gdb_xml_element_start_handler): Change parameter type to
7865 (xml_find_attribute): Likewise.
7866 * xml-support.c (xml_find_attribute): Change parameter type to
7867 std::vector and adjust.
7868 (gdb_xml_values_cleanup): Remove.
7869 (gdb_xml_parser::start_element): Adjust to std::vector.
7870 (xinclude_start_include): Change paraeter type to std::vector
7872 * btrace.c (check_xml_btrace_version): Likewise.
7873 (parse_xml_btrace_block): Likewise.
7874 (parse_xml_btrace_pt_config_cpu): Likewise.
7875 (parse_xml_btrace_pt): Likewise.
7876 (parse_xml_btrace_conf_bts): Likewise.
7877 (parse_xml_btrace_conf_pt): Likewise.
7878 * memory-map.c (memory_map_start_memory): Likewise.
7879 (memory_map_start_property): Likewise.
7880 * osdata.c (osdata_start_osdata): Likewise.
7881 (osdata_start_item): Likewise.
7882 (osdata_start_column): Likewise.
7883 * remote.c (start_thread): Likewise.
7884 * solib-aix.c (library_list_start_library): Likewise.
7885 (library_list_start_list): Likewise.
7886 * solib-svr4.c (library_list_start_library): Likewise.
7887 (svr4_library_list_start_list): Likewise.
7888 * solib-target.c (library_list_start_segment): Likewise.
7889 (library_list_start_section): Likewise.
7890 (library_list_start_library): Likewise.
7891 (library_list_start_list): Likewise.
7892 * tracepoint.c (traceframe_info_start_memory): Likewise.
7893 (traceframe_info_start_tvar): Likewise.
7894 * xml-syscall.c (syscall_start_syscall): Likewise.
7895 * xml-tdesc.c (tdesc_start_target): Likewise.
7896 (tdesc_start_feature): Likewise.
7897 (tdesc_start_reg): Likewise.
7898 (tdesc_start_union): Likewise.
7899 (tdesc_start_struct): Likewise.
7900 (tdesc_start_flags): Likewise.
7901 (tdesc_start_enum): Likewise.
7902 (tdesc_start_field): Likewise.
7903 (tdesc_start_enum_value): Likewise.
7904 (tdesc_start_vector): Likewise.
7906 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7908 * extension.h (struct xmethod_worker) <clone>: Remove.
7909 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7911 (python_xmethod_worker::clone): Remove.
7912 * valops.c (find_overload_match): Use std::move instead of
7915 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7917 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7918 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7919 <free_xmethod_worker_data>: Remove.
7920 <get_matching_xmethod_workers>: Chance VEC to std::vector.
7921 <get_xmethod_arg_types>: Remove.
7922 <get_xmethod_result_type>: Remove.
7923 <invoke_xmethod>: Remove.
7924 * extension.c (new_xmethod_worker): Remove.
7925 (clone_xmethod_worker): Remove.
7926 (get_matching_xmethod_workers): Return void, pass std::vector by
7928 (get_xmethod_arg_types): Rename to...
7929 (xmethod_worker::get_arg_types): ... this, and adjust.
7930 (get_xmethod_result_type): Rename to...
7931 (xmethod_worker::get_result_type): ... this, and adjust.
7932 (invoke_xmethod): Remove.
7933 (free_xmethod_worker): Remove.
7934 (free_xmethod_worker_vec): Remove.
7935 * extension.h (enum ext_lang_rc): Move here from
7937 (struct xmethod_worker): Add constructor and destructor.
7940 <invoke, clone, do_get_result_type, do_get_arg_types>: New
7941 virtual pure methods.
7942 <get_arg_types, get_result_type>: New methods.
7943 (xmethod_worker_ptr): Remove typedef.
7944 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7945 (xmethod_worker_vec): Remove typedef.
7946 (xmethod_worker_up): New typedef.
7947 (invoke_xmethod): Remove.
7948 (clone_xmethod_worker): Remove.
7949 (free_xmethod_worker): Remove.
7950 (free_xmethod_worker_vec): Remove.
7951 (get_xmethod_arg_types): Remove.
7952 (get_xmethod_result_type): Remove.
7953 * valops.c (find_method_list): Use std::vector, don't use
7954 intermediate vector.
7955 (value_find_oload_method_list): Use std::vector.
7956 (find_overload_match): Use std::vector.
7957 (find_oload_champ): Use std::vector.
7958 * value.c (value_free): Use operator delete.
7959 (value_of_xmethod): Rename to...
7960 (value_from_xmethod): ... this. Don't assign
7961 xmethod_worker::value, take rvalue-reference.
7962 (result_type_of_xmethod): Adjust.
7963 (call_xmethod): Adjust.
7964 * value.h: Include extension.h.
7965 (struct xmethod_worker): Don't forward-declare.
7966 (value_of_xmethod): Rename to...
7967 (value_from_xmethod): ... this, take rvalue-reference.
7968 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7969 (struct python_xmethod_worker): ... this, add constructor and
7971 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7972 (gdbpy_free_xmethod_worker_data): Rename to...
7973 (python_xmethod_worker::~python_xmethod_worker): ... this and
7975 (gdbpy_clone_xmethod_worker_data): Rename to...
7976 (python_xmethod_worker::clone): ... this and adjust.
7977 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7979 (gdbpy_get_xmethod_arg_types): Rename to...
7980 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7981 (gdbpy_get_xmethod_result_type): Rename to...
7982 (python_xmethod_worker::do_get_result_type): ... this and
7984 (gdbpy_invoke_xmethod): Rename to...
7985 (python_xmethod_worker::invoke): ... this and adjust.
7986 (new_python_xmethod_worker): Rename to...
7987 (python_xmethod_worker::python_xmethod_worker): ... this and
7989 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7991 (gdbpy_free_xmethod_worker_data): Remove.
7992 (gdbpy_get_matching_xmethod_workers): Use std::vector.
7993 (gdbpy_get_xmethod_arg_types): Remove.
7994 (gdbpy_get_xmethod_result_type): Remove.
7995 (gdbpy_invoke_xmethod): Remove.
7996 * python/python.c (python_extension_ops): Remove obsolete
7999 2018-01-05 Pedro Alves <palves@redhat.com>
8002 * common/signals-state-save-restore.c
8003 (save_original_signals_state): New parameter 'quiet'. Warn if we
8004 find a custom handler preinstalled, instead of internal erroring.
8005 But only warn if !quiet.
8006 * common/signals-state-save-restore.h
8007 (save_original_signals_state): New parameter 'quiet'.
8008 * main.c (captured_main_1): Move save_original_signals_state call
8009 after option handling, and pass QUIET.
8011 2018-01-05 Pedro Alves <palves@redhat.com>
8013 * spu-tdep.c (spu_catch_start): Pass
8014 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8016 2018-01-05 Pedro Alves <palves@redhat.com>
8019 * ada-lang.c (literal_symbol_name_matcher): New function.
8020 (ada_get_symbol_name_matcher): Use it for
8021 symbol_name_match_type::SEARCH_NAME.
8022 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8023 it down instead of assuming symbol_name_match_type::FULL.
8024 * block.h (block_lookup_symbol): New parameter 'match_type'.
8025 * c-valprint.c (print_unpacked_pointer): Use
8026 lookup_symbol_search_name instead of lookup_symbol.
8027 * compile/compile-object-load.c (get_out_value_type): Pass down
8028 symbol_name_match_type::SEARCH_NAME.
8029 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8030 symbol_name_match_type::FULL.
8031 * cp-support.c (cp_get_symbol_name_matcher): Handle
8032 symbol_name_match_type::SEARCH_NAME.
8033 * infrun.c (insert_exception_resume_breakpoint): Use
8034 lookup_symbol_search_name.
8035 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8036 * psymtab.c (maintenance_check_psymtabs): Use
8037 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8038 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8040 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8041 if symbol_name_match_type::SEARCH_NAME.
8042 (lookup_symbol_in_language): Pass down
8043 symbol_name_match_type::FULL.
8044 (lookup_symbol_search_name): New.
8045 (lookup_language_this): Pass down
8046 symbol_name_match_type::SEARCH_NAME.
8047 (lookup_symbol_aux, lookup_local_symbol): New parameter
8048 'match_type'. Pass it down.
8049 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8050 (lookup_symbol_search_name): New declaration.
8051 (lookup_symbol_in_block): New 'match_type' parameter.
8053 2018-01-05 Pedro Alves <palves@redhat.com>
8056 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8058 (ada_lookup_symbol): Reimplement in terms of
8059 ada_lookup_symbol_list, bits factored out from
8060 ada_lookup_encoded_symbol.
8062 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8064 * ada-exp.y (write_object_renaming): When subscripting an array
8065 using a symbol as the index, pass the block in call to
8066 ada_lookup_encoded_symbol when looking that symbol up.
8068 2018-01-05 Jerome Guitton <guitton@adacore.com>
8070 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8073 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8075 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8076 the case where VALUE_LVAL (val0) is not lval_memory.
8078 2018-01-05 Xavier Roirand <roirand@adacore.com>
8080 * ada-valprint.c (print_optional_low_bound): Handle
8081 character-indexed array printing like boolean-indexed array
8084 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8086 * NEWS: Create a new section for the next release branch.
8087 Rename the section of the current branch, now that it has
8090 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8092 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8093 * version.in: Bump version to 8.1.50.DATE-git.
8095 2018-01-03 Xavier Roirand <roirand@adacore.com>
8097 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8099 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8101 (default_exception_support_info) <catch_handlers_sym>: Add field.
8102 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8103 (ada_exception_name_addr_1): Add "catch handlers" handling.
8104 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8106 (create_excep_cond_exprs) <ex>: Add parameter.
8107 (re_set_exception): Update create_excep_cond_exprs call.
8108 (print_it_exception, print_one_exception, print_mention_exception)
8109 (print_recreate_exception): Add "catch handler" handling.
8110 (allocate_location_catch_handlers, re_set_catch_handlers)
8111 (check_status_catch_handlers, print_it_catch_handlers)
8112 (print_one_catch_handlers, print_mention_catch_handlers)
8113 (print_recreate_catch_handlers): New function.
8114 (catch_handlers_breakpoint_ops): New variable.
8115 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8116 Add parameter. Add "catch handler" handling.
8117 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8118 Add "catch handler" handling.
8119 (ada_exception_catchpoint_cond_string): Add "catch handler"
8121 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8123 (catch_ada_handlers_command): New function.
8124 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8125 operations structure.
8126 (_initialize_ada_language): Add "catch handlers" command entry.
8127 * NEWS: Document "catch handlers" feature.
8129 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8131 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8132 account when creating the array type of the slice.
8133 (ada_value_slice): Likewise.
8135 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8137 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8139 (create_array_type_with_stride): Add byte_stride_prop parameter.
8140 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8141 New parameter. Update all callers in this file.
8142 (array_type_has_dynamic_stride): New function.
8143 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8144 of arrays with dynamic byte strides.
8145 * dwarf2read.c (read_array_type): Add support for dynamic
8146 DW_AT_byte_stride attributes.
8148 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8150 * dwarf2read.c (read_unspecified_type): Treat
8151 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8153 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8155 Update copyright year range in all GDB files.
8157 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8159 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8160 and gdb/testsuite/gdb.base/step-line.c.
8162 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8164 * copyright.py (main): Dump the contents of
8165 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8166 even if BY_HAND is empty.
8168 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8170 * top.c (print_gdb_version): Update Copyright year in version
8173 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8175 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8177 For older changes see ChangeLog-2017.
8183 version-control: never