1 2018-06-07 Tom Tromey <tom@tromey.com>
3 * valprint.h (build_address_symbolic): Declare.
4 * printcmd.c (print_address_symbolic): Update.
5 (build_address_symbolic): Change "name" and "filename" to
7 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
9 * defs.h (build_address_symbolic): Remove declaration.
11 2018-06-07 Alan Hayward <alan.hayward@arm.com>
13 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
14 (aarch64_vnv_type): Add function.
15 (aarch64_pseudo_register_name): Add V regs for SVE.
16 (aarch64_pseudo_register_type): Likewise.
17 (aarch64_pseudo_register_reggroup_p): Likewise.
18 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
19 (aarch64_pseudo_read_value): Add V regs for SVE.
20 (aarch64_pseudo_write_2): Use V0 offset for SVE
21 (aarch64_pseudo_write): Add V regs for SVE.
22 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
24 2018-06-05 Tom Tromey <tom@tromey.com>
26 * cli/cli-cmds.c (show_version): Update.
27 * top.c (print_gdb_version): Add "interactive" parameter.
29 * main.c (captured_main_1): Update.
30 * top.h (print_gdb_version): Add "interactive" parameter and a
33 2018-06-05 David Malcolm <dmalcolm@redhat.com>
35 * common/enum-flags.h: Add trailing semicolon to example in
38 2018-06-05 Tom Tromey <tom@tromey.com>
41 * NEWS: Add entry about pager.
42 * utils.c (pagination_disabled_for_command): New global.
43 (prompt_for_continue): Allow "c" response to prompt.
44 (reinitialize_more_filter): Clear
45 pagination_disabled_for_command.
46 (fputs_maybe_filtered): Check pagination_disabled_for_command.
48 2018-06-04 Tom Tromey <tom@tromey.com>
50 * ada-lang.h (ada_lookup_symbol_list): Update.
51 * ada-lang.c (resolve_subexp): Update.
52 (symbols_are_identical_enums): Change type of syms. Remove nsyms
54 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
55 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
56 results parameter to std::vector.
57 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
59 * ada-exp.y (block_lookup): Update.
60 (select_possible_type_sym): Change type of syms. Remove nsyms
62 (write_var_or_type, write_name_assoc): Update.
64 2018-06-04 Joel Brobecker <brobecker@adacore.com>
66 * windows-nat.c (windows_nat_target::xfer_partial): Return
67 TARGET_XFER_E_IO if we need to delegate to the target beneath
70 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
72 * Makefile.in (config.status): Add configure.nat as a
75 2018-06-04 Tom Tromey <tom@tromey.com>
77 * cp-name-parser.y (cpname_state): Add method declarations.
78 (HANDLE_QUAL): Update.
79 (cpname_state::d_grab, cpname_state::fill_comp)
80 (cpname_state::make_operator, cpname_state::make_dtor)
81 (cpname_state::make_builtin_type, cpname_state::make_name)
82 (cpname_state::d_qualify, cpname_state::d_int_type)
83 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
84 (%union): Move earlier.
86 2018-06-04 Alan Hayward <alan.hayward@arm.com>
88 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
90 2018-06-04 Alan Hayward <alan.hayward@arm.com>
92 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
93 (aarch64_pseudo_write_1): Likewise.
94 (aarch64_pseudo_read_value): Use helper.
95 (aarch64_pseudo_write): Likewise.
97 2018-06-04 Pedro Alves <palves@redhat.com>
99 * darwin-nat.c (darwin_ops): Delete.
100 (darwin_attach_pid): Use get_native_target.
102 2018-06-04 Alan Hayward <alan.hayward@arm.com>
104 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
105 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
107 2018-06-04 Alan Hayward <alan.hayward@arm.com>
109 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
110 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
111 (aarch64_gdbarch_init): Check for SVE.
112 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
114 2018-06-04 Alan Hayward <alan.hayward@arm.com>
116 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
117 * aarch64-tdep.h (aarch64_read_description): Likewise.
118 * arch/aarch64.c (aarch64_create_target_description): Likewise.
119 * arch/aarch64.h (aarch64_create_target_description): Likewise.
120 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
121 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
122 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
124 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
126 * value.c (value_fetch_lazy_bitfield): New.
127 (value_fetch_lazy_memory): New.
128 (value_fetch_lazy_register): New.
129 (value_fetch_lazy): Factor out to smaller functions.
131 2018-06-01 Tom Tromey <tom@tromey.com>
133 * cp-name-parser.y (backslashable, represented): Now const.
135 2018-06-01 Tom Tromey <tom@tromey.com>
137 * cp-name-parser.y: Include parser-defs.h.
138 (parser_fprintf): Remove declaration.
140 2018-06-01 Tom Tromey <tom@tromey.com>
142 * cp-name-parser.y: Use %pure-parser, %lex-param, and
144 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
145 (global_result): Remove globals.
146 (struct cpname_state): New.
147 (yyparse): Don't declare.
148 (yylex, yyerror): Move declarations after %union.
149 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
150 (make_name): Add state parameter.
152 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
154 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
156 (yylex): Add lvalp, state parameters.
157 (yyerror): Add state parameter.
158 (cp_demangled_name_to_comp): Update.
160 2018-06-01 Tom Tromey <tom@tromey.com>
162 * cp-name-parser.y (parser_fprintf): Declare.
163 (GDB_YY_REMAP_PREFIX): Define.
164 Include yy-remap.h. Don't redefine yy* identifiers.
166 2018-06-01 Tom Tromey <tom@tromey.com>
168 * python/py-type.c (typy_legacy_template_argument): Update.
169 * cp-support.h (cp_demangled_name_to_comp): Update.
170 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
171 parameter to be a "std::string *".
174 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
176 * ada-lex.l: Include "diagnostics.h" instead of
177 "common/diagnostics.h".
178 * unittests/environ-selftests.c: Likewise.
179 * common/diagnostics.h: Moved to ../include.
181 2018-06-01 Joel Brobecker <brobecker@adacore.com>
183 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
184 to language_mode_manual while calling breakpoint_re_set_one.
186 2018-06-01 Tom Tromey <tom@tromey.com>
188 * valops.c (value_cast_structs, destructor_name_p): Update.
189 * symtab.c (gdb_mangle_name): Update.
190 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
192 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
193 (pascal_object_print_value_fields, pascal_object_print_value):
195 * p-typeprint.c (pascal_type_print_derivation_info): Update.
196 * linespec.c (find_methods): Update.
197 * gdbtypes.h (type_name_no_tag): Remove.
198 (type_name_or_error): Rename from type_name_no_tag_or_error.
199 * gdbtypes.c (type_name_no_tag): Remove.
200 (type_name_or_error): Rename from type_name_no_tag_or_error.
201 (lookup_struct_elt_type, check_typedef): Update.
202 * expprint.c (print_subexp_standard): Update.
203 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
204 * d-namespace.c (d_lookup_nested_symbol): Update.
205 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
206 (cp_print_class_member): Update.
207 * cp-namespace.c (cp_lookup_nested_symbol): Update.
208 * completer.c (add_struct_fields): Update.
209 * c-typeprint.c (cp_type_print_derivation_info)
210 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
212 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
213 (ada_prefer_type, ada_is_exception_sym): Update.
215 2018-06-01 Tom Tromey <tom@tromey.com>
217 * valops.c (enum_constant_from_type, value_namespace_elt)
218 (value_maybe_namespace_elt): Update.
219 * valarith.c (find_size_for_pointer_math): Update.
220 * target-descriptions.c (make_gdb_type): Update.
221 * symmisc.c (print_symbol): Update.
222 * stabsread.c (define_symbol, read_type)
223 (complain_about_struct_wipeout, add_undefined_type)
224 (cleanup_undefined_types_1): Update.
225 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
226 (rust_range_type_p, val_print_struct, rust_print_struct_def)
227 (rust_internal_print_type, rust_composite_type)
228 (rust_evaluate_funcall, rust_evaluate_subexp)
229 (rust_inclusive_range_type_p): Update.
230 * python/py-type.c (typy_get_tag): Update.
231 * p-typeprint.c (pascal_type_print_base): Update.
232 * mdebugread.c (parse_symbol, parse_type): Update.
233 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
235 * guile/scm-type.c (gdbscm_type_tag): Update.
236 * go-lang.c (sixg_string_p): Update.
237 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
239 * gdbtypes.h (struct main_type) <tag_name>: Remove.
240 (TYPE_TAG_NAME): Remove.
241 * gdbtypes.c (type_name_no_tag): Simplify.
242 (check_typedef, check_types_equal, recursive_dump_type)
243 (copy_type_recursive, arch_composite_type): Update.
244 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
245 in summary mode when needed.
246 * eval.c (evaluate_funcall): Update.
247 * dwarf2read.c (fixup_go_packaging, read_structure_type)
248 (process_structure_scope, read_enumeration_type)
249 (read_namespace_type, read_module_type, determine_prefix): Update.
250 * cp-support.c (inspect_type): Update.
251 * coffread.c (process_coff_symbol, decode_base_type): Update.
252 * c-varobj.c (c_is_path_expr_parent): Update.
253 * c-typeprint.c (c_type_print_base_struct_union): Update.
254 (c_type_print_base_1): Update. Print struct/class/union/enum in
255 summary when using C language.
256 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
257 (gen_maybe_namespace_elt): Update.
258 * ada-lang.c (ada_type_name): Simplify.
259 (empty_record, ada_template_to_fixed_record_type_1)
260 (template_to_static_fixed_type)
261 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
263 2018-06-01 Tom Tromey <tom@tromey.com>
265 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
267 * c-typeprint.c (c_print_type_1): Add "language" parameter.
268 (c_print_type): Update.
269 (c_print_type): New overload.
270 (c_type_print_varspec_prefix, c_type_print_args)
271 (c_type_print_varspec_suffix, c_print_type_no_offsets)
272 (c_type_print_base_struct_union, c_type_print_base_1)
273 (cp_type_print_method_args): Add "language" parameter.
274 (c_type_print_base): Update.
275 * c-lang.h (c_print_type): Add new overload.
277 2018-06-01 Tom Tromey <tom@tromey.com>
279 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
280 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
282 2018-06-01 Alan Hayward <alan.hayward@arm.com>
284 * aarch64-tdep.c (aarch64_sve_register_names): New const
286 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
287 (AARCH64_SVE_Z_REGS_NUM): New define.
288 (AARCH64_SVE_P_REGS_NUM): Likewise.
289 (AARCH64_SVE_NUM_REGS): Likewise.
291 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
293 * nat/linux-ptrace.h [__alpha__]
294 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
297 2018-05-31 Maciej W. Rozycki <macro@mips.com>
299 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
300 the endianness selected.
301 * NEWS: Document `set endian auto' mode operation update.
303 2018-05-31 Alan Hayward <alan.hayward@arm.com>
305 * Makefile.in: Add new header.
306 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
307 (sve_vl_from_vg): Likewise.
308 (sve_vq_from_vl): Likewise.
309 (sve_vl_from_vq): Likewise.
310 (sve_vq_from_vg): Likewise.
311 (sve_vg_from_vq): Likewise.
312 * configure.nat: Add new c file.
313 * nat/aarch64-sve-linux-ptrace.c: New file.
314 * nat/aarch64-sve-linux-ptrace.h: New file.
316 2018-05-31 Alan Hayward <alan.hayward@arm.com>
318 * aarch64-linux-nat.c (aarch64_linux_read_description):
320 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
322 * aarch64-tdep.c (tdesc_aarch64_list): Add.
323 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
324 (aarch64_gdbarch_init): Add parmeter zero.
325 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
326 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
327 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
329 * doc/gdb.texinfo: Describe SVE feature
330 * features/aarch64-sve.c: New file.
332 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
335 * gdbarch.sh (significant_addr_bit): Default to zero when
336 not set by target architecture.
337 * gdbarch.c: Re-generated.
338 * utils.c (address_significant): Update.
340 2018-05-30 Joel Brobecker <brobecker@adacore.com>
342 * stack.c (func_command): Remove trailing newline in call to error.
344 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
346 * regcache.h (regcache_raw_collect): Remove, update callers to
347 use regcache::raw_collect.
348 * regcache.c (regcache_raw_collect): Remove.
350 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
352 * regcache.h (regcache_raw_supply): Remove, update callers to
353 use detached_regcache::raw_supply.
354 * regcache.c (regcache_raw_supply): Remove.
356 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
358 * regcache.h (regcache_cooked_write_part): Remove, update
359 callers to use regcache::cooked_write_part.
360 * regcache.c (regcache_cooked_write_part): Remove.
362 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
364 * regcache.h (regcache_cooked_read_part): Remove, update callers
365 to use readable_regcache::cooked_read_part.
366 * regcache.c (regcache_cooked_read_part): Remove.
368 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
370 * regcache.h (regcache_cooked_read_value): Remove, update
371 callers to use readable_regcache::cooked_read_value.
372 * regcache.c (regcache_cooked_read_value): Remove.
374 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
376 * regcache.h (regcache_cooked_write): Remove, update callers to
377 use regcache::cooked_write.
378 * regcache.c (regcache_cooked_write): Remove.
380 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
382 * regcache.h (regcache_invalidate): Remove, update callers to
383 use detached_regcache::invalidate instead.
384 * regcache.c (regcache_invalidate): Remove.
386 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
388 * regcache.h (regcache_raw_write_part): Remove, update callers
389 to use regcache::raw_write_part instead.
390 * regcache.c (regcache_raw_write_part): Remove.
392 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
394 * regcache.h (regcache_raw_read_part): Remove, update callers to
395 use readable_regcache::raw_read_part instead.
396 * regcache.c (regcache_raw_read_part): Remove.
398 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
400 * regcache.h (regcache_cooked_read): Remove, update callers to
401 use readable_regcache::cooked_read instead.
402 * regcache.c (regcache_cooked_read): Remove.
404 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
406 * regcache.h (regcache_raw_write): Remove, update callers to use
407 regcache::raw_write instead.
408 * regcache.c (regcache_raw_write): Remove.
410 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
412 * regcache.h (regcache_raw_read): Remove, update callers to use
413 readable_regcache::raw_read instead.
414 * regcache.c (regcache_raw_read): Remove.
416 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
418 * regcache.h (regcache_raw_update): Remove, update callers to
419 use readable_regcache::raw_update instead.
420 * regcache.c (regcache_raw_update): Remove.
422 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
424 * regcache.h (regcache_register_status): Remove, update callers
425 to use reg_buffer::get_register_status directly instead.
426 * regcache.c (regcache_register_status): Remove.
428 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
430 * regcache.h (regcache_get_ptid): Remove, update all callers to
431 call regcache::ptid instead.
432 * regcache.c (regcache_get_ptid): Remove.
434 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
436 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
438 2018-05-30 Pedro Alves <palves@redhat.com>
440 * common/common-exceptions.h (exception_rethrow): Use
443 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
445 * breakpoint.c (print_solib_event, check_status_catch_solib):
446 Remove struct keyword in range-based for loops.
447 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
448 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
450 * linespec.c (find_superclass_methods, search_minsyms_for_name):
452 * symfile.c (addr_info_make_relative): Likewise.
453 * thread.c (value_in_thread_stack_temporaries): Likewise.
455 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
457 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
458 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
459 * coff-pe-read.c (add_pe_forwarded_sym): Replace
460 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
461 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
462 * jit.c (jit_breakpoint_re_set_internal): Likewise.
463 * printcmd.c (info_address_command): Likewise.
465 2018-05-29 Tom Tromey <tom@tromey.com>
467 * windows-nat.c (handle_exception): Update fall-through comment.
469 2018-05-29 Tom Tromey <tom@tromey.com>
471 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
472 (struct program_space) <added_solibs>: Now a std::vector.
473 * breakpoint.c (print_solib_event): Update.
474 (check_status_catch_solib): Update.
475 * progspace.c (clear_program_space_solib_cache): Update.
476 * solib.c (update_solib_list): Update.
478 2018-05-29 Tom Tromey <tom@tromey.com>
480 * python/py-type.c (typy_richcompare): Update.
481 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
482 * gdbtypes.h (types_deeply_equal): Return bool.
483 (types_equal): Likewise.
484 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
486 (check_types_equal): Change worklist to std::vector. Return
488 (struct type_equality_entry): Add constructor.
489 (compare_maybe_null_strings): Return bool.
490 (check_types_worklist): Return bool. Change worklist to
492 (types_deeply_equal): Use std::vector.
493 (types_equal): Return bool.
494 (compare_maybe_null_strings): Simplify.
496 2018-05-29 Tom Tromey <tom@tromey.com>
498 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
500 2018-05-29 Tom Tromey <tom@tromey.com>
502 * objc-lang.h: Don't include cp-support.h.
503 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
506 2018-05-27 Tom Tromey <tom@tromey.com>
508 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
510 2018-05-25 Tom Tromey <tom@tromey.com>
512 * value.c (value::location): Initialize.
514 2018-05-25 Tom Tromey <tom@tromey.com>
516 * dbxread.c (init_bincl_list): Remove.
517 (bincl_list): Now a std::vector.
518 (bincls_allocated, next_bincl): Remove.
519 (free_bincl_list, do_free_bincl_list_cleanup)
520 (make_cleanup_free_bincl_list): Remove.
521 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
523 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
524 (struct header_file_location): Add constructor.
525 (add_bincl_to_list): Remove.
527 2018-05-25 Tom Tromey <tom@tromey.com>
529 * tui/tui.c (tui_enable): Update.
530 * mi/mi-interp.c (mi_interp::init): Update.
531 * interps.h (class interp) <name>: New method.
532 <m_name>: Rename from name.
533 (~scoped_restore_interp): Update.
534 * interps.c (interp::interp): Update.
535 (interp_add, interp_set, interp_lookup_existing)
536 (current_interp_named_p): Update.
538 2018-05-25 Tom Tromey <tom@tromey.com>
540 * interps.c (interp_name): Remove.
541 * mi/mi-interp.c (mi_interp::init): Update.
542 * interps.h (interp_name): Remove.
543 (~scoped_restore_interp): Update.
544 * tui/tui.c (tui_enable): Update.
546 2018-05-25 Tom Tromey <tom@tromey.com>
548 * utils.c (fputs_maybe_filtered): Update.
549 * linespec.c (decode_line_full): Update.
550 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
551 (mi_print_breakpoint_for_event, mi_solib_loaded)
552 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
553 (mi_user_selected_context_changed): Update.
554 * mi/mi-main.c (mi_execute_command): Update.
555 * cli/cli-script.c (execute_control_command): Update.
556 * python/python.c (execute_gdb_command): Update.
557 * solib.c (info_sharedlibrary_command): Update.
558 * interps.c (interp_ui_out): Remove.
559 * interps.h (interp_ui_out): Remove.
561 2018-05-25 Tom Tromey <tom@tromey.com>
563 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
564 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
565 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
567 2018-05-25 Tom Tromey <tom@tromey.com>
569 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
570 * interps.c (interp_exec): Use scoped_restore.
572 2018-05-25 Tom Tromey <tom@tromey.com>
574 * remote.c (remote_target::remote_file_get): Use
576 (remote_target::remote_file_put): Likewise.
578 2018-05-25 Tom Tromey <tom@tromey.com>
580 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
582 (get_pe_section_index, add_pe_exported_sym): Update.
583 (read_pe_exported_syms): Use gdb::def_vector.
585 2018-05-25 Tom Tromey <tom@tromey.com>
587 * frame.c (remove_prev_frame): Remove.
588 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
590 2018-05-25 Maciej W. Rozycki <macro@mips.com>
592 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
594 * mips-linux-nat.c (supply_fpregset): Always call
595 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
596 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
597 `mips_fill_fpregset'.
598 * mips-linux-tdep.c (mips_supply_fpregset)
599 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
600 (mips_fill_fpregset_wrapper): Remove functions.
601 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
602 (mips_linux_fpregset): Remove variable.
603 (mips_linux_iterate_over_regset_sections): Use
604 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
605 (mips_linux_o32_sigframe_init): Remove comment.
607 2018-05-25 Pedro Alves <palves@redhat.com>
609 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
610 (struct readahead_cache, struct packet_reg, struct
611 remote_arch_state, class remote_state): Move higher up in the
613 (remote_target::m_remote_state): Now an object instead of a pointer.
614 (remote_target::get_remote_state): Adjust.
616 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
618 * stack.c (select_and_print_frame): Delete.
619 (struct function_bounds): Move struct within function.
620 (func_command): Most content moved into new function
621 find_frame_for_function, use new function, print result, add
623 (find_frame_for_function): New function, now returns a result.
625 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
627 * stack.c (iterate_over_block_arg_vars): Fix comment.
628 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
630 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
634 (scoped_restore_selected_frame::scoped_restore_selected_frame):
636 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
638 * frame.h (class scoped_restore_selected_frame): New class.
639 * stack.c (print_frame_local_vars): Remove catching and rethrowing
640 of any exception, use scoped_restore_selected_frame to restore the
643 2018-05-24 Pedro Alves <palves@redhat.com>
645 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
648 2018-05-23 Tom Tromey <tom@tromey.com>
650 * complaints.c (struct complaints): Remove.
651 (symfile_complaint_book): Remove.
652 (series): New global.
653 (complaint_internal): Update.
654 (clear_complaints): Update.
656 2018-05-23 Tom Tromey <tom@tromey.com>
658 * complaints.c (counters): New global.
659 (struct complain): Remove.
660 (struct complaints) <root>: Remove.
661 (complaint_sentinel): Remove.
662 (symfile_complaint_book): Update.
663 (find_complaint) Remove.
664 (complaint_internal, clear_complaints): Update.
666 2018-05-23 Tom Tromey <tom@tromey.com>
668 * complaints.c (struct complain) <file, line>: Remove.
669 (find_complaint): Remove file, line parameters.
670 (complaint_internal): Update.
672 2018-05-23 Tom Tromey <tom@tromey.com>
674 * complaints.c (vcomplaint): Remove.
675 (complaint_internal) Merge in contents of vcomplaint.
677 2018-05-23 Tom Tromey <tom@tromey.com>
679 * complaints.c (struct complaints) <explanation>: Remove.
680 (symfile_explanations): Remove.
681 (symfile_complaint_book): Update.
682 (vcomplaint): Update.
683 (struct explanation): Remove.
685 2018-05-23 Tom Tromey <tom@tromey.com>
687 * complaints.c (symfile_complaints): Remove.
688 (complaint_internal): Remove "complaints" parameter.
689 (clear_complaints, vcomplaint): Remove "c" parameter.
690 (get_complaints): Remove.
691 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
692 (dwarf2_debug_line_missing_file_complaint)
693 (dwarf2_debug_line_missing_end_sequence_complaint)
694 (dwarf2_complex_location_expr_complaint)
695 (dwarf2_const_value_length_mismatch_complaint)
696 (dwarf2_section_buffer_overflow_complaint)
697 (dwarf2_macro_malformed_definition_complaint)
698 (dwarf2_invalid_attrib_class_complaint)
699 (create_addrmap_from_index, dw2_symtab_iter_next)
700 (dw2_expand_marked_cus)
701 (dw2_debug_names_iterator::find_vec_in_debug_names)
702 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
703 (create_debug_type_hash_table, init_cutu_and_read_dies)
704 (partial_die_parent_scope, add_partial_enumeration)
705 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
706 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
707 (read_import_statement, read_file_scope, create_dwo_cu_reader)
708 (create_cus_hash_table, create_dwp_hash_table)
709 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
710 (dwarf2_rnglists_process, dwarf2_ranges_process)
711 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
712 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
713 (handle_struct_member_die, process_structure_scope)
714 (read_array_type, read_common_block, read_module_type)
715 (read_tag_pointer_type, read_typedef, read_base_type)
716 (read_subrange_type, load_partial_dies, partial_die_info::read)
717 (partial_die_info::read, partial_die_info::read)
718 (partial_die_info::read, read_checked_initial_length_and_offset)
719 (dwarf2_string_attr, read_formatted_entries)
720 (dwarf_decode_line_header)
721 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
722 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
723 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
724 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
725 (get_signatured_type, get_DW_AT_signature_type)
726 (decode_locdesc, file_file_name, consume_improper_spaces)
727 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
728 (dwarf_decode_macro_bytes, dwarf_decode_macros)
729 (dwarf2_symbol_mark_computed, set_die_type)
730 (read_attribute_value): Update.
731 * stap-probe.c (handle_stap_probe, get_stap_base_address):
733 * dbxread.c (unknown_symtype_complaint)
734 (lbrac_mismatch_complaint, repeated_header_complaint)
735 (set_namestring, function_outside_compilation_unit_complaint)
736 (read_dbx_symtab, process_one_symbol): Update.
737 * gdbtypes.c (stub_noname_complaint): Update.
738 * windows-nat.c (handle_unload_dll): Update.
739 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
740 (decode_base_type): Update.
741 * xcoffread.c (bf_notfound_complaint, ef_complaint)
742 (eb_complaint, record_include_begin, record_include_end)
743 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
744 (process_xcoff_symbol, read_symbol)
745 (function_outside_compilation_unit_complaint)
746 (scan_xcoff_symtab): Update.
747 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
748 * buildsym.c (finish_block_internal, make_blockvector)
749 (end_symtab_get_static_block, augment_type_symtab): Update.
750 * dtrace-probe.c (dtrace_process_dof)
751 (dtrace_static_probe_ops::get_probes): Update.
752 * complaints.h (struct complaint): Don't declare.
753 (symfile_complaints): Remove.
754 (complaint_internal): Remove "complaints" parameter.
755 (complaint): Likewise.
756 (clear_complaints): Likewise.
757 * symfile.c (syms_from_objfile_1, finish_new_objfile)
758 (reread_symbols): Update.
759 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
760 (dwarf2_frame_cache, decode_frame_entry): Update.
761 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
762 * objc-lang.c (lookup_objc_class, lookup_child_selector)
763 (info_selectors_command): Update.
764 * macrotab.c (macro_include, check_for_redefinition)
765 (macro_undef): Update.
766 * objfiles.c (filter_overlapping_sections): Update.
767 * stabsread.c (invalid_cpp_abbrev_complaint)
768 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
769 (define_symbol, error_type, read_type, rs6000_builtin_type)
770 (stabs_method_name_from_physname, read_member_functions)
771 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
772 (attach_fields_to_type, complain_about_struct_wipeout)
773 (read_range_type, read_args, common_block_start)
774 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
776 * mdebugread.c (index_complaint, unknown_ext_complaint)
777 (basic_type_complaint, bad_tag_guess_complaint)
778 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
779 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
780 (parse_procedure, parse_lines)
781 (function_outside_compilation_unit_complaint)
782 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
783 (bad_tag_guess_complaint, reg_value_complaint): Update.
784 * cp-support.c (demangled_name_complaint): Update.
785 * macroscope.c (sal_macro_scope): Update.
786 * dwarf-index-write.c (class debug_names): Update.
788 2018-05-23 Tom Tromey <tom@tromey.com>
790 * complaints.c (clear_complaints): Remove "noisy" parameter.
791 * complaints.h (clear_complaints): Update.
792 * symfile.c (syms_from_objfile_1, finish_new_objfile)
793 (reread_symbols): Update.
795 2018-05-23 Tom Tromey <tom@tromey.com>
797 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
799 (vcomplaint, clear_complaints): Update.
800 (symfile_explanations): Remove some messages.
802 2018-05-23 Tom Tromey <tom@tromey.com>
804 * complaints.c (internal_complaint): Remove.
805 * complaints.h (internal_complaint): Remove.
807 2018-05-22 Maciej W. Rozycki <macro@mips.com>
809 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
811 2018-05-22 Pedro Alves <palves@redhat.com>
813 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
814 (remote_fileio_badfd, remote_fileio_return_errno)
815 (remote_fileio_return_success, remote_fileio_func_open)
816 (remote_fileio_func_open, remote_fileio_func_close)
817 (remote_fileio_func_read, remote_fileio_func_write)
818 (remote_fileio_func_lseek, remote_fileio_func_rename)
819 (remote_fileio_func_unlink, remote_fileio_func_stat)
820 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
821 (remote_fileio_func_isatty, remote_fileio_func_system): Add
822 remote_target parameter.
823 (remote_fio_func_map) <func>: Add remote_target parameter.
824 (do_remote_fileio_request, remote_fileio_request):
825 * remote-fileio.h (remote_fileio_request):
826 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
827 remote_target parameter.
828 (remote_notif_process, handle_notification): Adjust to pass down
830 (remote_notif_state_allocate): Add remote_target parameter. Save
832 * remote-notif.h (struct remote_target): Forward declare.
833 (struct notif_client) <parse, ack, can_get_pending_events>: Add
834 remote_target parameter.
835 (struct remote_notif_state) <remote>: New field.
836 (remote_notif_ack, remote_notif_parse): Add remote_target
838 (remote_notif_state_allocate, remote_notif_state_allocate): Add
839 remote_target parameter.
840 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
841 (threads_listing_context, rmt_thread_action, protocol_feature)
842 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
843 (packet_result, struct threads_listing_context, remote_state):
844 Move definitions and declarations higher up.
845 (remote_target) <~remote_target>: Declare.
846 (remote_download_command_source, remote_file_put, remote_file_get)
847 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
848 (remote_hostio_pread_vFile, remote_hostio_send_command)
849 (remote_hostio_set_filesystem, remote_hostio_open)
850 (remote_hostio_close, remote_hostio_unlink, remote_state)
851 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
852 (get_memory_write_packet_size, get_memory_read_packet_size)
853 (append_pending_thread_resumptions, remote_detach_1)
854 (append_resumption, remote_resume_with_vcont)
855 (add_current_inferior_and_thread, wait_ns, wait_as)
856 (process_stop_reply, remote_notice_new_inferior)
857 (process_initial_stop_replies, remote_add_thread)
858 (btrace_sync_conf, remote_btrace_maybe_reopen)
859 (remove_new_fork_children, kill_new_fork_children)
860 (discard_pending_stop_replies, stop_reply_queue_length)
861 (check_pending_events_prevent_wildcard_vcont)
862 (discard_pending_stop_replies_in_queue, stop_reply)
863 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
864 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
865 (remote_interrupt_as, remote_interrupt_ns)
866 (remote_get_noisy_reply, remote_query_attached)
867 (remote_add_inferior, remote_current_thread, get_current_thread)
868 (set_thread, set_general_thread, set_continue_thread)
869 (set_general_process, write_ptid)
870 (remote_unpack_thread_info_response, remote_get_threadinfo)
871 (parse_threadlist_response, remote_get_threadlist)
872 (remote_threadlist_iterator, remote_get_threads_with_ql)
873 (remote_get_threads_with_qxfer)
874 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
875 (get_offsets, remote_check_symbols, remote_supported_packet)
876 (remote_query_supported, remote_packet_size)
877 (remote_serial_quit_handler, remote_detach_pid)
878 (remote_vcont_probe, remote_resume_with_hc)
879 (send_interrupt_sequence, interrupt_query)
880 (remote_notif_get_pending_events, fetch_register_using_p)
881 (send_g_packet, process_g_packet, fetch_registers_using_g)
882 (store_register_using_P, store_registers_using_G)
883 (set_remote_traceframe, check_binary_download)
884 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
885 (remote_xfer_live_readonly_partial, remote_read_bytes)
886 (remote_send_printf, remote_flash_write, readchar)
887 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
888 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
889 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
890 (extended_remote_disable_randomization, extended_remote_run)
891 (send_environment_packet, extended_remote_environment_support)
892 (extended_remote_set_inferior_cwd, remote_write_qxfer)
893 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
894 (packet_command): Now methods of ...
895 (remote_target): ... this class.
896 (m_remote_state) <remote_target>: New field.
897 (struct remote_state) <stop_reply_queue,
898 remote_async_inferior_event_token, wait_forever_enabled_p>: New
900 (remote_state::remote_state): Allocate stop_reply_queue.
901 (remote_state): Delete global.
902 (get_remote_state_raw): Delete.
903 (remote_target::get_remote_state): Allocate m_remote_state on
905 (get_current_remote_target): New.
906 (remote_ops, extended_remote_ops): Delete.
907 (wait_forever_enabled_p, remote_async_inferior_event_token):
908 Delete, moved to struct remote_state.
909 (remote_target::close): Delete self. Destruction bits split to
911 (remote_target::~remote_target): ... this.
912 (show_memory_packet_size): Adjust to use
913 get_current_remote_target.
914 (struct protocol_feature) <func>: Add remote_target parameter.
915 All callers adjusted.
916 (curr_quit_handler_target): New.
917 (remote_serial_quit_handler): Reimplement.
918 (remote_target::open_1): Adjust to use get_current_remote_target.
919 Heap-allocate remote_target/extended_remote_target instances.
920 (vcont_builder::vcont_builder): Add remote_target parameter, and
921 save it in m_remote. All callers adjusted.
922 (vcont_builder::m_remote): New field.
923 (vcont_builder::restart, vcont_builder::flush)
924 (vcont_builder::push_action): Use it.
925 (remote_target::commit_resume): Use it.
926 (struct queue_iter_param) <remote>: New field.
927 (remote_target::remove_new_fork_children): Fill in 'remote' field.
928 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
929 (check_pending_event_prevents_wildcard_vcont_callback)
930 (remote_target::check_pending_events_prevent_wildcard_vcont)
931 (remote_target::discard_pending_stop_replies)
932 (remote_target::discard_pending_stop_replies_in_queue)
933 (remote_target::remote_notif_remove_queued_reply): Fill in
935 (remote_notif_get_pending_events): New.
936 (remote_target::readchar, remote_target::remote_serial_write):
937 Save/restore curr_quit_handler_target.
939 (kill_new_fork_children): Fill in 'remote' field.
940 (packet_command): Use get_current_remote_target, defer to
941 remote_target method of same name.
942 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
943 parameter, and save it in m_remote. All callers adjusted.
944 (scoped_remote_fd::release): Use m_remote.
945 (scoped_remote_fd::m_remote): New field.
946 (remote_file_put, remote_file_get, remote_file_delete): Use
947 get_current_remote_target, defer to remote_target method of same
949 (remote_btrace_reset): Add remote_state paremeter. Update all
951 (remote_async_inferior_event_handler). Pass down 'data'.
952 (remote_new_objfile): Use get_current_remote_target.
953 (remote_target::vcont_r_supported): New.
954 (set_range_stepping): Use get_current_remote_target and
955 remote_target::vcont_r_supported.
956 (_initialize_remote): Don't allocate 'remote_state' and
957 'stop_reply_queue' globals.
958 * remote.h (struct remote_target): Forward declare.
959 (getpkt, putpkt, remote_notif_get_pending_events): Add
960 'remote_target' parameter.
962 2018-05-22 Pedro Alves <palves@redhat.com>
964 * remote.c (vcont_builder): Now a class. Make all data members
966 (vcont_builder) <vcont_builder, restart, flush, push_action>:
968 (vcont_builder_restart): Rename to ...
969 (vcont_builder::restart): ... this.
970 (vcont_builder_flush): Rename to ...
971 (vcont_builder::flush): ... this.
972 (vcont_builder_push_action): Rename to ...
973 (vcont_builder::push_action): ... this.
974 (remote_target::commit_resume): Adjust.
976 2018-05-22 Pedro Alves <palves@redhat.com>
978 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
979 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
980 (get_fixed_memory_packet_size): New.
981 (get_memory_packet_size): Use it.
982 (set_memory_packet_size): Don't override the config size with
983 DEFAULT_MAX_MEMORY_PACKET_SIZE.
984 (show_memory_packet_size): Use get_fixed_memory_packet_size.
985 Don't refer to get_memory_packet_size if not connected to a remote
986 target. Show "(default)" if configured size is 0.
988 2018-05-22 Pedro Alves <palves@redhat.com>
990 * remote.c (remote_target::mourn_inferior): Move
991 discard_pending_stop_replies call here from ...
992 (_initialize_remote): ... here.
994 2018-05-22 Pedro Alves <palves@redhat.com>
996 * remote.c (compare_section_command): Remove set_general_process
999 2018-05-22 Pedro Alves <palves@redhat.com>
1001 * remote.c (struct packet_reg, struct remote_arch_state):
1002 Move higher up in the file.
1003 (remote_state) <m_arch_states>: Store remote_arch_state values
1004 instead of remote_arch_state pointers.
1005 (remote_state::get_remote_arch_state): Adjust.
1007 2018-05-22 Pedro Alves <palves@redhat.com>
1009 * remote.c: Include <unordered_map>.
1010 (remote_state): Now a class.
1011 (remote_state) <get_remote_arch_state>: Declare method.
1012 <get_remote_arch_state>: New field.
1013 (remote_arch_state) <remote_arch_state>: Declare ctor.
1014 <regs>: Now a unique_ptr.
1015 (remote_gdbarch_data_handle): Delete.
1016 (get_remote_arch_state): Delete.
1017 (remote_state::get_remote_arch_state): New.
1018 (get_remote_state): Adjust to call remote_state's
1019 get_remote_arch_state method.
1020 (init_remote_state): Delete, bits factored out to ...
1021 (remote_arch_state::remote_arch_state): ... this new method.
1022 (get_remote_packet_size, get_memory_packet_size)
1023 (process_g_packet, remote_target::fetch_registers)
1024 (remote_target::prepare_to_store, store_registers_using_G)
1025 (remote_target::store_registers, remote_target::get_trace_status):
1026 Adjust to call remote_state's method.
1027 (_initialize_remote): Remove reference to
1028 remote_gdbarch_data_handle.
1030 2018-05-22 Pedro Alves <palves@redhat.com>
1032 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
1033 pread>: New method declarations.
1034 (remote_target::open_1): Adjust.
1035 (readahead_cache_invalidate): Rename to ...
1036 (readahead_cache::invalidate): ... this, and adjust to be a class
1038 (readahead_cache_invalidate_fd): Rename to ...
1039 (readahead_cache::invalidate_fd): ... this, and adjust to be a
1041 (remote_hostio_pwrite): Adjust.
1042 (remote_hostio_pread_from_cache): Rename to ...
1043 (readahead_cache::pread): ... this, and adjust to be a class
1045 (remote_hostio_close): Adjust.
1047 2018-05-22 Pedro Alves <palves@redhat.com>
1049 * remote.c (remote_hostio_close_cleanup): Delete.
1050 (class scoped_remote_fd): New.
1051 (remote_file_put, remote_file_get): Use it.
1053 2018-05-22 Pedro Alves <palves@redhat.com>
1055 (struct vCont_action_support): Use bool and initialize all fields.
1056 (struct readahead_cache): Initialize all fields.
1057 (remote_state): Use bool and initialize all fields.
1058 (remote_state::remote_state, remote_state::~remote_state): New.
1059 (new_remote_state): Delete.
1060 (_initialize_remote): Use new to allocate remote_state.
1062 2018-05-22 Pedro Alves <palves@redhat.com>
1066 * c-exp.y: Include "c-support.h".
1067 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
1068 of tolower. Use c_ident_is_alpha to scan names.
1069 * c-lang.c: Include "c-support.h".
1070 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1071 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1072 * c-support.h: New file, with bits factored out from ...
1073 * cp-name-parser.y: ... this file.
1074 Include "c-support.h".
1075 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1076 c-support.h and renamed.
1077 (symbol_end, yylex): Adjust.
1079 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1081 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1082 parameter type to CORE_ADDR.
1083 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1084 parameter type in declaration to CORE_ADDR.
1085 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1086 target_auxv_search to get AT_HWCAP and use the result to get the
1088 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1089 to CORE_ADDR. Remove the cast of the return value to unsigned
1090 long. Fix error predicate of target_auxv_search.
1091 (ppc_linux_nat_target::read_description): Change the type of the
1092 hwcap variable to CORE_ADDR.
1094 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1096 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1097 if the size of fpscr is larger than 32 bits.
1099 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1101 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1102 (ppc32_linux_vsxregmap): New global.
1103 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1104 regcache_supply_regset, and regcache_collect_regset.
1105 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1106 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1107 (fetch_vsx_register, store_vsx_register): Remove.
1108 (fetch_vsx_registers): Add regno parameter. Get regset using
1109 ppc_linux_vsxregset. Use regset to supply registers.
1110 (store_vsx_registers): Add regno parameter. Get regset using
1111 ppc_linux_vsxregset. Use regset to collect registers.
1112 (fetch_register): Call fetch_vsx_registers instead of
1114 (store_register): Call store_vsx_registers instead of
1116 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1117 new regno parameter.
1118 (store_ppc_registers): Call store_vsx_registers with -1 for the
1119 new regno parameter.
1120 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1121 (ppc_collect_vsxregset): Remove.
1123 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1125 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1127 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1128 for vector register offset fields.
1129 (ppc64_fbsd_reg_offsets): Likewise.
1130 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1131 to vector register offset fields.
1132 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1133 to vector register offset fields.
1134 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1135 vector register offset fields.
1136 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1137 initializers for vector register offset fields.
1138 (rs6000_aix64_reg_offsets): Likewise.
1139 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1140 (ppc_supply_vrregset): Remove.
1141 (ppc_collect_vrregset): Remove.
1142 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1143 (ppc_linux_vrregset) : New function.
1144 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1145 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1146 (ppc32_linux_vrregset): Remove.
1147 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1148 and use result instead of ppc32_linux_vrregset.
1149 (ppc32_linux_reg_offsets): Remove initializers for vector register
1151 (ppc64_linux_reg_offsets): Likewise.
1152 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1153 * ppc-linux-nat.c: Include regset.h.
1154 (gdb_vrregset_t): Adjust comment to account for little-endian
1156 (supply_vrregset, fill_vrregset): Remove.
1157 (fetch_altivec_register, store_altivec_register): Remove.
1158 (fetch_altivec_registers): Add regno parameter. Get regset using
1159 ppc_linux_vrregset. Use regset to supply registers.
1160 (store_altivec_registers): Add regno parameter. Get regset using
1161 ppc_linux_vrregset. Use regset to collect registers.
1162 (fetch_register): Call fetch_altivec_registers instead of
1163 fetch_altivec_register.
1164 (store_register): Call store_altivec_registers instead of
1165 store_altivec_register.
1166 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1167 the new regno parameter.
1168 (store_ppc_registers): Call store_altivec_registers with -1 for
1169 the new regno parameter.
1171 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1173 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1174 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1175 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1176 (gdb_vrregset_t): Change array type size to
1177 PPC_LINUX_SIZEOF_VRREGSET.
1178 (gdb_vsxregset_t): Change array type size to
1179 PPC_LINUX_SIZEOF_VSXREGSET.
1180 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1181 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1182 PPC_LINUX_SIZEOF_VSXREGSET.
1184 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1186 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1187 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1189 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1190 ppc_linux_target_wordsize with tid.
1191 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1193 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1194 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1195 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1196 tid parameter. Remove static specifier.
1197 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1198 (ppc_linux_target_wordsize): New declaration.
1200 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1202 * arch/ppc-linux-common.c: New file.
1203 * arch/ppc-linux-common.h: New file.
1204 * arch/ppc-linux-tdesc.h: New file.
1205 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1206 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1207 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1208 arch/ppc-linux-tdesc.h.
1209 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1210 arch/ppc-linux-tdesc.h.
1211 (ppc_linux_nat_target::read_description): Remove target
1212 description matching code. Fill a ppc_linux_features struct and
1213 call ppc_linux_match_description with it. Move comment about ISA
1214 2.05 to ppc-linux-common.c.
1215 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1216 arch/ppc-linux-tdesc.h.
1217 (ppc_linux_core_read_description): Remove target description
1218 matching code. Fill a ppc_linux_features struct and call
1219 ppc_linux_match_description with it.
1220 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1221 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1222 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1223 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1224 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1225 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1226 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1227 (tdesc_powerpc_e500l): Remove.
1229 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1231 * ada-lang.c (catch_assert_command): Pass empty string instead
1232 of NULL for excep_string argument.
1234 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1236 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1237 the width of the requested register exceeds the width of the
1240 2018-05-21 Tom Tromey <tom@tromey.com>
1242 * printcmd.c (output_command): Remove.
1243 (output_command_const): Rename to output_command.
1244 * valprint.h (output_command): Rename from output_command_const.
1245 * tracepoint.c (trace_dump_actions): Call output_command.
1247 2018-05-21 Tom Tromey <tom@tromey.com>
1249 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1250 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1251 * ada-lang.h (create_ada_exception_catchpoint): Update.
1252 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1254 (create_excep_cond_exprs, ~ada_catchpoint)
1255 (should_stop_exception, print_one_exception)
1256 (print_mention_exception, print_recreate_exception): Update.
1257 (ada_get_next_arg): Remove.
1258 (catch_ada_exception_command_split): Use std::string. Change type
1259 of "excep_string", "cond_string".
1260 (catch_ada_exception_command): Update.
1261 (create_ada_exception_catchpoint): Change type of excep_string.
1262 (ada_exception_sal): Remove excep_string parameter.
1263 (~ada_catchpoint): Remove.
1265 2018-05-21 Tom Tromey <tom@tromey.com>
1267 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1270 2018-05-21 Tom Tromey <tom@tromey.com>
1272 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1273 Return unique_xmalloc_ptr.
1274 (print_it_exception): Update.
1276 2018-05-21 Tom Tromey <tom@tromey.com>
1278 * tracepoint.c (trace_dump_actions): Use std::string.
1280 2018-05-21 Tom Tromey <tom@tromey.com>
1282 * symfile.c (reread_symbols): Use std::string for original_name.
1284 2018-05-21 Tom Tromey <tom@tromey.com>
1286 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1287 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1290 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1292 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1294 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1295 * objfiles.c (get_objfile_bfd_data): Allocate
1296 objfile_per_bfd_storage with obstack_new when allocating on
1299 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1301 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1303 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1304 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1305 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1306 (add_pending): Likewise.
1307 (parse_symbol): Likewise.
1308 (parse_partial_symbols): Likewise.
1309 (psymtab_to_symtab_1): Likewise.
1310 (new_psymtab): Likewise.
1311 (elfmdebug_build_psymtabs): Likewise.
1312 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1313 * objfiles.c (get_objfile_bfd_data): Likewise.
1314 (objfile_register_static_link): Likewise.
1315 * psymtab.c (allocate_psymtab): Likewise.
1316 * stabsread.c (read_member_functions): Likewise.
1317 * xcoffread.c (xcoff_end_psymtab): Likewise.
1319 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1321 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1322 compiler supports std::is_trivially_constructible.
1323 * common/poison.h: Include obstack.h.
1324 (IsMallocable): Define to is_trivially_constructible if the
1325 compiler supports it, define to true_type otherwise.
1329 (XOBNEWVEC): Redefine.
1330 * gdb_obstack.h (obstack_zalloc): New.
1331 (OBSTACK_ZALLOC): Redefine.
1332 (obstack_calloc): New.
1333 (OBSTACK_CALLOC): Redefine.
1335 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1336 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1338 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1339 obstack_calloc/obstack_zalloc.
1340 (gdbarch_obstack_zalloc): Remove.
1341 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1343 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1345 * stack.c (backtrace_command_1): Remove useless variable int i.
1347 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1349 * stack.c (print_frame_info): Fix comment.
1351 2018-05-18 Tom Tromey <tom@tromey.com>
1353 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1354 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1355 (~dwarf2_per_objfile): Update
1356 (dwarf2_get_dwz_file): Use new.
1357 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1360 2018-05-18 Tom Tromey <tom@tromey.com>
1362 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1364 * dwarf2read.c (struct dwp_file): Add constructor and
1366 (open_and_init_dwp_file): Return a unique_ptr.
1367 (dwarf2_per_objfile, create_dwp_hash_table)
1368 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1369 (lookup_dwo_unit_in_dwp): Update.
1370 (open_and_init_dwp_file, get_dwp_file): Update.
1372 2018-05-18 Tom Tromey <tom@tromey.com>
1374 * dwarf2read.c (dwarf2_per_objfile): Update.
1375 (struct mapped_index): Add initializers.
1376 (dwarf2_read_index): Use new.
1377 (dw2_symtab_iter_init): Update.
1378 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1381 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1383 * dwarf2read.c (mapped_index) <total_size>: Remove.
1385 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1387 * unittests/format_pieces-selftests.c (test_format_specifier):
1390 2018-05-18 Tom Tromey <tom@tromey.com>
1392 * c-typeprint.c (maybe_print_hole): New function.
1393 (c_print_type_struct_field_offset): Update.
1394 (c_type_print_base_struct_union): Call maybe_print_hole.
1396 2018-05-17 Keith Seitz <keiths@redhat.com>
1398 * breakpoint.c (build_bpstat_chain): New function, moved from
1400 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1401 If no stop chain is passed, call build_bpstat_chain to build it.
1402 * breakpoint.h (build_bpstat_chain): Declare.
1403 (bpstat_stop_status): Move documentation here from breakpoint.c.
1404 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1405 build the stop chain and pass it to skip_inline_frames.
1406 Pass this stop chain to bpstat_stop_status.
1407 * inline-frame.c: Include breakpoint.h.
1408 (stopped_by_user_bp_inline_frame): New function.
1409 (skip_inline_frames): Add parameter `stop_chain'.
1410 Move documention to inline-frame.h.
1411 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1412 whether the frame should be elided.
1413 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1414 Add moved documentation and update for new parameter.
1416 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1419 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1420 unittests/format_pieces-selftests.c.
1421 * common/format.h (format_piece) <operator==>: New.
1422 (format_pieces) <operator[]>: Remove.
1423 * common/format.c (format_pieces::format_pieces): Handle \e.
1424 * unittests/format_pieces-selftests.c: New.
1426 2018-05-17 Tom Tromey <tom@tromey.com>
1429 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1430 (dw2_instantiate_symtab): Add skip_partial parameter.
1431 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1432 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1433 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1434 (dw2_expand_symtabs_matching_one)
1435 (dw2_find_pc_sect_compunit_symtab)
1436 (dw2_debug_names_lookup_symbol)
1437 (dw2_debug_names_expand_symtabs_for_function): Update.
1438 (init_cutu_and_read_dies): Add skip_partial parameter.
1439 (process_psymtab_comp_unit, build_type_psymtabs_1)
1440 (process_skeletonless_type_unit, load_partial_comp_unit)
1441 (psymtab_to_symtab_1): Update.
1442 (load_full_comp_unit): Add skip_partial parameter.
1443 (process_imported_unit_die, dwarf2_read_addr_index)
1444 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1445 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1446 (read_signatured_type): Update.
1448 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1450 * value.c (release_value): Remove unused variable.
1451 (record_latest_value): Likewise.
1452 (access_value_history): Likewise.
1453 (preserve_values): Likewise.
1455 2018-05-17 Tom Tromey <tom@tromey.com>
1457 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1460 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1463 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1464 Also handle registers whose width is not a multiple of
1466 (linux_nat_trad_target::store_register): Likewise.
1468 2018-05-16 Tom Tromey <tom@tromey.com>
1470 * gdbcore.h (core_bfd): Redefine.
1471 * corelow.c (core_target::close): Update.
1472 (core_target_open): Update.
1473 * progspace.h (struct program_space) <cbfd>: Now a
1476 2018-05-16 Tom Tromey <tom@tromey.com>
1479 * symfile-add-flags.h (enum symfile_add_flags)
1480 <SYMFILE_NOT_FILENAME>: New constant.
1481 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1482 objfile name from BFD.
1483 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1484 * minidebug.c (find_separate_debug_file_in_section): Put
1485 ".gnu_debugdata" into BFD's file name.
1487 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1489 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1492 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1495 * aarch64-tdep.c (aarch64_analyze_prologue,
1496 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1497 Indicate not interested in errors.
1499 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1501 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1502 Supply the MIPS_ZERO_REGNUM register.
1504 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1506 * mips-tdep.c (mask_address_var): Make variable static.
1508 2018-05-14 Tom Tromey <tom@tromey.com>
1510 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1512 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1514 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1515 FXSAVE_ADDR for the mxcsr register.
1517 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1519 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1521 2018-05-11 Pedro Alves <palves@redhat.com>
1523 * corelow.c (core_target) <core_target>: No longer inline.
1524 Initialize m_core_gdbarch, m_core_vec and build the section table
1526 <~core_target>: New.
1527 <core_gdbarch, get_core_register_section>: New methods.
1528 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1529 factored out from ...
1530 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1532 (sniff_core_bfd): Add gdbarch parameter.
1533 (core_close): Delete, merged into ...
1534 (core_target::close): ... here. Delete self.
1535 (core_close_cleanup): Delete.
1536 (core_target_open): Allocate a core_target on the heap. Use a
1537 unique_ptr instead of a cleanup. Bits moved into the core_target
1538 ctor. Adjust to use core_target methods instead of globals.
1539 (get_core_register_section): Rename to ...
1540 (core_target::get_core_register_section): ... this and adjust.
1541 (struct get_core_registers_cb_data): New.
1542 (get_core_registers_cb): Use it. Use bool.
1543 (core_target::fetch_registers, core_target::files_info)
1544 (core_target::xfer_partial, core_target::read_description)
1545 (core_target::pid_to, core_target::thread_name): Adjust to
1546 reference class fields instead of globals.
1547 * target.h (struct target_ops_deleter, target_ops_up): New.
1549 2018-05-11 Pedro Alves <palves@redhat.com>
1551 * corefile.c (core_file_command): Move to corelow.c.
1552 * corelow.c (the_core_target): Delete.
1553 (core_file_command): Moved from corefile.c. Check exec_bfd
1554 instead of the_core_target. Use target_detach instead of calling
1555 into the_core_target directly.
1556 (maybe_say_no_core_file_now): New.
1557 (core_target::detach): Use it.
1558 (_initialize_corelow): Remove references to the_core_target.
1559 * gdbcore.h (the_core_target): Delete.
1561 2018-05-11 Tom Tromey <tromey@redhat.com>
1562 Pedro Alves <palves@redhat.com>
1564 * corefile.c (core_bfd): Remove.
1565 * gdbcore.h (core_bfd): Now a macro.
1566 * progspace.h (struct program_space) <cbfd>: New field.
1568 2018-05-11 Tom Tromey <tom@tromey.com>
1570 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1573 2018-05-10 Tom Tromey <tom@tromey.com>
1575 * configure: Rebuild.
1576 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1578 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1581 * regformats/regdat.sh: Adjust script, following the addition
1582 of the new expedite_regs parameter to init_target_desc.
1584 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1587 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1588 set_gdbarch_significant_addr_bit.
1589 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1590 set_gdbarch_significant_addr_bit.
1591 * utils.c (address_significant): Update to sign extend addr.
1593 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1595 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1596 (xtensa_linux_init_abi): Limit tdep->num_regs by
1597 tdep->num_nopriv_regs.
1598 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1599 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1602 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1604 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1606 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1608 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1609 (I387_MXCSR_INIT_VAL): New constant.
1610 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1611 buffer if it was supplied by the inferior.
1612 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1613 (i387_xsave_get_clear_bv): New function.
1614 (i387_supply_xsave): Only read x87 control registers from the
1615 xsave buffer if the feature is enabled, and the state will have
1616 been written, otherwise, provide a suitable default.
1617 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1618 including x87 control registers. Update control registers if they
1619 have changed from the default value, and mark features as enabled
1621 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1623 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1625 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1627 2018-05-07 Tom Tromey <tom@tromey.com>
1629 * configure: Rebuild.
1630 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1632 2018-05-07 Tom Tromey <tom@tromey.com>
1635 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1636 bit. Use correct value for VDIV.
1638 2018-05-04 Tom Tromey <tom@tromey.com>
1640 * configure: Rebuild.
1641 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1643 2018-05-04 Tom Tromey <tom@tromey.com>
1645 * linux-record.c (record_linux_system_call) <case
1646 RECORD_SYS_RECVFROM>: Add "break".
1648 2018-05-04 Tom Tromey <tom@tromey.com>
1650 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1651 Add missing "break".
1652 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1653 Add missing "break".
1655 2018-05-04 Tom Tromey <tom@tromey.com>
1657 * rs6000-tdep.c (ppc_process_record_op4)
1658 (ppc_process_record_op63): Add fall-through comment.
1660 2018-05-04 Tom Tromey <tom@tromey.com>
1662 * i386-tdep.c (i386_process_record): Add fall-through comment.
1664 2018-05-04 Tom Tromey <tom@tromey.com>
1666 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1669 2018-05-04 Tom Tromey <tom@tromey.com>
1671 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1672 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1673 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1675 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1677 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1680 2018-05-04 Tom Tromey <tom@tromey.com>
1682 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1684 2018-05-04 Tom Tromey <tom@tromey.com>
1686 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1687 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1688 * symfile.c (section_is_mapped): Fix fall-through comment.
1689 * stabsread.c (define_symbol, read_member_functions): Fix
1690 fall-through comment.
1691 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1693 * remote.c (remote_wait_as): Fix fall-through comment.
1694 * p-exp.y (yylex): Fix fall-through comment.
1695 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1697 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1698 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1699 * jv-exp.y (yylex): Fix fall-through comment.
1700 * go-exp.y (lex_one_token): Fix fall-through comment.
1701 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1702 fall-through comment.
1703 * f-exp.y (yylex): Fix fall-through comment.
1704 * dwarf2read.c (process_die): Fix fall-through comments.
1705 * dbxread.c (process_one_symbol): Fix fall-through comment.
1706 * d-exp.y (lex_one_token): Fix fall-through comment.
1707 * cp-name-parser.y (yylex): Fix fall-through comment.
1708 * coffread.c (coff_symtab_read): Fix fall-through comment.
1709 * c-exp.y (lex_one_token): Fix fall-through comment.
1710 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1712 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1715 2018-05-04 Tom Tromey <tom@tromey.com>
1718 * NEWS: Mention gdb.execute change.
1719 * gdbcmd.h (execute_control_command): Don't declare.
1720 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1721 execute_control_commands, execute_control_commands_to_string.
1722 * cli/cli-script.h (execute_control_commands)
1723 (execute_control_commands_to_string): Declare.
1724 (execute_control_command): Add from_tty parameter.
1725 * cli/cli-script.c (execute_control_commands)
1726 (execute_control_commands_to_string): New functions.
1727 (execute_user_command): Use execute_control_commands.
1728 (execute_control_command_1): Add "from_tty" parameter. Update.
1729 (execute_control_command): Likewise.
1731 2018-05-04 Tom Tromey <tom@tromey.com>
1734 * NEWS: Mention that breakpoint commands are writable.
1735 * python/py-breakpoint.c (bppy_set_commands): New function.
1736 (breakpoint_object_getset) <"commands">: Use it.
1738 2018-05-04 Tom Tromey <tom@tromey.com>
1740 * tracepoint.c (actions_command): Update.
1741 * mi/mi-cmd-break.c (mi_command_line_array)
1742 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1743 (mi_read_next_line): Remove.
1744 (mi_cmd_break_commands): Update.
1745 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1747 * cli/cli-script.c (get_command_line): Update.
1748 (process_next_line): Use function_view. Constify.
1749 (recurse_read_control_structure, read_command_lines)
1750 (read_command_lines_1): Change argument types to function_view.
1751 (do_define_command, document_command): Update.
1752 * breakpoint.h (check_tracepoint_command): Don't declare.
1753 * breakpoint.c (check_tracepoint_command): Remove.
1754 (commands_command_1, create_tracepoint_from_upload): Update.
1756 2018-05-04 Tom Tromey <tom@tromey.com>
1759 * cli/cli-script.h (enum command_control_type) <define_control>:
1761 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1762 (build_command_line, execute_control_command_1)
1763 (process_next_line): Likewise.
1764 (do_define_command): New function, extracted from define_command.
1765 (define_command): Use it.
1767 2018-05-04 Tom Tromey <tom@tromey.com>
1769 * tracepoint.c (actions_command): Update.
1770 * cli/cli-script.h (read_command_lines): Update.
1771 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1772 (MAX_TMPBUF): Remove define.
1773 (define_command): Use string_printf.
1774 (document_command): Likewise.
1775 * breakpoint.c (commands_command_1): Update.
1777 2018-05-04 Tom Tromey <tom@tromey.com>
1779 * top.c (execute_command): Update.
1780 * cli/cli-script.h (print_command_lines): Now varargs.
1781 * cli/cli-script.c (print_command_lines): Now varargs.
1782 (execute_control_command_1) <case while_control, case if_control>:
1785 2018-05-04 Tom Tromey <tom@tromey.com>
1787 * tracepoint.c (all_tracepoint_actions): Rename from
1788 all_tracepoint_actions_and_cleanup. Change return type.
1789 (actions_command, encode_actions_1, encode_actions)
1790 (trace_dump_actions, tdump_command): Update.
1791 * remote.c (remote_download_command_source): Update.
1792 * python/python.c (gdbpy_eval_from_control_command)
1793 (python_command, python_interactive_command): Update.
1794 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1795 * guile/guile.c (guile_command)
1796 (gdbscm_eval_from_control_command, guile_command): Update.
1797 * compile/compile.c (compile_code_command)
1798 (compile_print_command, compile_to_object): Update.
1799 * cli/cli-script.h (struct command_lines_deleter): New.
1800 (counted_command_line): New typedef.
1801 (struct command_line): Add constructor, destructor.
1802 <body_list>: Remove.
1803 <body_list_0, body_list_1>: New members.
1804 (command_line_up): Remove typedef.
1805 (read_command_lines, read_command_lines_1, get_command_line):
1807 (copy_command_lines): Don't declare.
1808 * cli/cli-script.c (build_command_line): Use "new".
1809 (get_command_line): Return counted_command_line.
1810 (print_command_lines, execute_user_command)
1811 (execute_control_command_1, while_command, if_command): Update.
1812 (realloc_body_list): Remove.
1813 (process_next_line, recurse_read_control_structure): Update.
1814 (read_command_lines, read_command_lines_1): Return counted_command_line.
1815 (free_command_lines): Use "delete".
1816 (copy_command_lines): Remove.
1817 (define_command, document_command, show_user_1): Update.
1818 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1819 a counted_command_line.
1820 * breakpoint.h (counted_command_line): Remove typedef.
1821 (breakpoint_set_commands): Update.
1822 * breakpoint.c (check_no_tracepoint_commands)
1823 (validate_commands_for_breakpoint): Update.
1824 (breakpoint_set_commands): Change commands to be a
1825 counted_command_line.
1826 (commands_command_1, update_dprintf_command_list)
1827 (create_tracepoint_from_upload): Update.
1829 2018-05-04 Tom Tromey <tom@tromey.com>
1831 * cli/cli-decode.h (cmd_list_element): New constructor.
1832 (~cmd_list_element): New destructor.
1833 (struct cmd_list_element): Add initializers.
1834 * cli/cli-decode.c (do_add_cmd): Use "new".
1835 (delete_cmd): Use "delete".
1837 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1838 Pedro Alves <palves@redhat.com>
1840 PR breakpoints/19806 and support for PR external/20207.
1841 * NEWS: Mention Aarch64 watchpoint improvements.
1842 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1843 watchpoints and PR external/20207 watchpoints.
1844 * nat/aarch64-linux-hw-point.c
1845 (kernel_supports_any_contiguous_range): New.
1846 (aarch64_watchpoint_offset): New.
1847 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1848 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1849 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1850 (aarch64_align_watchpoint): New parameters aligned_offset_p and
1851 next_addr_orig_p. Support PR external/20207 watchpoints.
1852 (aarch64_downgrade_regs): New.
1853 (aarch64_dr_state_insert_one_point): New parameters offset and
1855 (aarch64_dr_state_remove_one_point): Likewise.
1856 (aarch64_handle_breakpoint): Update caller.
1857 (aarch64_handle_aligned_watchpoint): Likewise.
1858 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1860 (aarch64_linux_set_debug_regs): Remove const from state. Call
1861 aarch64_downgrade_regs.
1862 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1863 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1864 (DR_CONTROL_MASK): ... this.
1865 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1866 (unsigned int aarch64_watchpoint_offset): New prototype.
1867 (aarch64_linux_set_debug_regs): Remove const from state.
1868 * utils.c (align_up, align_down): Move to ...
1869 * common/common-utils.c (align_up, align_down): ... here.
1870 * utils.h (align_up, align_down): Move to ...
1871 * common/common-utils.h (align_up, align_down): ... here.
1873 2018-05-04 Joel Brobecker <brobecker@adacore.com>
1875 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1876 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1877 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1878 Re-implement to match the ABI as summarized in GCC's
1879 gcc/config/sparc/sparc.c. All callers updated.
1880 (sparc32_store_arguments): Remove assertion.
1882 2018-05-04 Tom Tromey <tom@tromey.com>
1884 * printcmd.c: Don't include tui.h.
1885 (decode_format): Use skip_spaces.
1887 2018-05-04 Tom Tromey <tom@tromey.com>
1890 * printcmd.c (last_count): New global.
1891 (x_command): Use saved count when repeating.
1893 2018-05-04 Tom Tromey <tom@tromey.com>
1895 * nto-procfs.c (do_closedir_cleanup): Remove.
1896 (procfs_pidlist): Use gdb_dir_up.
1897 * procfs.c (do_closedir_cleanup): Remove.
1898 (proc_update_threads): Use gdb_dir_up.
1899 * common/filestuff.h (struct gdb_dir_deleter): New.
1900 (gdb_dir_up): New typedef.
1902 2018-05-04 Tom Tromey <tom@tromey.com>
1904 * ada-lang.c (print_mention_exception): Use std::string.
1906 2018-05-04 Tom Tromey <tom@tromey.com>
1908 * ada-lang.c (create_excep_cond_exprs): Update.
1909 (ada_exception_catchpoint_cond_string): Use std::string.
1911 2018-05-04 Tom Tromey <tom@tromey.com>
1913 * ada-lang.c (xget_renaming_scope): Return std::string.
1914 (old_renaming_is_invisible): Update.
1916 2018-05-04 Tom Tromey <tom@tromey.com>
1918 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1919 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1921 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
1923 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1925 2018-05-04 Tom Tromey <tom@tromey.com>
1927 * remote.c (remote_query_supported_append): Change type.
1928 (remote_check_symbols): Update.
1930 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
1933 * configure.ac: Prepend libpython.
1934 * python/python-config.py: Likewise.
1935 * configure: Regenerate.
1937 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
1939 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1941 2018-05-03 Pedro Alves <palves@redhat.com>
1944 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1945 override. Write 'true' instead of '1'.
1946 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1949 2018-05-02 Pedro Alves <palves@redhat.com>
1951 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1952 add_inf_child_target.
1953 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1954 add_inf_child_target.
1955 * aix-thread.c (aix_thread_target_info): New.
1956 (aix_thread_target) <shortname, longname, doc>: Delete.
1958 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1959 add_inf_child_target.
1960 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1961 add_inf_child_target.
1962 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1963 add_inf_child_target.
1964 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1965 add_inf_child_target.
1966 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1967 add_inf_child_target.
1968 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1969 add_inf_child_target.
1970 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1971 add_inf_child_target.
1972 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1973 add_inf_child_target.
1974 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1975 add_inf_child_target.
1976 * bfd-target.c (target_bfd_target_info): New.
1977 (target_bfd) <shortname, longname, doc>: Delete.
1979 * bsd-kvm.c (bsd_kvm_target_info): New.
1980 (bsd_kvm_target) <shortname, longname, doc>: Delete.
1982 (bsd_kvm_target::open): Rename to ...
1983 (bsd_kvm_target_open): ... this. Adjust.
1984 * bsd-uthread.c (bsd_uthread_target_info): New.
1985 (bsd_uthread_target) <shortname, longname, doc>: Delete.
1987 * corefile.c (core_file_command): Adjust.
1988 * corelow.c (core_target_info): New.
1989 (core_target) <shortname, longname, doc>: Delete.
1991 (core_target::open): Rename to ...
1992 (core_target_open): ... this. Adjust.
1993 * ctf.c (ctf_target_info): New.
1994 (ctf_target) <shortname, longname, doc>: Delete.
1996 (ctf_target::open): Rename to ...
1997 (ctf_target_open): ... this.
1998 (_initialize_ctf): Adjust.
1999 * exec.c (exec_target_info): New.
2000 (exec_target) <shortname, longname, doc>: Delete.
2002 (exec_target::open): Rename to ...
2003 (exec_target_open): ... this.
2004 * gdbcore.h (core_target_open): Declare.
2005 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2006 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2007 add_inf_child_target.
2008 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2009 add_inf_child_target.
2010 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2011 add_inf_child_target.
2012 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2013 add_inf_child_target.
2014 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2015 add_inf_child_target.
2016 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2017 add_inf_child_target.
2018 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2019 add_inf_child_target.
2020 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
2021 add_inf_child_target.
2022 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
2023 add_inf_child_target.
2024 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
2025 add_inf_child_target.
2026 * inf-child.c (inf_child_target_info): New.
2027 (inf_child_target::info): New.
2028 (inf_child_open_target): Remove 'target' parameter. Use
2029 get_native_target instead.
2030 (inf_child_target::open): Delete.
2031 (add_inf_child_target): New.
2032 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
2035 (add_inf_child_target): Declare.
2036 (inf_child_open_target): Declare.
2037 * linux-thread-db.c (thread_db_target_info): New.
2038 (thread_db_target) <shortname, longname, doc>: Delete.
2040 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
2041 add_inf_child_target.
2042 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
2043 add_inf_child_target.
2044 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
2045 add_inf_child_target.
2046 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
2047 add_inf_child_target.
2048 * make-target-delegates (print_class): Adjust.
2049 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
2050 add_inf_child_target.
2051 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
2052 add_inf_child_target.
2053 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
2054 add_inf_child_target.
2055 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
2056 add_inf_child_target.
2057 * nto-procfs.c (nto_native_target_info): New.
2058 (nto_procfs_target_native) <shortname, longname, doc>:
2061 (nto_procfs_target_info): New.
2062 (nto_procfs_target_procfs) <shortname, longname, doc>:
2065 (init_procfs_targets): Adjust.
2066 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
2067 add_inf_child_target.
2068 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2069 add_inf_child_target.
2070 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2071 add_inf_child_target.
2072 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2073 add_inf_child_target.
2074 * ravenscar-thread.c (ravenscar_target_info): New.
2075 (ravenscar_thread_target) <shortname, longname, doc>:
2078 * record-btrace.c (record_btrace_target_info):
2079 (record_btrace_target) <shortname, longname, doc>: Delete.
2081 (record_btrace_target::open): Rename to ...
2082 (record_btrace_target_open): ... this. Adjust.
2083 * record-full.c (record_longname, record_doc): New.
2084 (record_full_base_target) <shortname, longname, doc>: Delete.
2086 (record_full_target_info): New.
2087 (record_full_target): <shortname>: Delete.
2089 (record_full_core_open_1, record_full_open_1): Update comments.
2090 (record_full_base_target::open): Rename to ...
2091 (record_full_open): ... this.
2092 (cmd_record_full_restore): Update.
2093 (_initialize_record_full): Update.
2094 * remote-sim.c (remote_sim_target_info): New.
2095 (gdbsim_target) <shortname, longname, doc>: Delete.
2097 (gdbsim_target::open): Rename to ...
2098 (gdbsim_target_open): ... this.
2099 (_initialize_remote_sim): Adjust.
2100 * remote.c (remote_doc): New.
2101 (remote_target_info): New.
2102 (remote_target) <shortname, longname, doc>: Delete.
2104 (extended_remote_target_info): New.
2105 (extended_remote_target) <shortname, longname, doc>: Delete.
2107 (remote_target::open_1): Make static. Adjust.
2108 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2109 * s390-linux-nat.c (_initialize_s390_nat): Use
2110 add_inf_child_target.
2111 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2112 add_inf_child_target.
2113 * sol-thread.c (thread_db_target_info): New.
2114 (sol_thread_target) <shortname, longname, doc>: Delete.
2116 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2117 add_inf_child_target.
2118 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2119 add_inf_child_target.
2120 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2121 add_inf_child_target.
2122 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2123 add_inf_child_target.
2124 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2125 add_inf_child_target.
2126 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2127 add_inf_child_target.
2128 * spu-linux-nat.c (_initialize_spu_nat): Use
2129 add_inf_child_target.
2130 * spu-multiarch.c (spu_multiarch_target_info): New.
2131 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2133 * target-delegates.c: Regenerate.
2134 * target.c: Include <unordered_map>.
2135 (target_ops_p): Delete.
2136 (DEF_VEC_P(target_ops_p)): Delete.
2137 (target_factories): New.
2138 (test_target_info): New.
2139 (test_target_ops::info): New.
2140 (open_target): Adjust to use target_factories.
2141 (add_target_with_completer): Rename to ...
2142 (add_target): ... this. Change prototype. Register target_info
2143 and open callback in target_factories. Register target_info in
2144 command context instead of target_ops.
2145 (add_target): Delete old implementation.
2146 (add_deprecated_target_alias): Change prototype. Adjust.
2147 (the_native_target): New.
2148 (set_native_target, get_native_target): New.
2149 (find_default_run_target): Use the_native_target.
2150 (find_attach_target, find_run_target): Simplify.
2151 (target_ops::open): Delete.
2152 (dummy_target_info): New.
2153 (dummy_target::shortname, dummy_target::longname)
2154 (dummy_target::doc): Delete.
2155 (dummy_target::info): New.
2156 (debug_target::shortname, debug_target::longname)
2157 (debug_target::doc): Delete.
2158 (debug_target::info): New.
2159 * target.h (struct target_info): New.
2160 (target_ops::~target_ops): Add comment.
2161 (target_ops::info): New.
2162 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2163 longer virtual. Implement in terms of target_info.
2164 (set_native_target, get_native_target): Declare.
2165 (target_open_ftype): New.
2166 (add_target, add_target_with_completer)
2167 (add_deprecated_target_alias): Change prototype.
2168 (test_target) <shortname, longname, doc>: Delete.
2170 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2171 add_inf_child_target.
2172 * tracefile-tfile.c (tfile_target_info): New.
2173 (tfile_target) <shortname, longname, doc>: Delete.
2175 (tfile_target::open): Rename to ...
2176 (tfile_target_open): ... this.
2177 (_initialize_tracefile_tfile): Adjust.
2178 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2179 add_inf_child_target.
2180 * windows-nat.c (_initialize_windows_nat): Use
2181 add_inf_child_target.
2182 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2183 add_inf_child_target.
2185 2018-05-02 Pedro Alves <palves@redhat.com>
2187 * linux-nat.h (linux_nat_target) <low_new_thread,
2188 low_delete_thread, low_new_fork, low_forget_process,
2189 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2190 New virtual methods.
2191 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2192 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2193 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2194 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2195 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2197 * linux-fork.c (delete_fork): Adjust to call low method.
2198 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2199 (linux_nat_new_fork, linux_nat_forget_process_hook)
2200 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2201 (linux_nat_status_is_event):
2202 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2203 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2205 (sigtrap_is_event): Rename to ...
2206 (linux_nat_target::low_status_is_event): ... this.
2207 (linux_nat_set_status_is_event): Delete.
2208 (save_stop_reason, linux_nat_wait_1)
2209 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2211 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2212 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2213 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2214 (linux_nat_set_prepare_to_resume): Delete.
2215 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2216 low virtual methods.
2217 * amd64-linux-nat.c: Likewise.
2218 * arm-linux-nat.c: Likewise.
2219 * i386-linux-nat.c: Likewise.
2220 * ia64-linux-nat.c: Likewise.
2221 * mips-linux-nat.c: Likewise.
2222 * ppc-linux-nat.c: Likewise.
2223 * s390-linux-nat.c: Likewise.
2224 * sparc64-linux-nat.c: Likewise.
2225 * x86-linux-nat.c: Likewise.
2226 * x86-linux-nat.h: Include "nat/x86-linux.h".
2227 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2228 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2231 2018-05-02 Pedro Alves <palves@redhat.com>
2233 * target.h (target_ops)
2234 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2235 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2236 stopped_by_watchpoint, have_continuable_watchpoint,
2237 stopped_data_address, watchpoint_addr_within_range,
2238 can_accel_watchpoint_condition, can_run, thread_alive,
2239 has_all_memory, has_memory, has_stack, has_registers,
2240 has_execution, can_async_p, is_async_p, supports_non_stop,
2241 always_non_stop_p, can_execute_reverse, supports_multi_process,
2242 supports_enable_disable_tracepoint,
2243 supports_disable_randomization, supports_string_tracing,
2244 supports_evaluation_of_breakpoint_conditions,
2245 can_run_breakpoint_commands, filesystem_is_local,
2246 can_download_tracepoint, get_trace_state_variable_value,
2247 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2248 record_is_replaying, record_will_replay,
2249 augmented_libraries_svr4_read>: Adjust to return bool.
2250 * aarch64-linux-nat.c: All implementations adjusted.
2251 * aix-thread.c: All implementations adjusted.
2252 * arm-linux-nat.c: All implementations adjusted.
2253 * breakpoint.c: All implementations adjusted.
2254 * bsd-kvm.c: All implementations adjusted.
2255 * bsd-uthread.c: All implementations adjusted.
2256 * corelow.c: All implementations adjusted.
2257 * ctf.c: All implementations adjusted.
2258 * darwin-nat.c: All implementations adjusted.
2259 * darwin-nat.h: All implementations adjusted.
2260 * exec.c: All implementations adjusted.
2261 * fbsd-nat.c: All implementations adjusted.
2262 * fbsd-nat.h: All implementations adjusted.
2263 * gnu-nat.c: All implementations adjusted.
2264 * gnu-nat.h: All implementations adjusted.
2265 * go32-nat.c: All implementations adjusted.
2266 * ia64-linux-nat.c: All implementations adjusted.
2267 * inf-child.c: All implementations adjusted.
2268 * inf-child.h: All implementations adjusted.
2269 * inf-ptrace.c: All implementations adjusted.
2270 * inf-ptrace.h: All implementations adjusted.
2271 * linux-nat.c: All implementations adjusted.
2272 * linux-nat.h: All implementations adjusted.
2273 * mips-linux-nat.c: All implementations adjusted.
2274 * nto-procfs.c: All implementations adjusted.
2275 * ppc-linux-nat.c: All implementations adjusted.
2276 * procfs.c: All implementations adjusted.
2277 * ravenscar-thread.c: All implementations adjusted.
2278 * record-btrace.c: All implementations adjusted.
2279 * record-full.c: All implementations adjusted.
2280 * remote-sim.c: All implementations adjusted.
2281 * remote.c: All implementations adjusted.
2282 * s390-linux-nat.c: All implementations adjusted.
2283 * sol-thread.c: All implementations adjusted.
2284 * spu-multiarch.c: All implementations adjusted.
2285 * target-delegates.c: All implementations adjusted.
2286 * target.c: All implementations adjusted.
2287 * target.h: All implementations adjusted.
2288 * tracefile-tfile.c: All implementations adjusted.
2289 * tracefile.c: All implementations adjusted.
2290 * tracefile.h: All implementations adjusted.
2291 * windows-nat.c: All implementations adjusted.
2292 * x86-linux-nat.h: All implementations adjusted.
2293 * x86-nat.h: All implementations adjusted.
2295 2018-05-02 Pedro Alves <palves@redhat.com>
2297 * make-target-delegates (scan_target_h): Don't trim lines here.
2298 Replace sequences of tabs and/or whitespace with a single
2300 (top level, parsing methods): Trim each line before processing it
2303 2018-05-02 Pedro Alves <palves@redhat.com>
2304 John Baldwin <jhb@freebsd.org>
2306 * target.h (enum strata) <debug_stratum>: New.
2307 (struct target_ops) <all delegation methods>: Replace by C++
2308 virtual methods, and drop "to_" prefix. All references updated
2310 <to_shortname, to_longname, to_doc, to_data,
2311 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2312 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2313 virtual methods. All references updated throughout.
2314 <can_attach, supports_terminal_ours, can_create_inferior,
2315 get_thread_control_capabilities, attach_no_wait>: New
2317 <insert_breakpoint, remove_breakpoint>: Now
2318 TARGET_DEFAULT_NORETURN methods.
2319 <info_proc>: Now returns bool.
2321 (OPS_MAGIC): Delete.
2322 (current_target): Delete. All references replaced by references
2324 (target_stack): ... this. New.
2325 (target_shortname, target_longname): Adjust.
2326 (target_can_run): Now a function declaration.
2327 (default_child_has_all_memory, default_child_has_memory)
2328 (default_child_has_stack, default_child_has_registers)
2329 (default_child_has_execution): Remove target_ops parameter.
2330 (complete_target_initialization): Delete.
2331 (memory_breakpoint_target): New template class.
2332 (test_target_ops): Refactor as a C++ class with virtual methods.
2333 * make-target-delegates (NAME_PART): Tighten.
2334 (POINTER_PART, CP_SYMBOL): New.
2335 (SIMPLE_RETURN_PART): Reimplement.
2336 (VEC_RETURN_PART): Expect less.
2337 (RETURN_PART, VIRTUAL_PART): New.
2338 (METHOD): Adjust to C++ virtual methods.
2339 (scan_target_h): Remove reference to C99.
2340 (dname): Output "target_ops::" prefix.
2341 (write_function_header): Adjust to output a C++ class method.
2342 (write_declaration): New.
2343 (write_delegator): Adjust to output a C++ class method.
2344 (tdname): Output "dummy_target::" prefix.
2345 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2347 (tdefault_names, debug_names): Delete.
2348 (return_types, tdefaults, styles, argtypes_array): New.
2349 (top level): All methods are delegators.
2351 (top level): Print dummy_target and debug_target classes.
2352 * target-delegates.c: Regenerate.
2353 * target-debug.h (target_debug_print_enum_info_proc_what)
2354 (target_debug_print_thread_control_capabilities)
2355 (target_debug_print_thread_info_p): New.
2356 * target.c (dummy_target): Delete.
2357 (the_dummy_target, the_debug_target): New.
2358 (target_stack): Now extern.
2359 (set_targetdebug): Push/unpush debug target.
2360 (default_child_has_all_memory, default_child_has_memory)
2361 (default_child_has_stack, default_child_has_registers)
2362 (default_child_has_execution): Remove target_ops parameter.
2363 (complete_target_initialization): Delete.
2364 (add_target_with_completer): No longer call
2365 complete_target_initialization.
2366 (target_supports_terminal_ours): Use regular delegation.
2367 (update_current_target): Delete.
2368 (push_target): No longer check magic number. Don't call
2369 update_current_target.
2370 (unpush_target): Don't call update_current_target.
2371 (target_is_pushed): No longer check magic number.
2372 (target_require_runnable): Skip for all stratums over
2374 (target_ops::info_proc): New.
2375 (target_info_proc): Use find_target_at and
2376 find_default_run_target.
2377 (target_supports_disable_randomization): Use regular delegation.
2378 (target_get_osdata): Use find_target_at.
2379 (target_ops::open, target_ops::close, target_ops::can_attach)
2380 (target_ops::attach, target_ops::can_create_inferior)
2381 (target_ops::create_inferior, target_ops::can_run)
2382 (target_can_run): New.
2383 (default_fileio_target): Use regular delegation.
2384 (target_ops::fileio_open, target_ops::fileio_pwrite)
2385 (target_ops::fileio_pread, target_ops::fileio_fstat)
2386 (target_ops::fileio_close, target_ops::fileio_unlink)
2387 (target_ops::fileio_readlink): New.
2388 (target_fileio_open_1, target_fileio_unlink)
2389 (target_fileio_readlink): Always call the target method. Handle
2391 (return_zero, return_zero_has_execution): Delete.
2392 (init_dummy_target): Delete.
2393 (dummy_target::dummy_target, dummy_target::shortname)
2394 (dummy_target::longname, dummy_target::doc)
2395 (debug_target::debug_target, debug_target::shortname)
2396 (debug_target::longname, debug_target::doc): New.
2397 (target_supports_delete_record): Use regular delegation.
2398 (setup_target_debug): Delete.
2399 (maintenance_print_target_stack): Skip debug_stratum.
2400 (initialize_targets): Instantiate the_dummy_target and
2402 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2404 (target_auxv_search, fprint_target_auxv): Adjust.
2405 (info_auxv_command): Adjust to use target_stack.
2406 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2407 * exceptions.c (print_flush): Handle a NULL target_stack.
2408 * regcache.c (target_ops_no_register): Refactor as class with
2411 * exec.c (exec_target): New class.
2412 (exec_ops): Now an exec_target.
2413 (exec_open, exec_close_1, exec_get_section_table)
2414 (exec_xfer_partial, exec_files_info, exec_has_memory)
2415 (exec_make_note_section): Refactor as exec_target methods.
2416 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2418 (exec_target::find_memory_regions): New.
2419 (_initialize_exec): Don't call init_exec_ops.
2420 * gdbcore.h (exec_file_clear): Delete.
2422 * corefile.c (core_target): Delete.
2423 (core_file_command): Adjust.
2424 * corelow.c (core_target): New class.
2425 (the_core_target): New.
2426 (core_close): Remove target_ops parameter.
2427 (core_close_cleanup): Adjust.
2428 (core_target::close): New.
2429 (core_open, core_detach, get_core_registers, core_files_info)
2430 (core_xfer_partial, core_thread_alive, core_read_description)
2431 (core_pid_to_str, core_thread_name, core_has_memory)
2432 (core_has_stack, core_has_registers, core_info_proc): Rework as
2433 core_target methods.
2434 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2435 (_initialize_corelow): Initialize the_core_target.
2436 * gdbcore.h (core_target): Delete.
2437 (the_core_target): New.
2439 * ctf.c: (ctf_target): New class.
2440 (ctf_ops): Now a ctf_target.
2441 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2442 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2443 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2445 (init_ctf_ops): Delete.
2446 (_initialize_ctf): Don't call it.
2447 * tracefile-tfile.c (tfile_target): New class.
2448 (tfile_ops): Now a tfile_target.
2449 (tfile_open, tfile_close, tfile_files_info)
2450 (tfile_get_tracepoint_status, tfile_trace_find)
2451 (tfile_fetch_registers, tfile_xfer_partial)
2452 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2453 Refactor as tfile_target methods.
2454 (tfile_xfer_partial_features): Remove target_ops parameter.
2455 (init_tfile_ops): Delete.
2456 (_initialize_tracefile_tfile): Don't call it.
2457 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2458 (tracefile_has_stack, tracefile_has_registers)
2459 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2460 tracefile_target methods.
2461 (init_tracefile_ops): Delete.
2462 (tracefile_target::tracefile_target): New.
2463 * tracefile.h: Include "target.h".
2464 (tracefile_target): New class.
2465 (init_tracefile_ops): Delete.
2467 * spu-multiarch.c (spu_multiarch_target): New class.
2468 (spu_ops): Now a spu_multiarch_target.
2469 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2470 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2471 (spu_search_memory, spu_mourn_inferior): Refactor as
2472 spu_multiarch_target methods.
2473 (init_spu_ops): Delete.
2474 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2475 complete_target_initialization.
2477 * ravenscar-thread.c (ravenscar_thread_target): New class.
2478 (ravenscar_ops): Now a ravenscar_thread_target.
2479 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2480 (ravenscar_thread_alive, ravenscar_pid_to_str)
2481 (ravenscar_fetch_registers, ravenscar_store_registers)
2482 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2483 (ravenscar_stopped_by_hw_breakpoint)
2484 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2485 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2486 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2488 (init_ravenscar_thread_ops): Delete.
2489 (_initialize_ravenscar): Remove references to
2490 init_ravenscar_thread_ops and complete_target_initialization.
2492 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2493 (bsd_uthread_target): New class.
2494 (bsd_uthread_ops): Now a bsd_uthread_target.
2495 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2496 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2497 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2498 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2499 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2500 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2501 (bsd_uthread_target): Delete function.
2502 (_initialize_bsd_uthread): Remove reference to
2503 complete_target_initialization.
2505 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2506 (target_bfd): ... this new class.
2507 (target_bfd_xfer_partial, target_bfd_get_section_table)
2508 (target_bfd_close): Refactor as target_bfd methods.
2509 (target_bfd::~target_bfd): New.
2510 (target_bfd_reopen): Adjust.
2511 (target_bfd::close): New.
2513 * record-btrace.c (record_btrace_target): New class.
2514 (record_btrace_ops): Now a record_btrace_target.
2515 (record_btrace_open, record_btrace_stop_recording)
2516 (record_btrace_disconnect, record_btrace_close)
2517 (record_btrace_async, record_btrace_info)
2518 (record_btrace_insn_history, record_btrace_insn_history_range)
2519 (record_btrace_insn_history_from, record_btrace_call_history)
2520 (record_btrace_call_history_range)
2521 (record_btrace_call_history_from, record_btrace_record_method)
2522 (record_btrace_is_replaying, record_btrace_will_replay)
2523 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2524 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2525 (record_btrace_store_registers, record_btrace_prepare_to_store)
2526 (record_btrace_to_get_unwinder)
2527 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2528 (record_btrace_commit_resume, record_btrace_wait)
2529 (record_btrace_stop, record_btrace_can_execute_reverse)
2530 (record_btrace_stopped_by_sw_breakpoint)
2531 (record_btrace_supports_stopped_by_sw_breakpoint)
2532 (record_btrace_stopped_by_hw_breakpoint)
2533 (record_btrace_supports_stopped_by_hw_breakpoint)
2534 (record_btrace_update_thread_list, record_btrace_thread_alive)
2535 (record_btrace_goto_begin, record_btrace_goto_end)
2536 (record_btrace_goto, record_btrace_stop_replaying_all)
2537 (record_btrace_execution_direction)
2538 (record_btrace_prepare_to_generate_core)
2539 (record_btrace_done_generating_core): Refactor as
2540 record_btrace_target methods.
2541 (init_record_btrace_ops): Delete.
2542 (_initialize_record_btrace): Remove reference to
2543 init_record_btrace_ops.
2544 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2545 the execution_direction global.
2546 (record_full_base_target, record_full_target)
2547 (record_full_core_target): New classes.
2548 (record_full_ops): Now a record_full_target.
2549 (record_full_core_ops): Now a record_full_core_target.
2550 (record_full_target::detach, record_full_target::disconnect)
2551 (record_full_core_target::disconnect)
2552 (record_full_target::mourn_inferior, record_full_target::kill):
2554 (record_full_open, record_full_close, record_full_async): Refactor
2555 as methods of the record_full_base_target class.
2556 (record_full_resume, record_full_commit_resume): Refactor
2557 as methods of the record_full_target class.
2558 (record_full_wait, record_full_stopped_by_watchpoint)
2559 (record_full_stopped_data_address)
2560 (record_full_stopped_by_sw_breakpoint)
2561 (record_full_supports_stopped_by_sw_breakpoint)
2562 (record_full_stopped_by_hw_breakpoint)
2563 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2564 methods of the record_full_base_target class.
2565 (record_full_store_registers, record_full_xfer_partial)
2566 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2567 Refactor as methods of the record_full_target class.
2568 (record_full_can_execute_reverse, record_full_get_bookmark)
2569 (record_full_goto_bookmark, record_full_execution_direction)
2570 (record_full_record_method, record_full_info, record_full_delete)
2571 (record_full_is_replaying, record_full_will_replay)
2572 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2573 (record_full_stop_replaying): Refactor as methods of the
2574 record_full_base_target class.
2575 (record_full_core_resume, record_full_core_kill)
2576 (record_full_core_fetch_registers)
2577 (record_full_core_prepare_to_store)
2578 (record_full_core_store_registers, record_full_core_xfer_partial)
2579 (record_full_core_insert_breakpoint)
2580 (record_full_core_remove_breakpoint)
2581 (record_full_core_has_execution): Refactor
2582 as methods of the record_full_core_target class.
2583 (record_full_base_target::supports_delete_record): New.
2584 (init_record_full_ops): Delete.
2585 (init_record_full_core_ops): Delete.
2586 (record_full_save): Refactor as method of the
2587 record_full_base_target class.
2588 (_initialize_record_full): Remove references to
2589 init_record_full_ops and init_record_full_core_ops.
2591 * remote.c (remote_target, extended_remote_target): New classes.
2592 (remote_ops): Now a remote_target.
2593 (extended_remote_ops): Now an extended_remote_target.
2594 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2595 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2596 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2597 (remote_pass_signals, remote_set_syscall_catchpoint)
2598 (remote_program_signals, )
2599 (remote_thread_always_alive): Remove target_ops parameter.
2600 (remote_thread_alive, remote_thread_name)
2601 (remote_update_thread_list, remote_threads_extra_info)
2602 (remote_static_tracepoint_marker_at)
2603 (remote_static_tracepoint_markers_by_strid)
2604 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2605 (remote_open): Refactor as methods of remote_target.
2606 (extended_remote_open, extended_remote_detach)
2607 (extended_remote_attach, extended_remote_post_attach):
2608 (extended_remote_supports_disable_randomization)
2609 (extended_remote_create_inferior): : Refactor as method of
2610 extended_remote_target.
2611 (remote_set_permissions, remote_open_1, remote_detach)
2612 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2613 (remote_resume, remote_commit_resume, remote_stop)
2614 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2615 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2616 (remote_prepare_to_store, remote_store_registers)
2617 (remote_flash_erase, remote_flash_done, remote_files_info)
2618 (remote_kill, remote_mourn, remote_insert_breakpoint)
2619 (remote_remove_breakpoint, remote_insert_watchpoint)
2620 (remote_watchpoint_addr_within_range)
2621 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2622 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2623 (remote_supports_stopped_by_sw_breakpoint)
2624 (remote_stopped_by_hw_breakpoint)
2625 (remote_supports_stopped_by_hw_breakpoint)
2626 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2627 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2628 (remote_verify_memory): Refactor as methods of remote_target.
2629 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2631 (remote_xfer_partial, remote_get_memory_xfer_limit)
2632 (remote_search_memory, remote_rcmd, remote_memory_map)
2633 (remote_pid_to_str, remote_get_thread_local_address)
2634 (remote_get_tib_address, remote_read_description): Refactor as
2635 methods of remote_target.
2636 (remote_target::fileio_open, remote_target::fileio_pwrite)
2637 (remote_target::fileio_pread, remote_target::fileio_close): New.
2638 (remote_hostio_readlink, remote_hostio_fstat)
2639 (remote_filesystem_is_local, remote_can_execute_reverse)
2640 (remote_supports_non_stop, remote_supports_disable_randomization)
2641 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2642 (remote_supports_enable_disable_tracepoint)
2643 (remote_supports_string_tracing)
2644 (remote_can_run_breakpoint_commands, remote_trace_init)
2645 (remote_download_tracepoint, remote_can_download_tracepoint)
2646 (remote_download_trace_state_variable, remote_enable_tracepoint)
2647 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2648 (remote_trace_start, remote_get_trace_status)
2649 (remote_get_tracepoint_status, remote_trace_stop)
2650 (remote_trace_find, remote_get_trace_state_variable_value)
2651 (remote_save_trace_data, remote_get_raw_trace_data)
2652 (remote_set_disconnected_tracing, remote_core_of_thread)
2653 (remote_set_circular_trace_buffer, remote_traceframe_info)
2654 (remote_get_min_fast_tracepoint_insn_len)
2655 (remote_set_trace_buffer_size, remote_set_trace_notes)
2656 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2657 (remote_disable_btrace, remote_teardown_btrace)
2658 (remote_read_btrace, remote_btrace_conf)
2659 (remote_augmented_libraries_svr4_read, remote_load)
2660 (remote_pid_to_exec_file, remote_can_do_single_step)
2661 (remote_execution_direction, remote_thread_handle_to_thread_info):
2662 Refactor as methods of remote_target.
2663 (init_remote_ops, init_extended_remote_ops): Delete.
2664 (remote_can_async_p, remote_is_async_p, remote_async)
2665 (remote_thread_events, remote_upload_tracepoints)
2666 (remote_upload_trace_state_variables): Refactor as methods of
2668 (_initialize_remote): Remove references to init_remote_ops and
2669 init_extended_remote_ops.
2671 * remote-sim.c (gdbsim_target): New class.
2672 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2673 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2674 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2675 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2676 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2677 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2678 Refactor as methods of gdbsim_target.
2679 (gdbsim_ops): Now a gdbsim_target.
2680 (init_gdbsim_ops): Delete.
2681 (gdbsim_cntrl_c): Adjust.
2682 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2684 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2685 (the_amd64_linux_nat_target): New.
2686 (amd64_linux_fetch_inferior_registers)
2687 (amd64_linux_store_inferior_registers): Refactor as methods of
2688 amd64_linux_nat_target.
2689 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2690 * i386-linux-nat.c: Don't include "linux-nat.h".
2691 (i386_linux_nat_target): New class.
2692 (the_i386_linux_nat_target): New.
2693 (i386_linux_fetch_inferior_registers)
2694 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2695 as methods of i386_linux_nat_target.
2696 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2697 * inf-child.c (inf_child_ops): Delete.
2698 (inf_child_fetch_inferior_registers)
2699 (inf_child_store_inferior_registers): Delete.
2700 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2701 methods of inf_child_target.
2702 (inf_child_target::supports_terminal_ours)
2703 (inf_child_target::terminal_init)
2704 (inf_child_target::terminal_inferior)
2705 (inf_child_target::terminal_ours_for_output)
2706 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2707 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2709 (inf_child_open, inf_child_disconnect, inf_child_close)
2710 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2711 (inf_child_post_startup_inferior, inf_child_can_run)
2712 (inf_child_pid_to_exec_file): Refactor as methods of
2714 (inf_child_follow_fork): Delete.
2715 (inf_child_target::can_create_inferior)
2716 (inf_child_target::can_attach): New.
2717 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2718 (inf_child_target::has_stack, inf_child_target::has_registers)
2719 (inf_child_target::has_execution): New.
2720 (inf_child_fileio_open, inf_child_fileio_pwrite)
2721 (inf_child_fileio_pread, inf_child_fileio_fstat)
2722 (inf_child_fileio_close, inf_child_fileio_unlink)
2723 (inf_child_fileio_readlink, inf_child_use_agent)
2724 (inf_child_can_use_agent): Refactor as methods of
2726 (return_zero, inf_child_target): Delete.
2727 (inf_child_target::inf_child_target): New.
2728 * inf-child.h: Include "target.h".
2729 (inf_child_target): Delete function prototype.
2730 (inf_child_target): New class.
2731 (inf_child_open_target, inf_child_mourn_inferior)
2732 (inf_child_maybe_unpush_target): Delete.
2733 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2734 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2735 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2736 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2737 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2738 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2739 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2740 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2741 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2742 methods of inf_ptrace_target.
2743 (inf_ptrace_target): Delete function.
2744 * inf-ptrace.h: Include "inf-child.h".
2745 (inf_ptrace_target): Delete function declaration.
2746 (inf_ptrace_target): New class.
2747 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2748 * linux-nat.c (linux_target): New.
2749 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2750 (linux_nat_target::~linux_nat_target): New.
2751 (linux_child_post_attach, linux_child_post_startup_inferior)
2752 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2753 (linux_child_remove_fork_catchpoint)
2754 (linux_child_insert_vfork_catchpoint)
2755 (linux_child_remove_vfork_catchpoint)
2756 (linux_child_insert_exec_catchpoint)
2757 (linux_child_remove_exec_catchpoint)
2758 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2759 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2760 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2761 (linux_nat_stopped_data_address)
2762 (linux_nat_stopped_by_sw_breakpoint)
2763 (linux_nat_supports_stopped_by_sw_breakpoint)
2764 (linux_nat_stopped_by_hw_breakpoint)
2765 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2766 (linux_nat_kill, linux_nat_mourn_inferior)
2767 (linux_nat_xfer_partial, linux_nat_thread_alive)
2768 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2769 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2770 (linux_child_static_tracepoint_markers_by_strid)
2771 (linux_nat_is_async_p, linux_nat_can_async_p)
2772 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2773 (linux_nat_supports_multi_process)
2774 (linux_nat_supports_disable_randomization, linux_nat_async)
2775 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2776 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2777 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2778 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2779 methods of linux_nat_target.
2780 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2781 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2783 (check_stopped_by_watchpoint): Adjust.
2784 (linux_xfer_partial): Delete.
2785 (linux_target_install_ops, linux_target, linux_nat_add_target):
2787 (linux_nat_target::linux_nat_target): New.
2788 * linux-nat.h: Include "inf-ptrace.h".
2789 (linux_nat_target): New.
2790 (linux_target, linux_target_install_ops, linux_nat_add_target):
2791 Delete function declarations.
2792 (linux_target): Declare global.
2793 * linux-thread-db.c (thread_db_target): New.
2794 (thread_db_target::thread_db_target): New.
2795 (thread_db_ops): Delete.
2796 (the_thread_db_target): New.
2797 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2798 (thread_db_update_thread_list, thread_db_pid_to_str)
2799 (thread_db_extra_thread_info)
2800 (thread_db_thread_handle_to_thread_info)
2801 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2802 (thread_db_resume): Refactor as methods of thread_db_target.
2803 (init_thread_db_ops): Delete.
2804 (_initialize_thread_db): Remove reference to init_thread_db_ops.
2805 * x86-linux-nat.c: Don't include "linux-nat.h".
2806 (super_post_startup_inferior): Delete.
2807 (x86_linux_nat_target::~x86_linux_nat_target): New.
2808 (x86_linux_child_post_startup_inferior)
2809 (x86_linux_read_description, x86_linux_enable_btrace)
2810 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2811 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2812 methods of x86_linux_nat_target.
2813 (x86_linux_create_target): Delete. Bits folded ...
2814 (x86_linux_add_target): ... here. Now takes a linux_nat_target
2816 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2817 (x86_linux_nat_target): New class.
2818 (x86_linux_create_target): Delete.
2819 (x86_linux_add_target): Now takes a linux_nat_target pointer.
2820 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2821 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2822 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2823 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2824 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2826 (x86_use_watchpoints): Delete.
2827 * x86-nat.h: Include "breakpoint.h" and "target.h".
2828 (x86_use_watchpoints): Delete.
2829 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2830 (x86_stopped_by_watchpoint, x86_stopped_data_address)
2831 (x86_insert_watchpoint, x86_remove_watchpoint)
2832 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2833 (x86_stopped_by_hw_breakpoint): New declarations.
2834 (x86_nat_target): New template class.
2836 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2837 (the_ppc_linux_nat_target): New.
2838 (ppc_linux_fetch_inferior_registers)
2839 (ppc_linux_can_use_hw_breakpoint)
2840 (ppc_linux_region_ok_for_hw_watchpoint)
2841 (ppc_linux_ranged_break_num_registers)
2842 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2843 (ppc_linux_insert_mask_watchpoint)
2844 (ppc_linux_remove_mask_watchpoint)
2845 (ppc_linux_can_accel_watchpoint_condition)
2846 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2847 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2848 (ppc_linux_watchpoint_addr_within_range)
2849 (ppc_linux_masked_watch_num_registers)
2850 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2851 (ppc_linux_read_description): Refactor as methods of
2852 ppc_linux_nat_target.
2853 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
2855 * procfs.c (procfs_xfer_partial): Delete forward declaration.
2856 (procfs_target): New class.
2857 (the_procfs_target): New.
2858 (procfs_target): Delete function.
2859 (procfs_auxv_parse, procfs_attach, procfs_detach)
2860 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2861 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2862 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2863 (procfs_create_inferior, procfs_update_thread_list)
2864 (procfs_thread_alive, procfs_pid_to_str)
2865 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2866 (procfs_stopped_data_address, procfs_insert_watchpoint)
2867 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2868 (proc_find_memory_regions, procfs_info_proc)
2869 (procfs_make_note_section): Refactor as methods of procfs_target.
2870 (_initialize_procfs): Adjust.
2871 * sol-thread.c (sol_thread_target): New class.
2872 (sol_thread_ops): Now a sol_thread_target.
2873 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2874 (sol_thread_fetch_registers, sol_thread_store_registers)
2875 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2876 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2877 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2878 (init_sol_thread_ops): Delete.
2879 (_initialize_sol_thread): Adjust. Remove references to
2880 init_sol_thread_ops and complete_target_initialization.
2882 * windows-nat.c (windows_nat_target): New class.
2883 (windows_fetch_inferior_registers)
2884 (windows_store_inferior_registers, windows_resume, windows_wait)
2885 (windows_attach, windows_detach, windows_pid_to_exec_file)
2886 (windows_files_info, windows_create_inferior)
2887 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2888 (windows_close, windows_pid_to_str, windows_xfer_partial)
2889 (windows_get_tib_address, windows_get_ada_task_ptid)
2890 (windows_thread_name, windows_thread_alive): Refactor as
2891 windows_nat_target methods.
2892 (do_initial_windows_stuff): Adjust.
2893 (windows_target): Delete function.
2894 (_initialize_windows_nat): Adjust.
2896 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2897 (darwin_mourn_inferior, darwin_kill_inferior)
2898 (darwin_create_inferior, darwin_attach, darwin_detach)
2899 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2900 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2901 (darwin_supports_multi_process): Refactor as darwin_nat_target
2903 (darwin_resume_to, darwin_files_info): Delete.
2904 (_initialize_darwin_inferior): Rename to ...
2905 (_initialize_darwin_nat): ... this. Adjust to C++ification.
2906 * darwin-nat.h: Include "inf-child.h".
2907 (darwin_nat_target): New class.
2908 (darwin_complete_target): Delete.
2909 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2910 (darwin_target): New.
2911 (i386_darwin_fetch_inferior_registers)
2912 (i386_darwin_store_inferior_registers): Refactor as methods of
2914 (darwin_complete_target): Delete, with ...
2915 (_initialize_i386_darwin_nat): ... bits factored out here.
2917 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2918 (the_alpha_linux_nat_target): New.
2919 (alpha_linux_register_u_offset): Refactor as
2920 alpha_linux_nat_target method.
2921 (_initialize_alpha_linux_nat): Adjust.
2922 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2923 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2924 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2925 methods of linux_nat_trad_target.
2926 (linux_trad_target): Delete.
2927 * linux-nat-trad.h (linux_trad_target): Delete function.
2928 (linux_nat_trad_target): New class.
2929 * mips-linux-nat.c (mips_linux_nat_target): New class.
2930 (super_fetch_registers, super_store_registers, super_close):
2932 (the_mips_linux_nat_target): New.
2933 (mips64_linux_regsets_fetch_registers)
2934 (mips64_linux_regsets_store_registers)
2935 (mips64_linux_fetch_registers, mips64_linux_store_registers)
2936 (mips_linux_register_u_offset, mips_linux_read_description)
2937 (mips_linux_can_use_hw_breakpoint)
2938 (mips_linux_stopped_by_watchpoint)
2939 (mips_linux_stopped_data_address)
2940 (mips_linux_region_ok_for_hw_watchpoint)
2941 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2942 (mips_linux_close): Refactor as methods of mips_linux_nat.
2943 (_initialize_mips_linux_nat): Adjust to C++ification.
2945 * aix-thread.c (aix_thread_target): New class.
2946 (aix_thread_ops): Now an aix_thread_target.
2947 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2948 (aix_thread_fetch_registers, aix_thread_store_registers)
2949 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2950 (aix_thread_thread_alive, aix_thread_pid_to_str)
2951 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2952 Refactor as methods of aix_thread_target.
2953 (init_aix_thread_ops): Delete.
2954 (_initialize_aix_thread): Remove references to init_aix_thread_ops
2955 and complete_target_initialization.
2956 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2957 (rs6000_nat_target): New class.
2958 (the_rs6000_nat_target): New.
2959 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2960 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2961 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2962 (super_create_inferior): Delete.
2963 (_initialize_rs6000_nat): Adjust to C++ification.
2965 * arm-linux-nat.c (arm_linux_nat_target): New class.
2966 (the_arm_linux_nat_target): New.
2967 (arm_linux_fetch_inferior_registers)
2968 (arm_linux_store_inferior_registers, arm_linux_read_description)
2969 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2970 (arm_linux_remove_hw_breakpoint)
2971 (arm_linux_region_ok_for_hw_watchpoint)
2972 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2973 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2974 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2975 arm_linux_nat_target.
2976 (_initialize_arm_linux_nat): Adjust to C++ification.
2978 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2979 (the_aarch64_linux_nat_target): New.
2980 (aarch64_linux_fetch_inferior_registers)
2981 (aarch64_linux_store_inferior_registers)
2982 (aarch64_linux_child_post_startup_inferior)
2983 (aarch64_linux_read_description)
2984 (aarch64_linux_can_use_hw_breakpoint)
2985 (aarch64_linux_insert_hw_breakpoint)
2986 (aarch64_linux_remove_hw_breakpoint)
2987 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2988 (aarch64_linux_region_ok_for_hw_watchpoint)
2989 (aarch64_linux_stopped_data_address)
2990 (aarch64_linux_stopped_by_watchpoint)
2991 (aarch64_linux_watchpoint_addr_within_range)
2992 (aarch64_linux_can_do_single_step): Refactor as methods of
2993 aarch64_linux_nat_target.
2994 (super_post_startup_inferior): Delete.
2995 (_initialize_aarch64_linux_nat): Adjust to C++ification.
2997 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2998 (the_hppa_linux_nat_target): New.
2999 (hppa_linux_fetch_inferior_registers)
3000 (hppa_linux_store_inferior_registers): Refactor as methods of
3001 hppa_linux_nat_target.
3002 (_initialize_hppa_linux_nat): Adjust to C++ification.
3004 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3005 (the_ia64_linux_nat_target): New.
3006 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3007 (ia64_linux_stopped_data_address)
3008 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3009 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3010 ia64_linux_nat_target methods.
3011 (super_xfer_partial): Delete.
3012 (_initialize_ia64_linux_nat): Adjust to C++ification.
3014 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3015 (the_m32r_linux_nat_target): New.
3016 (m32r_linux_fetch_inferior_registers)
3017 (m32r_linux_store_inferior_registers): Refactor as
3018 m32r_linux_nat_target methods.
3019 (_initialize_m32r_linux_nat): Adjust to C++ification.
3021 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
3022 (the_m68k_linux_nat_target): New.
3023 (m68k_linux_fetch_inferior_registers)
3024 (m68k_linux_store_inferior_registers): Refactor as
3025 m68k_linux_nat_target methods.
3026 (_initialize_m68k_linux_nat): Adjust to C++ification.
3028 * s390-linux-nat.c (s390_linux_nat_target): New class.
3029 (the_s390_linux_nat_target): New.
3030 (s390_linux_fetch_inferior_registers)
3031 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
3032 (s390_insert_watchpoint, s390_remove_watchpoint)
3033 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
3034 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
3035 (s390_auxv_parse, s390_read_description): Refactor as methods of
3036 s390_linux_nat_target.
3037 (_initialize_s390_nat): Adjust to C++ification.
3039 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
3040 (the_sparc_linux_nat_target): New.
3041 (_initialize_sparc_linux_nat): Adjust to C++ification.
3042 * sparc-nat.c (sparc_fetch_inferior_registers)
3043 (sparc_store_inferior_registers): Remove target_ops parameter.
3044 * sparc-nat.h (sparc_fetch_inferior_registers)
3045 (sparc_store_inferior_registers): Remove target_ops parameter.
3046 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
3047 (the_sparc64_linux_nat_target): New.
3048 (_initialize_sparc64_linux_nat): Adjust to C++ification.
3050 * spu-linux-nat.c (spu_linux_nat_target): New class.
3051 (the_spu_linux_nat_target): New.
3052 (spu_child_post_startup_inferior, spu_child_post_attach)
3053 (spu_child_wait, spu_fetch_inferior_registers)
3054 (spu_store_inferior_registers, spu_xfer_partial)
3055 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
3057 (_initialize_spu_nat): Adjust to C++ification.
3059 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
3060 (the_tilegx_linux_nat_target): New.
3061 (fetch_inferior_registers, store_inferior_registers):
3062 Refactor as methods.
3063 (_initialize_tile_linux_nat): Adjust to C++ification.
3065 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
3066 (the_xtensa_linux_nat_target): New.
3067 (xtensa_linux_fetch_inferior_registers)
3068 (xtensa_linux_store_inferior_registers): Refactor as
3069 xtensa_linux_nat_target methods.
3070 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3072 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3073 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3074 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3075 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3076 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3077 (fbsd_stopped_by_sw_breakpoint)
3078 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3079 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3080 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3081 (fbsd_post_startup_inferior, fbsd_post_attach)
3082 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3083 (fbsd_set_syscall_catchpoint)
3084 (super_xfer_partial, super_resume, super_wait)
3085 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3086 (fbsd_handle_debug_trap): Remove target_ops parameter.
3087 (fbsd_nat_add_target): Delete.
3088 * fbsd-nat.h: Include "inf-ptrace.h".
3089 (fbsd_nat_add_target): Delete.
3090 (USE_SIGTRAP_SIGINFO): Define.
3091 (fbsd_nat_target): New class.
3093 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3094 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3095 (amd64bsd_target): Delete.
3096 * amd64-bsd-nat.h: New file.
3097 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3099 (amd64_fbsd_nat_target): New class.
3100 (the_amd64_fbsd_nat_target): New.
3101 (amd64fbsd_read_description): Refactor as method of
3102 amd64_fbsd_nat_target.
3103 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3104 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3105 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3106 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3107 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3108 (i386bsd_target): Delete.
3109 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3110 (i386bsd_fetch_inferior_registers)
3111 (i386bsd_store_inferior_registers): Declare.
3112 (i386_bsd_nat_target): New class.
3113 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3114 (the_i386_fbsd_nat_target): New.
3115 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3116 i386_fbsd_nat_target methods.
3117 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3118 (_initialize_i386fbsd_nat): Adjust to C++ification.
3119 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3120 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3121 (_initialize_x86_bsd_nat): Adjust to C++ification.
3122 * x86-bsd-nat.h: Include "x86-nat.h".
3123 (x86bsd_target): Delete declaration.
3124 (x86bsd_nat_target): New class.
3126 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3127 (the_aarch64_fbsd_nat_target): New.
3128 (aarch64_fbsd_fetch_inferior_registers)
3129 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3130 aarch64_fbsd_nat_target.
3131 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3132 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3133 (the_alpha_bsd_nat_target): New.
3134 (alphabsd_fetch_inferior_registers)
3135 (alphabsd_store_inferior_registers): Refactor as
3136 alpha_bsd_nat_target methods.
3137 (_initialize_alphabsd_nat): Refactor as methods of
3138 alpha_bsd_nat_target.
3139 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3140 (the_amd64_nbsd_nat_target): New.
3141 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3142 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3143 (the_amd64_obsd_nat_target): New.
3144 (_initialize_amd64obsd_nat): Adjust to C++ification.
3145 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3146 (the_arm_fbsd_nat_target): New.
3147 (arm_fbsd_fetch_inferior_registers)
3148 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3149 (_initialize_arm_fbsd_nat): Refactor as methods of
3150 arm_fbsd_nat_target.
3151 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3152 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3153 (the_arm_netbsd_nat_target): New.
3154 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3155 arm_netbsd_nat_target.
3156 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3157 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3158 (the_hppa_nbsd_nat_target): New.
3159 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3160 hppa_nbsd_nat_target methods.
3161 (_initialize_hppanbsd_nat): Adjust to C++ification.
3162 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3163 (the_hppa_obsd_nat_target): New.
3164 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3165 methods of hppa_obsd_nat_target.
3166 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3168 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3169 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3171 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3172 (_initialize_i386obsd_nat): Use add_target.
3173 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3174 (the_m68k_bsd_nat_target): New.
3175 (m68kbsd_fetch_inferior_registers)
3176 (m68kbsd_store_inferior_registers): Refactor as methods of
3177 m68k_bsd_nat_target.
3178 (_initialize_m68kbsd_nat): Adjust to C++ification.
3179 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3180 (the_mips_fbsd_nat_target): New.
3181 (mips_fbsd_fetch_inferior_registers)
3182 (mips_fbsd_store_inferior_registers): Refactor as methods of
3183 mips_fbsd_nat_target.
3184 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3186 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3187 (the_mips_nbsd_nat_target): New.
3188 (mipsnbsd_fetch_inferior_registers)
3189 (mipsnbsd_store_inferior_registers): Refactor as methods of
3190 mips_nbsd_nat_target.
3191 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3192 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3193 (the_mips64_obsd_nat_target): New.
3194 (mips64obsd_fetch_inferior_registers)
3195 (mips64obsd_store_inferior_registers): Refactor as methods of
3196 mips64_obsd_nat_target.
3197 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3199 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3201 * nbsd-nat.h: Include "inf-ptrace.h".
3202 (nbsd_nat_target): New class.
3203 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3204 (obsd_wait): Refactor as methods of obsd_nat_target.
3205 (obsd_add_target): Delete.
3206 * obsd-nat.h: Include "inf-ptrace.h".
3207 (obsd_nat_target): New class.
3208 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3209 (the_ppc_fbsd_nat_target): New.
3210 (ppcfbsd_fetch_inferior_registers)
3211 (ppcfbsd_store_inferior_registers): Refactor as methods of
3212 ppc_fbsd_nat_target.
3213 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3215 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3216 (the_ppc_nbsd_nat_target): New.
3217 (ppcnbsd_fetch_inferior_registers)
3218 (ppcnbsd_store_inferior_registers): Refactor as methods of
3219 ppc_nbsd_nat_target.
3220 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3221 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3222 (the_ppc_obsd_nat_target): New.
3223 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3224 methods of ppc_obsd_nat_target.
3225 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3227 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3228 (the_sh_nbsd_nat_target): New.
3229 (shnbsd_fetch_inferior_registers)
3230 (shnbsd_store_inferior_registers): Refactor as methods of
3232 (_initialize_shnbsd_nat): Adjust to C++ification.
3233 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3234 (inf_ptrace_xfer_partial): Delete.
3235 (sparc_xfer_partial, sparc_target): Delete.
3236 * sparc-nat.h (sparc_fetch_inferior_registers)
3237 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3238 (sparc_target): Delete function declaration.
3239 (sparc_target): New template class.
3240 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3241 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3242 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3243 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3245 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3246 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3247 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3248 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3250 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3251 (the_vax_bsd_nat_target): New.
3252 (vaxbsd_fetch_inferior_registers)
3253 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3255 (_initialize_vaxbsd_nat): Adjust to C++ification.
3257 * bsd-kvm.c (bsd_kvm_target): New class.
3258 (bsd_kvm_ops): Now a bsd_kvm_target.
3259 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3260 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3261 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3263 (bsd_kvm_return_one): Delete.
3264 (bsd_kvm_add_target): Adjust to C++ification.
3266 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3267 (nto_procfs_target_procfs): New classes.
3268 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3269 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3270 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3271 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3272 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3273 (procfs_remove_hw_breakpoint, procfs_resume)
3274 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3275 (procfs_kill_inferior, procfs_store_registers)
3276 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3277 as methods of nto_procfs_target.
3278 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3279 (nto_native_ops): Delete.
3280 (procfs_open, procfs_native_open): Delete.
3281 (nto_native_ops): Now an nto_procfs_target_native.
3282 (init_procfs_targets): Adjust to C++ification.
3283 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3284 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3285 Refactor as methods of nto_procfs_target.
3287 * go32-nat.c (go32_nat_target): New class.
3288 (the_go32_nat_target): New.
3289 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3290 (go32_store_registers, go32_xfer_partial, go32_files_info)
3291 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3292 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3293 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3294 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3295 (go32_target): Delete.
3296 (_initialize_go32_nat): Adjust to C++ification.
3298 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3299 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3300 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3301 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3303 (gnu_target): Delete.
3304 * gnu-nat.h (gnu_target): Delete.
3305 (gnu_nat_target): New class.
3306 * i386-gnu-nat.c (gnu_base_target): New.
3307 (i386_gnu_nat_target): New class.
3308 (the_i386_gnu_nat_target): New.
3309 (_initialize_i386gnu_nat): Adjust to C++ification.
3311 2018-05-02 Pedro Alves <palves@redhat.com>
3313 * bfd-target.c (target_bfd_xclose): Rename to ...
3314 (target_bfd_close): ... this.
3315 (target_bfd_reopen): Adjust.
3316 * target.c (target_close): Remove references to to_xclose.
3317 * target.h (target_ops::to_xclose): Delete.
3318 (target_ops::to_close): Update comments.
3320 2018-05-02 Pedro Alves <palves@redhat.com>
3322 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3324 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3325 * inf-ptrace.c (inf_ptrace_register_u_offset)
3326 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3327 (inf_ptrace_store_register, inf_ptrace_store_registers)
3328 (inf_ptrace_trad_target): Move to ...
3329 * linux-nat-trad.c: ... this new file.
3330 * linux-nat-trad.h: New file.
3331 * linux-nat.c (linux_target_install_ops): Make extern.
3332 (linux_trad_target): Delete.
3333 * linux-nat.h (linux_trad_target): Delete declaration.
3334 (linux_target_install_ops): Declare.
3335 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3338 2018-05-02 Pedro Alves <palves@redhat.com>
3340 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3341 procfs_target/add_target here.
3342 * procfs.c (procfs_target): Make static.
3343 (_initialize_procfs): Call add_target here.
3344 * procfs.h (struct target_ops): Remove forward declaration.
3345 (procfs_target): Remove declaration.
3346 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3348 2018-05-02 Pedro Alves <palves@redhat.com>
3350 * procfs.c (procfs_stopped_by_watchpoint)
3351 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3352 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3354 (procfs_use_watchpoints): Delete, move contents...
3355 (procfs_target): ... here.
3356 * procfs.h (procfs_use_watchpoints): Delete declaration.
3357 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3358 procfs_use_watchpoints.
3359 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3360 procfs_use_watchpoints.
3362 2018-05-02 Tom Tromey <tom@tromey.com>
3365 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3366 and var_zuinteger_unlimited.
3367 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3368 and PARAM_ZUINTEGER_UNLIMITED.
3369 (set_parameter_value): Handle var_zuinteger and
3370 var_zuinteger_unlimited.
3371 (add_setshow_generic): Likewise.
3372 (parmpy_init): Likewise.
3374 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3377 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3378 pointer is not null before dereferencing it.
3380 2018-04-30 Tom Tromey <tom@tromey.com>
3382 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3385 2018-04-30 Tom Tromey <tom@tromey.com>
3387 * breakpoint.c (mention): Remove use of is_mi_like_p.
3388 (print_mention_ranged_breakpoint): Likewise.
3389 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3392 2018-04-30 Tom Tromey <tom@tromey.com>
3394 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3396 2018-04-30 Tom Tromey <tom@tromey.com>
3398 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3399 (info_spu_event_command): Remove some uses of is_mi_like_p.
3401 2018-04-30 Tom Tromey <tom@tromey.com>
3403 * python/py-framefilter.c (py_print_single_arg)
3404 (enumerate_locals, py_print_args, py_print_frame): Remove some
3405 uses of is_mi_like_p.
3407 2018-04-30 Tom Tromey <tom@tromey.com>
3410 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3411 * ui-out.h (ui_out::is_mi_like_p): Now const.
3412 (ui_out::do_is_mi_like_p): Now const.
3413 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3415 2018-04-30 Tom Tromey <tom@tromey.com>
3417 * varobj.c (varobj_set_visualizer): Use new_reference.
3418 * python/python.c (gdbpy_decode_line): Use new_reference.
3419 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3422 2018-04-30 Tom Tromey <tom@tromey.com>
3424 * varobj.c (install_new_value): Use new_reference.
3425 * value.h (value_incref): Return void. Swap intro comment with
3427 * value.c (set_value_parent): Use new_reference.
3428 (value_incref): Return void. Update intro comment.
3429 (release_value): Use new_reference.
3430 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3432 2018-04-30 Tom Tromey <tom@tromey.com>
3434 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3435 * gdb_bfd.h (new_bfd_ref): Remove.
3436 (gdb_bfd_open): Update comment.
3437 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3438 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3439 (gdb_bfd_fdopenr): Use new_reference.
3440 * exec.c (exec_file_attach): Use new_reference.
3442 2018-04-30 Tom Tromey <tom@tromey.com>
3444 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3447 2018-04-30 Tom Tromey <tom@tromey.com>
3449 * jit.c (jit_read_code_entry): Use type_align.
3450 * i386-tdep.c (i386_gdbarch_init): Don't call
3451 set_gdbarch_long_long_align_bit.
3452 * gdbarch.sh: Remove long_long_align_bit.
3453 * gdbarch.c, gdbarch.h: Rebuild.
3454 * arc-tdep.c (arc_type_align): New function.
3455 (arc_gdbarch_init): Use arc_type_align. Don't call
3456 set_gdbarch_long_long_align_bit.
3458 2018-04-30 Tom Tromey <tom@tromey.com>
3460 * rust-lang.c (rust_type_alignment): Remove.
3461 (rust_composite_type): Use type_align.
3463 2018-04-30 Tom Tromey <tom@tromey.com>
3465 * NEWS: Mention Type.align.
3466 * python/py-type.c (typy_get_alignof): New function.
3467 (type_object_getset): Add "alignof".
3469 2018-04-30 Tom Tromey <tom@tromey.com>
3473 * std-operator.def (UNOP_ALIGNOF): New operator.
3474 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3476 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3477 * c-lang.c (c_op_print_tab): Add alignof.
3478 * c-exp.y (ALIGNOF): New token.
3479 (exp): Add "ALIGNOF" production.
3480 (ident_tokens): Add _Alignof and alignof.
3482 2018-04-30 Tom Tromey <tom@tromey.com>
3484 * i386-tdep.c (i386_type_align): New function.
3485 (i386_gdbarch_init): Update.
3486 * gdbarch.sh (type_align): New method.
3487 * gdbarch.c, gdbarch.h: Rebuild.
3488 * arch-utils.h (default_type_align): Declare.
3489 * arch-utils.c (default_type_align): New function.
3490 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3491 (struct type) <align_log2>: New field.
3492 <instance_flags>: Now a bitfield.
3493 (TYPE_RAW_ALIGN): New macro.
3494 (type_align, type_raw_align, set_type_align): Declare.
3495 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3497 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3498 (get_alignment, maybe_set_alignment): New functions.
3499 (read_structure_type, read_enumeration_type, read_array_type)
3500 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3501 (read_subrange_type, read_base_type): Set type alignment.
3503 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3505 * dwarf2read.c (read_index_from_section): Use bool.
3507 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3510 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3513 2018-04-29 John Reiser <jreiser@BitWagon.com>
3516 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3517 last step, and do it atomically.
3519 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3521 * compile/compile-c-types.c (convert_int, convert_float):
3524 2018-04-27 Tom Tromey <tom@tromey.com>
3527 * rust-lang.c (rust_inclusive_range_type_p): New function.
3528 (rust_range): Handle inclusive ranges.
3529 (rust_compute_range): Likewise.
3530 * rust-exp.y (struct rust_op) <inclusive>: New field.
3531 (DOTDOTEQ): New constant.
3532 (range_expr): Add "..=" productions.
3533 (operator_tokens): Add "..=" token.
3534 (ast_range): Add "inclusive" parameter.
3535 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3537 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3539 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3540 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3542 * expprint.c (print_subexp_standard): Handle new bounds values.
3543 (dump_subexp_body_standard): Likewise.
3545 2018-04-27 Tom Tromey <tom@tromey.com>
3547 * configure: Rebuild.
3548 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3549 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3551 (class symbol_needs_eval_context): Likewise.
3552 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3553 (mock_mapped_index::symbol_name_at): Use "override". Remove
3555 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3557 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3558 * aarch64-tdep.c (instruction_reader::read): Use "override".
3559 (instruction_reader_test::read): Likewise.
3560 * arm-tdep.c (instruction_reader::read): Use "override".
3561 (instruction_reader_thumb::read): Likewise.
3563 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3566 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3567 instead of remote_send.
3568 (remote_send): Remove.
3570 2018-04-26 Pedro Alves <palves@redhat.com>
3572 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3573 find_function_start_sal instead of find_pc_line.
3575 2018-04-26 Pedro Alves <palves@redhat.com>
3577 * breakpoint.c (set_breakpoint_location_function): Handle
3579 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3580 * elfread.c (elf_symtab_read): Give data symbols with
3581 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3582 (elf_rel_plt_read): Update comment.
3583 * linespec.c (convert_linespec_to_sals): Handle
3585 (minsym_found): Handle mst_data_gnu_ifunc.
3586 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3587 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3588 * parse.c (find_minsym_type_and_address): Handle
3590 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3591 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3592 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3594 <mst_data_gnu_ifunc>: New enumerator.
3596 2018-04-26 Pedro Alves <palves@redhat.com>
3598 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3599 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3600 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3602 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3603 (lookup_minimal_symbol_by_pc): Adjust.
3604 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3605 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3606 * minsyms.h (lookup_msym_prefer): New enum.
3607 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3608 parameter by a lookup_msym_prefer parameter.
3610 2018-04-26 Pedro Alves <palves@redhat.com>
3612 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3613 ends in "@plt" instead of looking at the symbol's section.
3615 2018-04-26 Pedro Alves <palves@redhat.com>
3617 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3619 (find_pc_partial_function_gnu_ifunc): Rename to ...
3620 (find_pc_partial_function): ... this, and remove references to
3622 (find_pc_partial_function): Delete old implementation.
3623 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3625 2018-04-26 Pedro Alves <palves@redhat.com>
3627 * linespec.c (struct bound_minimal_symbol_search_key): New.
3628 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3629 skip first line if we found a GNU ifunc minimal symbol by name.
3630 (compare_msymbols): Change parameters to work with a destructured
3632 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3635 2018-04-26 Pedro Alves <palves@redhat.com>
3637 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3638 ifunc targets here. Instead, if we have an ifunc minsym, use its
3640 (add_location_to_breakpoint): Store the minsym and the objfile in
3641 the breakpoint location.
3642 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3643 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3644 Record the minsym in the sal.
3645 * symtab.h (symtab_and_line) <msymbol>: New field.
3647 2018-04-26 Pedro Alves <palves@redhat.com>
3649 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3650 unless we actually resolved the ifunc.
3652 2018-04-26 Pedro Alves <palves@redhat.com>
3654 * c-exp.y (variable production): Prefer ifunc minsyms over
3655 regular function symbols.
3656 * symtab.c (find_gnu_ifunc): New function.
3657 * minsyms.h (lookup_msym_prefer): New enum.
3658 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3659 parameter by a lookup_msym_prefer parameter.
3660 * symtab.h (find_gnu_ifunc): New declaration.
3662 2018-04-26 Pedro Alves <palves@redhat.com>
3664 * blockframe.c (find_gnu_ifunc_target_type): New function.
3665 (find_function_type): New.
3666 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3667 return a value with a memory address.
3668 (eval_call): For calls to GNU ifunc functions, try to find the
3669 type of the target function from the type that the resolver
3671 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3673 * infcall.c (find_function_return_type): Delete.
3674 (find_function_addr): Add 'function_type' parameter. For calls to
3675 GNU ifunc functions, try to find the type of the target function
3676 from the type that the resolver returns, and return it via
3678 (call_function_by_hand_dummy): Adjust to use the function type
3679 returned by find_function_addr.
3680 (find_function_addr): Add 'function_type' parameter and move
3682 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3685 2018-04-26 Pedro Alves <palves@redhat.com>
3687 * c-exp.y (variable production): Skip finding an alias for ifunc
3690 2018-04-26 Pedro Alves <palves@redhat.com>
3692 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3694 2018-04-25 Pedro Alves <palves@redhat.com>
3696 * infcmd.c (kill_command): Print the pid as string, not the whole
3697 thread's ptid. Add comment. s/has been killed/killed/ in output
3699 * remote.c (remote_detach_1): Print the pid as string, not the
3700 whole thread's ptid.
3702 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3703 Sergio Durigan Junior <sergiodj@redhat.com>
3704 Pedro Alves <palves@redhat.com>
3706 * infcmd.c (kill_command): Print message when inferior has
3708 * inferior.c (print_inferior_events): Remove 'static'. Set as
3710 (add_inferior): Improve message printed when
3711 'print_inferior_events' is on.
3712 (exit_inferior): Remove message printed when
3713 'print_inferior_events' is on.
3714 (detach_inferior): Improve message printed when
3715 'print_inferior_events' is on.
3716 (initialize_inferiors): Use 'add_inferior_silent' to set
3717 'current_inferior_'.
3718 * inferior.h (print_inferior_events): Declare here as
3720 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3721 '[Detaching...]' messages when 'print_inferior_events' is on.
3722 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3723 as prefix/suffix for messages. Remove periods. Fix erroneous
3724 'Detaching after fork from child...', replace it by '... from
3726 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3727 prefix/suffix when printing 'Detaching...' messages. Print
3728 them when 'print_inferior_events' is on.
3729 * remote.c (remote_detach_1): Print message when detaching
3730 from inferior and '!is_fork_parent'.
3732 2018-04-24 Tom Tromey <tom@tromey.com>
3734 * cli-out.h: Reindent.
3736 2018-04-24 Tom Tromey <tom@tromey.com>
3738 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3739 (cli_ui_out::do_field_string): Use fputs_filtered.
3740 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3742 2018-04-23 Tom Tromey <tom@tromey.com>
3744 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3745 gdb::unique_xmalloc_ptr.
3747 2018-04-23 Tom Tromey <tom@tromey.com>
3749 * configure: Rebuild.
3751 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3754 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3755 prepare_for_testing. Set normal_bp to r_debug_state if target
3758 2018-04-21 Pedro Alves <palves@redhat.com>
3759 Rajendra SY <rajendra.sy@gmail.com>
3761 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3762 * remote.c (extended_remote_attach): In all-stop mode, mark the
3763 thread as executing.
3765 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3767 * thread.c (thread_apply_all_command): Fix comment.
3768 (thread_command): Fix comment.
3770 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3772 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3774 * features/aarch64-core.c (create_feature_aarch64_core):
3776 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3778 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3780 * features/i386/32bit-avx512.c
3781 (create_feature_i386_32bit_avx512): Likewise.
3782 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3784 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3786 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3788 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3790 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3792 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3794 * features/i386/64bit-avx512.c
3795 (create_feature_i386_64bit_avx512): Likewise.
3796 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3798 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3800 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3802 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3804 * features/i386/64bit-segments.c
3805 (create_feature_i386_64bit_segments): Likewise.
3806 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3808 * features/i386/x32-core.c
3809 (create_feature_i386_x32_core): Likewise.
3810 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3811 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3812 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3813 * target-descriptions.c: In generated code, don't pass xml
3816 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3818 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3819 (print_xml_feature::visit_post): Likewise.
3820 (print_xml_feature::visit): Likewise.
3821 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3822 (print_xml_feature): Add new class.
3823 * regformats/regdat.sh: Null xmltarget on feature targets.
3824 * target-descriptions.c (struct target_desc): Add xmltarget.
3825 (maintenance_check_tdesc_xml_convert): Add unittest function.
3826 (tdesc_get_features_xml): Add function to get xml.
3827 (maintenance_check_xml_descriptions): Test xml generation.
3828 * xml-tdesc.c (string_read_description_xml): Add function.
3829 * xml-tdesc.h (string_read_description_xml): Add declaration.
3831 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3833 * features/Makefile: Add feature marker to targets with new style
3834 target descriptions.
3835 * regformats/aarch64.dat: Regenerate.
3836 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3837 * regformats/i386/amd64-avx-linux.dat: Likewise.
3838 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3839 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3840 * regformats/i386/amd64-linux.dat: Likewise.
3841 * regformats/i386/amd64-mpx-linux.dat: Likewise.
3842 * regformats/i386/amd64.dat: Likewise.
3843 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3844 * regformats/i386/i386-avx-linux.dat: Likewise.
3845 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3846 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3847 * regformats/i386/i386-linux.dat: Likewise.
3848 * regformats/i386/i386-mmx-linux.dat: Likewise.
3849 * regformats/i386/i386-mpx-linux.dat: Likewise.
3850 * regformats/i386/i386.dat: Likewise.
3851 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3852 * regformats/i386/x32-avx-linux.dat: Likewise.
3853 * regformats/i386/x32-linux.dat: Likewise.
3854 * regformats/tic6x-c62x-linux.dat: Likewise.
3855 * regformats/tic6x-c64x-linux.dat: Likewise.
3856 * regformats/tic6x-c64xp-linux.dat: Likewise.
3857 * regformats/regdat.sh: Parse feature marker.
3859 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3861 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3862 (tdesc_osabi_name): Likewise.
3863 * target-descriptions.c (tdesc_architecture_name): Add new
3865 (tdesc_osabi_name): Likewise.
3867 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3869 * common/tdesc.c (tdesc_predefined_type): Move to here.
3870 (tdesc_named_type): Likewise.
3871 (tdesc_create_vector): Likewise.
3872 (tdesc_create_struct): Likewise.
3873 (tdesc_set_struct_size): Likewise.
3874 (tdesc_create_union): Likewise.
3875 (tdesc_create_flags): Likewise.
3876 (tdesc_create_enum): Likewise.
3877 (tdesc_add_field): Likewise.
3878 (tdesc_add_typed_bitfield): Likewise.
3879 (tdesc_add_bitfield): Likewise.
3880 (tdesc_add_flag): Likewise.
3881 (tdesc_add_enum_value): Likewise.
3882 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3883 (struct tdesc_type_vector): Likewise.
3884 (struct tdesc_type_field): Likewise.
3885 (struct tdesc_type_with_fields): Likewise.
3886 (tdesc_create_enum): Add declaration.
3887 (tdesc_add_typed_bitfield): Likewise.
3888 (tdesc_add_enum_value): Likewise.
3889 * target-descriptions.c (tdesc_type_field): Move from here.
3890 (tdesc_type_builtin): Likewise.
3891 (tdesc_type_vector): Likewise.
3892 (tdesc_type_with_fields): Likewise.
3893 (tdesc_predefined_types): Likewise.
3894 (tdesc_named_type): Likewise.
3895 (tdesc_create_vector): Likewise.
3896 (tdesc_create_struct): Likewise.
3897 (tdesc_set_struct_size): Likewise.
3898 (tdesc_create_union): Likewise.
3899 (tdesc_create_flags): Likewise.
3900 (tdesc_create_enum): Likewise.
3901 (tdesc_add_field): Likewise.
3902 (tdesc_add_typed_bitfield): Likewise.
3903 (tdesc_add_bitfield): Likewise.
3904 (tdesc_add_flag): Likewise.
3905 (tdesc_add_enum_value): Likewise.
3906 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3907 (tdesc_add_typed_bitfield): Likewise.
3908 (tdesc_add_enum_value): Likewise.
3910 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3912 * common/tdesc.c (tdesc_feature::accept): Move to here.
3913 (tdesc_feature::operator==): Likewise.
3914 (tdesc_create_reg): Likewise.
3915 * common/tdesc.h (tdesc_type_kind): Likewise.
3916 (struct tdesc_type): Likewise.
3917 (struct tdesc_feature): Likewise.
3918 * regformats/regdat.sh: Create a feature.
3919 * target-descriptions.c (tdesc_type_kind): Move from here.
3920 (tdesc_type): Likewise.
3921 (tdesc_type_up): Likewise.
3922 (tdesc_feature): Likewise.
3923 (tdesc_create_reg): Likewise.
3925 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3927 * Makefile.in: Add arch/tdesc.c
3928 * common/tdesc.c: New file.
3929 * common/tdesc.h (tdesc_element_visitor): Move to here.
3930 (tdesc_element): Likewise.
3931 (tdesc_reg): Likewise.
3932 (tdesc_reg_up): Likewise.
3933 * regformats/regdef.h (reg): Add offset to constructors.
3934 * target-descriptions.c (tdesc_element_visitor): Move from here.
3935 (tdesc_element): Likewise.
3936 (tdesc_reg): Likewise.
3937 (tdesc_reg_up): Likewise.
3939 2018-04-17 Tom Tromey <tom@tromey.com>
3941 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3944 2018-04-17 Tom Tromey <tom@tromey.com>
3946 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3948 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
3950 * symtab.c (print_symbol_info): Skip printing filename and line
3951 number when `last' is NULL.
3952 (symtab_symbol_info): Use empty string instead of NULL for first
3953 invocation of print_symbol_info.
3954 (rbreak_command): Pass NULL to `last' parameter of
3957 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
3959 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3962 2018-04-16 Pedro Alves <palves@redhat.com>
3964 * MAINTAINERS (sh): Remove.
3965 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3966 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3967 (ALLDEPFILES): Remove sh64-tdep.c.
3968 * NEWS: Mentions that support for SH-5/SH64 is removed.
3969 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3970 (sh*-*-openbsd*): Ditto.
3971 (sh64-*-elf*): Remove.
3973 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3974 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3975 * sh-tdep.c: No longer include "sh64-tdep.h".
3976 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3977 * sh64-tdep.c, sh64-tdep.h: Remove files.
3979 2018-04-16 Pedro Alves <palves@redhat.com>
3981 * MAINTAINERS: Remove m88k.
3982 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3983 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3984 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3985 * NEWS: Mention that support for m88k was removed.
3986 * configure.host (m88*-*-*): Remove support.
3987 * configure.nat (m88k-*-*): Remove support.
3988 * configure.tgt (m88*-*-openbsd*): Remove.
3989 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3991 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
3993 * configure.tgt (x86_tobjs): New variable.
3994 (amd64_tobjs, i386_tobjs): Use it.
3996 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3998 * symtab.c (print_symbol_info): Precede the symbol definition by
3999 the line number when available.
4000 * NEWS: Advertise this enhancement.
4002 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4004 * NEWS (New options): announce set/show record btrace cpu.
4005 * btrace.c: Include record-btrace.h.
4006 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4007 the vendor is unknown.
4008 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
4009 Maybe overwrite the btrace configuration's cpu.
4010 (btrace_compute_ftrace): Add cpu parameter. Update callers.
4011 (btrace_fetch): Add cpu parameter. Update callers.
4012 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4013 Maybe overwrite the btrace configuration's cpu. Skip enabling
4014 errata workarounds if the vendor is unknown.
4015 * python/py-record-btrace.c: Include record-btrace.h.
4016 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4017 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4018 * record-btrace.c (record_btrace_cpu_state_kind): New.
4019 (record_btrace_cpu): New.
4020 (set_record_btrace_cpu_cmdlist): New.
4021 (record_btrace_get_cpu): New.
4022 (require_btrace_thread, record_btrace_info)
4023 (record_btrace_resume_thread): Call record_btrace_get_cpu.
4024 (cmd_set_record_btrace_cpu_none): New.
4025 (cmd_set_record_btrace_cpu_auto): New.
4026 (cmd_set_record_btrace_cpu): New.
4027 (cmd_show_record_btrace_cpu): New.
4028 (_initialize_record_btrace): Initialize set/show record btrace cpu
4030 * record-btrace.h (record_btrace_get_cpu): New.
4032 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4034 * record.c (set_record_command): Fix typo in message.
4036 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4038 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4040 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4042 * infrun.c (process_event_stop_test): Call
4043 gdbarch_in_indirect_branch_thunk.
4044 * gdbarch.sh (in_indirect_branch_thunk): New.
4045 * gdbarch.c: Regenerated.
4046 * gdbarch.h: Regenerated.
4049 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
4050 (HFILES_NO_SRCDIR): Add x86-tdep.h.
4051 (ALLDEPFILES): Add x86-tdep.c.
4052 * arch-utils.h (default_in_indirect_branch_thunk): New.
4053 * arch-utils.c (default_in_indirect_branch_thunk): New.
4054 * i386-tdep: Include x86-tdep.h.
4055 (i386_in_indirect_branch_thunk): New.
4056 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
4058 * amd64-tdep: Include x86-tdep.h.
4059 (amd64_in_indirect_branch_thunk): New.
4060 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
4062 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4065 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
4066 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
4067 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4070 2018-04-12 Tom Tromey <tom@tromey.com>
4072 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4073 (rust_evaluate_subexp): Likewise.
4075 2018-04-12 Pedro Alves <palves@redhat.com>
4077 * procfs.c (procfs_detach): Make forward declaration's prototype
4078 match definition's protototype.
4079 (proc_get_LDT_entry): Remove stale do_cleanups call.
4081 2018-04-12 Pedro Alves <palves@redhat.com>
4083 * target.h (target_ops::to_has_exited): Delete.
4084 (target_has_exited): Delete.
4085 * target-delegates.c: Regenerate.
4087 2018-04-11 Pedro Alves <palves@redhat.com>
4089 * target.c (fileio_fh_t::t): Add comment.
4090 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4091 (target_fileio_close): Handle a NULL target.
4092 (invalidate_fileio_fh): New.
4093 (target_close): Call it.
4094 * remote.c (remote_hostio_send_command): No longer check whether
4095 remote_desc is open.
4097 2018-04-11 Pedro Alves <palves@redhat.com>
4099 * target.c (fileio_fh_t): Make it a named struct instead of a
4101 (fileio_fh_t::is_closed): New method.
4102 (DEF_VEC_O (fileio_fh_t)): Remove.
4103 (fileio_fhandles): Now a std::vector.
4104 (is_closed_fileio_fh): Delete.
4105 (acquire_fileio_fd): Adjust. Rename parameters.
4106 (release_fileio_fd): Adjust.
4107 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4108 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4109 (target_fileio_close): Adjust.
4111 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4113 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4116 2018-04-10 Pedro Alves <palves@redhat.com>
4118 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4119 (scoped_finish_thread_state): New class.
4120 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4122 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4123 (fetch_inferior_event, normal_stop): Likewise.
4124 * thread.c (finish_thread_state_cleanup): Delete.
4126 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4127 Pedro Alves <palves@redhat.com>
4129 * value.c: Include "selftest.h" and "common/array-view.h".
4130 (struct range) <operator ==>: New.
4131 (test_ranges_contain): New.
4132 (check_ranges_vector): New.
4133 (test_insert_into_bit_range_vector): New.
4134 (_initialize_values): Register selftests.
4135 * common/array-view.h (operator==, operator!=): New.
4137 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4139 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4141 * inline-frame.c: Include <algorithm>.
4142 (struct inline_state): Add constructor.
4143 (inline_state_s): Remove.
4144 (DEF_VEC_O(inline_state_s)): Remove.
4145 (inline_states): Change type to std::vector.
4146 (find_inline_frame_state): Adjust to std::vector.
4147 (allocate_inline_frame_state): Remove.
4148 (clear_inline_frame_state): Adjust to std::vector.
4149 (skip_inline_frames): Adjust to std::vector.
4151 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4153 * tracepoint.h (struct trace_state_variable): Add constructor.
4154 <name>: Change type to std::string.
4155 * tracepoint.c (tsv_s): Remove.
4156 (DEF_VEC_O(tsv_s)): Remove.
4157 (tvariables): Change to std::vector.
4158 (create_trace_state_variable): Adjust to std::vector.
4159 (find_trace_state_variable): Likewise.
4160 (find_trace_state_variable_by_number): Likewise.
4161 (delete_trace_state_variable): Likewise.
4162 (trace_variable_command): Adjust to std::string.
4163 (delete_trace_variable_command): Likewise.
4164 (tvariables_info_1): Adjust to std::vector.
4165 (save_trace_state_variables): Likewise.
4166 (start_tracing): Likewise.
4167 (merge_uploaded_trace_state_variables): Adjust to std::vector
4169 * target.h (struct target_ops)
4170 <to_download_trace_state_variable>: Pass reference to
4171 trace_state_variable.
4172 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4173 * target-delegates.c: Re-generate.
4174 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4175 (mi_tsv_deleted): Likewise.
4176 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4177 * remote.c (remote_download_trace_state_variable): Change
4178 pointer to reference and adjust.
4179 * make-target-delegates (parse_argtypes): Handle references.
4180 (write_function_header): Likewise.
4181 (munge_type): Likewise.
4183 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4185 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4186 string_view-selftests.c.
4187 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4189 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4190 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4191 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4192 * unittests/basic_string_view/element_access/char/1.cc:
4194 * unittests/basic_string_view/element_access/char/empty.cc:
4196 * unittests/basic_string_view/element_access/char/front_back.cc:
4198 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4199 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4201 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4203 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4205 * unittests/basic_string_view/operations/compare/char/1.cc:
4207 * unittests/basic_string_view/operations/compare/char/13650.cc:
4209 * unittests/basic_string_view/operations/copy/char/1.cc:
4211 * unittests/basic_string_view/operations/data/char/1.cc:
4213 * unittests/basic_string_view/operations/find/char/1.cc:
4215 * unittests/basic_string_view/operations/find/char/2.cc:
4217 * unittests/basic_string_view/operations/find/char/3.cc:
4219 * unittests/basic_string_view/operations/find/char/4.cc:
4221 * unittests/basic_string_view/operations/rfind/char/1.cc:
4223 * unittests/basic_string_view/operations/rfind/char/2.cc:
4225 * unittests/basic_string_view/operations/rfind/char/3.cc:
4227 * unittests/basic_string_view/operations/substr/char/1.cc:
4229 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4230 * unittests/string_view-selftests.c: New file.
4232 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4234 * unittests/basic_string_view/capacity/1.cc: New file.
4235 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4236 * unittests/basic_string_view/cons/char/1.cc: New file.
4237 * unittests/basic_string_view/cons/char/2.cc: New file.
4238 * unittests/basic_string_view/cons/char/3.cc: New file.
4239 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4240 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4241 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4242 * unittests/basic_string_view/element_access/char/1.cc: New file.
4243 * unittests/basic_string_view/element_access/char/2.cc: New file.
4244 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4245 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4246 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4247 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4248 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4249 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4250 * unittests/basic_string_view/include.cc: New file.
4251 * unittests/basic_string_view/inserters/char/1.cc: New file.
4252 * unittests/basic_string_view/inserters/char/2.cc: New file.
4253 * unittests/basic_string_view/inserters/char/3.cc: New file.
4254 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4255 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4256 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4257 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4258 * unittests/basic_string_view/literals/types.cc: New file.
4259 * unittests/basic_string_view/literals/values.cc: New file.
4260 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4261 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4262 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4263 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4264 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4265 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4266 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4267 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4268 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4269 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4270 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4271 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4272 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4273 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4274 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4275 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4276 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4277 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4278 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4279 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4280 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4281 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4282 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4283 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4284 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4285 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4286 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4287 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4288 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4289 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4290 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4291 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4292 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4293 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4294 * unittests/basic_string_view/operators/char/2.cc: New file.
4295 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4296 * unittests/basic_string_view/range_access/char/1.cc: New file.
4297 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4298 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4299 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4300 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4301 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4302 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4303 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4304 * unittests/basic_string_view/typedefs.cc: New file.
4305 * unittests/basic_string_view/types/1.cc: New file.
4307 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4309 * common/gdb_string_view.h: Remove libstdc++ implementation
4310 details, adjust to gdb reality.
4311 * common/gdb_string_view.tcc: Likewise.
4312 * cli/cli-script.c (struct string_view): Remove.
4313 (user_args) <m_args>: Change element type to gdb::string_view.
4314 (user_args::insert_args): Adjust.
4316 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4318 * common/gdb_string_view.h: New file.
4319 * common/gdb_string_view.tcc: New file.
4321 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4323 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4324 * configure: Re-generate.
4326 2018-04-09 Pedro Alves <palves@redhat.com>
4328 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4329 (set_target_gdbarch): Call
4330 gdb::observers::architecture_changed.notify instead of
4331 observer_notify_architecture_changed.
4333 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4335 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4336 (do_restore_current_traceframe_cleanup): Remove.
4337 (restore_current_traceframe_cleanup_dtor): Remove.
4338 (make_cleanup_restore_current_traceframe): Remove.
4339 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4341 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4342 * infrun.c (fetch_inferior_event): Use
4343 scoped_restore_current_traceframe.
4345 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4347 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4349 <n_allocated_type_units>: Remove.
4350 <all_type_units>: Change to std::vector.
4351 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4352 to std::vector change.
4353 (dwarf2_per_objfile::get_cutu): Likewise.
4354 (dwarf2_per_objfile::get_tu): Likewise.
4355 (create_signatured_type_table_from_index): Likewise.
4356 (create_signatured_type_table_from_debug_names): Likewise.
4357 (dw2_symtab_iter_next): Likewise.
4358 (dw2_print_stats): Likewise.
4359 (dw2_expand_all_symtabs): Likewise.
4360 (dw2_expand_marked_cus): Likewise.
4361 (dw2_debug_names_iterator::next): Likewise.
4362 (dwarf2_initialize_objfile): Likewise.
4363 (add_signatured_type_cu_to_table): Likewise.
4364 (create_all_type_units): Likewise.
4365 (add_type_unit): Likewise.
4366 (struct tu_abbrev_offset): Add constructor.
4367 (build_type_psymtabs_1): Adjust to std::vector change.
4368 (print_tu_stats): Likewise.
4369 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4370 (write_debug_names): Likewise.
4372 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4374 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4375 Make an std::vector.
4376 <n_comp_units>: Remove.
4377 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4378 to std::vector change.
4379 (dwarf2_per_objfile::get_cutu): Likewise.
4380 (dwarf2_per_objfile::get_cu): Likewise.
4381 (create_cus_from_index): Likewise.
4382 (create_addrmap_from_index): Likewise.
4383 (create_addrmap_from_aranges): Likewise.
4384 (dwarf2_read_index): Likewise.
4385 (dw2_find_last_source_symtab): Likewise.
4386 (dw2_map_symtabs_matching_filename): Likewise.
4387 (dw2_symtab_iter_next): Likewise.
4388 (dw2_print_stats): Likewise.
4389 (dw2_expand_all_symtabs): Likewise.
4390 (dw2_expand_symtabs_with_fullname): Likewise.
4391 (dw2_expand_marked_cus): Likewise.
4392 (dw2_map_symbol_filenames): Likewise.
4393 (create_cus_from_debug_names): Likewise.
4394 (dwarf2_read_debug_names): Likewise.
4395 (dw2_debug_names_iterator::next): Likewise.
4396 (dwarf2_initialize_objfile): Likewise.
4397 (set_partial_user): Likewise.
4398 (dwarf2_build_psymtabs_hard): Likewise.
4399 (read_comp_units_from_section): Remove arguments, adjust to
4401 (create_all_comp_units): Adjust to std::vector and
4402 read_comp_units_from_section changes.
4403 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4405 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4406 (psyms_seen_size): Likewise.
4407 (write_gdbindex): Likewise.
4408 (write_debug_names): Likewise.
4410 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4412 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4413 with dwarf2_per_objfile.
4414 (create_cus_from_index): Likewise.
4415 (create_signatured_type_table_from_index): Likewise.
4416 (dwarf2_read_index): Likewise.
4417 (dwarf2_initialize_objfile): Likewise.
4418 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4419 per_cu rather than get_dwarf2_per_objfile.
4421 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4423 * dwarf2read.h (struct signatured_type): Forward declare.
4424 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4426 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4427 (dw2_get_cutu): ...this.
4428 (dwarf2_per_objfile::get_cu): Rename from...
4429 (dw2_get_cu): ...this.
4430 (dwarf2_per_objfile::get_tu): New.
4431 (create_addrmap_from_index): Adjust.
4432 (create_addrmap_from_aranges): Adjust.
4433 (dw2_find_last_source_symtab): Adjust.
4434 (dw2_map_symtabs_matching_filename): Adjust.
4435 (dw2_symtab_iter_next): Adjust.
4436 (dw2_print_stats): Adjust.
4437 (dw2_expand_all_symtabs): Adjust.
4438 (dw2_expand_symtabs_with_fullname): Adjust.
4439 (dw2_expand_marked_cus): Adjust.
4440 (dw_expand_symtabs_matching_file_matcher): Adjust.
4441 (dw2_map_symbol_filenames): Adjust.
4442 (dw2_debug_names_iterator::next): Adjust.
4443 (dwarf2_initialize_objfile): Adjust.
4444 (set_partial_user): Adjust.
4445 (dwarf2_build_psymtabs_hard): Adjust.
4447 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4449 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4450 Remove unused variables.
4451 (dw2_map_symtabs_matching_filename): Likewise.
4452 (dwarf2_record_block_ranges): Likewise.
4453 (dwarf2_read_addr_index): Likewise.
4454 (follow_die_offset): Likewise.
4456 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4458 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4459 to symbol_file_add_main.
4461 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4464 * mi/mi-console.c (do_fputc_async_safe): New.
4465 (mi_console_file::write_async_safe): New.
4466 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4467 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4469 * ui-file.c (ui_file::putstrn): Adjust call to
4470 fputstrn_unfiltered.
4471 * utils.c (printchar): Replace do_fputs and do_fprintf
4472 parameters by do_fputc.
4473 (fputstr_filtered): Adjust call to printchar.
4474 (fputstr_unfiltered): Likewise.
4475 (fputstrn_filtered): Likewise.
4476 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4478 * utils.h (do_fputc_ftype): New typedef.
4479 (fputstrn_unfiltered): Add do_fputc parameter.
4481 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4483 * regformats/i386/i386-avx.dat: Remove.
4485 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4488 * amd64-tdep.c (amd64_none_init_abi): New function.
4489 (amd64_x32_none_init_abi): New function.
4490 (_initialize_amd64_tdep): Register handlers for x86-64 and
4491 x64_32 with GDB_OSABI_NONE.
4492 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4493 GDB_OSABI_NONE osabi.
4495 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4498 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4500 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4501 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4503 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4505 * common/byte-vector.h (char_vector): New type.
4506 * target.h (target_read_alloc): Return
4507 gdb::optional<byte_vector>.
4508 (target_read_stralloc): Return gdb::optional<char_vector>.
4509 (target_get_osdata): Return gdb::optional<char_vector>.
4510 * target.c (target_read_alloc_1): Templatize. Replacement
4511 manual memory management with vector.
4512 (target_read_alloc): Change return type, adjust.
4513 (target_read_stralloc): Change return type, adjust.
4514 (target_get_osdata): Change return type, adjust.
4515 * auxv.c (struct auxv_info) <length>: Remove.
4516 <data>: Change type to gdb::optional<byte_vector>.
4517 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4518 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4519 (target_auxv_search): Adjust.
4520 (fprint_target_auxv): Adjust.
4521 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4522 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4523 (linux_make_corefile_notes): Adjust.
4524 * osdata.c (get_osdata): Adjust.
4525 * remote.c (remote_get_threads_with_qxfer): Adjust.
4526 (remote_memory_map): Adjust.
4527 (remote_traceframe_info): Adjust.
4528 (btrace_read_config): Adjust.
4529 (remote_read_btrace): Adjust.
4530 (remote_pid_to_exec_file): Adjust.
4531 * solib-aix.c (solib_aix_get_library_list): Adjust.
4532 * solib-dsbt.c (decode_loadmap): Don't free buf.
4533 (dsbt_get_initial_loadmaps): Adjust.
4534 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4535 * solib-target.c (solib_target_current_sos): Adjust.
4536 * tracepoint.c (sdata_make_value): Adjust.
4537 * xml-support.c (xinclude_start_include): Adjust.
4538 (xml_fetch_content_from_file): Adjust.
4539 * xml-support.h (xml_fetch_another): Change return type.
4540 (xml_fetch_content_from_file): Change return type.
4541 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4542 * xml-tdesc.c (file_read_description_xml): Adjust.
4543 (fetch_available_features_from_target): Change return type.
4544 (target_fetch_description_xml): Adjust.
4545 (target_read_description_xml): Adjust.
4547 2018-04-06 Tom Tromey <tom@tromey.com>
4549 * value.c (~value): Update.
4550 (struct value) <contents>: Now unique_xmalloc_ptr.
4551 (value_contents_bits_eq, allocate_value_contents)
4552 (value_contents_raw, value_contents_all_raw)
4553 (value_contents_for_printing, value_contents_for_printing_const)
4554 (set_value_enclosing_type): Update.
4556 2018-04-06 Tom Tromey <tom@tromey.com>
4558 * value.c (range_s): Remove typedef, VEC.
4559 (struct range): Add operator<.
4560 (range_lessthan): Remove.
4561 (ranges_contain): Change type.
4563 (struct value) <unavailable, optimized_out>: Now std::vector.
4564 (value_entirely_available)
4565 (value_entirely_covered_by_range_vector)
4566 (value_entirely_unavailable, value_entirely_optimized_out):
4568 (insert_into_bit_range_vector): Change argument type.
4569 (find_first_range_overlap): Likewise.
4570 (struct ranges_and_idx, value_contents_bits_eq)
4571 (require_not_optimized_out, require_available): Update.
4572 (ranges_copy_adjusted): Change argument types.
4573 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4575 2018-04-06 Tom Tromey <tom@tromey.com>
4577 * value.c (~value): Update.
4578 (struct value) <parent>: Now a value_ref_ptr.
4579 (value_parent, set_value_parent, value_address, value_copy):
4582 2018-04-06 Tom Tromey <tom@tromey.com>
4584 * value.c (struct value): Add constructor, destructor, and member
4586 (allocate_value_lazy, value_decref): Update.
4588 2018-04-06 Tom Tromey <tom@tromey.com>
4590 * value.c (struct value) <released, next>: Remove.
4591 (all_values): Now a std::vector.
4592 (allocate_value_lazy): Update.
4593 (value_next): Remove.
4594 (value_mark, value_free_to_mark, release_value)
4595 (value_release_to_mark): Update.
4597 2018-04-06 Tom Tromey <tom@tromey.com>
4599 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4600 (free_value_chain): Remove.
4601 * value.c (free_value_chain): Remove.
4602 (value_release_to_mark): Return a std::vector.
4603 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4605 (check_condition): Update.
4606 * eval.c (fetch_subexp_value): Change "val_chain" to a
4608 * breakpoint.c (update_watchpoint): Update.
4609 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4611 2018-04-06 Tom Tromey <tom@tromey.com>
4613 * value.h (free_all_values): Remove.
4614 * value.c (free_all_values): Remove.
4616 2018-04-06 Tom Tromey <tom@tromey.com>
4618 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4619 (value_history_chain, value_history_count): Remove.
4620 (value_history): New global.
4621 (record_latest_value, access_value_history, show_values)
4622 (preserve_values): Update.
4624 2018-04-06 Tom Tromey <tom@tromey.com>
4626 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4627 * varobj.c (varobj_set_display_format, varobj_set_value)
4628 (install_default_visualizer, construct_visualizer)
4629 (install_new_value, ~varobj, varobj_get_value_type)
4630 (my_value_of_variable, varobj_editable_p): Update.
4631 * c-varobj.c (c_describe_child, c_value_of_variable)
4632 (cplus_number_of_children, cplus_describe_child): Update.
4633 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4634 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4635 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4637 2018-04-06 Tom Tromey <tom@tromey.com>
4639 * printcmd.c (last_examine_address): Change type to
4641 (do_examine, x_command): Update.
4643 2018-04-06 Tom Tromey <tom@tromey.com>
4645 * value.c (release_value): Update.
4646 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4647 (struct bpstats) <val>: Now a value_ref_ptr.
4648 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4649 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4650 (~watchpoint, print_it_watchpoint, watch_command_1)
4651 (invalidate_bp_value_on_memory_change): Update.
4653 2018-04-06 Tom Tromey <tom@tromey.com>
4655 * varobj.c (varobj_clear_saved_item)
4656 (update_dynamic_varobj_children, install_new_value, ~varobj):
4658 * value.h (value_incref): Move declaration earlier.
4659 (value_decref): Rename from value_free.
4660 (struct value_ref_policy): New.
4661 (value_ref_ptr): New typedef.
4662 (struct value_deleter): Remove.
4663 (gdb_value_up): Remove typedef.
4664 (release_value): Change return type.
4665 (release_value_or_incref): Remove.
4666 * value.c (set_value_parent): Update.
4667 (value_incref): Change return type.
4668 (value_decref): Rename from value_free.
4669 (value_free_to_mark, free_all_values, free_value_chain): Update.
4670 (release_value): Return value_ref_ptr.
4671 (release_value_or_incref): Remove.
4672 (record_latest_value, set_internalvar, clear_internalvar):
4674 * stack.c (info_frame_command): Don't call value_free.
4675 * python/py-value.c (valpy_dealloc, valpy_new)
4676 (value_to_value_object): Update.
4677 * printcmd.c (do_examine): Update.
4678 * opencl-lang.c (lval_func_free_closure): Update.
4679 * mi/mi-main.c (register_changed_p): Don't call value_free.
4680 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4681 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4682 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4684 * guile/scm-value.c (vlscm_free_value_smob)
4685 (vlscm_scm_from_value): Update.
4686 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4687 (frame_unwind_register_unsigned, get_frame_register_bytes)
4688 (put_frame_register_bytes): Don't call value_free.
4689 * findvar.c (address_from_register): Don't call value_free.
4690 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4691 * dwarf2loc.c (entry_data_value_free_closure)
4692 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4693 (dwarf2_evaluate_loc_desc_full): Update.
4694 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4695 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4696 (~watchpoint, watch_command_1)
4697 (invalidate_bp_value_on_memory_change): Update.
4698 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4700 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4703 * warning.m4: Add -Wno-error=deprecated-register.
4704 * configure: Re-generate.
4706 2018-04-05 Tom Tromey <tom@tromey.com>
4708 * linespec.h: Remove include of "vec.h".
4710 2018-04-05 Tom Tromey <tom@tromey.com>
4712 * linespec.c (typep): Remove typedef.
4713 (find_methods, find_superclass_methods): Take a std::vector.
4714 (find_method): Use std::vector.
4716 2018-04-05 Tom Tromey <tom@tromey.com>
4718 * utils.c (compare_strings): Remove.
4719 * utils.h (compare_strings): Remove.
4720 * objc-lang.h (find_imps): Update.
4721 * objc-lang.c (find_methods): Take a std::vector.
4722 (uniquify_strings, find_imps): Likewise.
4723 * linespec.c (find_methods): Take a std::vector.
4724 (decode_objc): Use std::vector.
4725 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4727 (find_method, find_function_symbols): Use std::vector.
4729 2018-04-05 Tom Tromey <tom@tromey.com>
4731 * completer.c (completion_tracker::completion_tracker): Remove
4733 (completion_tracker::discard_completions): Likewise.
4734 * breakpoint.c (ambiguous_names_p): Remove cast.
4735 * ada-lang.c (_initialize_ada_language): Remove cast.
4736 * utils.h (streq): Update.
4737 (streq_hash): Add new declaration.
4738 * utils.c (streq): Return bool.
4739 (streq_hash): New function.
4741 2018-04-05 Tom Tromey <tom@tromey.com>
4743 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4744 Remove a string copy.
4746 2018-04-05 Tom Tromey <tom@tromey.com>
4748 * linespec.c (filter_results): Use std::vector.
4749 (decode_line_2, decode_line_full): Update.
4751 2018-04-05 Tom Tromey <tom@tromey.com>
4753 * linespec.c (canonical_to_fullform): Return std::string.
4754 (filter_results): Update.
4755 (struct decode_line_2_item): Add constructor.
4756 <fullform, displayform>: Now std::string.
4757 (decode_line_2_compare_items): Now a std::sort comparator.
4758 (decode_line_2): Update.
4760 2018-04-05 Tom Tromey <tom@tromey.com>
4762 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4763 (unexpected_linespec_error): Update.
4764 (linespec_parse_basic, parse_linespec): Update.
4766 2018-04-05 Tom Tromey <tom@tromey.com>
4768 * linespec.c (linespec_parse_basic): Reindent.
4770 2018-04-05 Tom Tromey <tom@tromey.com>
4772 * minsyms.h (iterate_over_minimal_symbols): Update.
4773 * minsyms.c (iterate_over_minimal_symbols): Take a
4775 * linespec.c (struct collect_minsyms): Remove.
4776 (compare_msyms): Now a std::sort comparator.
4777 (add_minsym): Add parameters.
4778 (search_minsyms_for_name): Update. Use std::vector.
4780 2018-04-03 Tom Tromey <tom@tromey.com>
4782 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4785 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4787 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4789 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4792 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
4793 printing static type.
4795 2018-04-01 Tom Tromey <tom@tromey.com>
4797 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4798 (rs6000_xfer_shared_libraries): Update.
4800 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
4802 * common/gdb_vecs.h (char_ptr): Remove.
4803 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4805 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4807 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4809 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4811 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4813 * tracepoint.h (struct uploaded_tp): Initialize fields.
4814 <actions, step_actions, cmd_strings>: Change type to
4815 std::vector<char *>.
4816 * tracepoint.c (get_uploaded_tp): Allocate with new.
4817 (free_uploaded_tps): Free with delete.
4818 (parse_tracepoint_definition): Adjust to std::vector change.
4819 * breakpoint.c (read_uploaded_action): Likewise.
4820 (create_tracepoint_from_upload): Likewise.
4821 * ctf.c (ctf_write_uploaded_tp): Likewise.
4822 (SET_ARRAY_FIELD): Likewise.
4823 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4825 2018-03-30 Tom Tromey <tom@tromey.com>
4827 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
4829 (svr4_keep_data_in_core): Update.
4830 (svr4_read_so_list): Update.
4832 2018-03-30 Tom Tromey <tom@tromey.com>
4834 * windows-nat.c (handle_output_debug_string, handle_exception):
4836 * target.h (target_read_string): Update.
4837 * target.c (target_read_string): Change "string" to
4839 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4841 * solib-frv.c (frv_current_sos): Update.
4842 * solib-dsbt.c (dsbt_current_sos): Update.
4843 * solib-darwin.c (darwin_current_sos): Update.
4844 * linux-thread-db.c (inferior_has_bug): Update.
4845 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4846 Update. Remove alloca.
4847 * ada-lang.c (ada_main_name): Update.
4849 2018-03-30 Tom Tromey <tom@tromey.com>
4851 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4852 (struct dwo_file_deleter): New.
4853 (dwo_file_up): New typedef.
4854 (open_and_init_dwo_file): Use dwo_file_up.
4855 (free_dwo_file_cleanup): Remove.
4857 2018-03-30 Tom Tromey <tom@tromey.com>
4859 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4860 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4862 2018-03-30 Tom Tromey <tom@tromey.com>
4864 * dwarf2read.c (class free_cached_comp_units): New class.
4865 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4866 (free_cached_comp_units): Remove function.
4868 2018-03-30 Tom Tromey <tom@tromey.com>
4870 * utils.h (make_cleanup_unpush_target): Remove.
4871 * inf-ptrace.c (struct target_unpusher): New.
4872 (target_unpush_up) New typedef.
4873 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4875 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4877 2018-03-27 Tom Tromey <tom@tromey.com>
4879 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4881 2018-03-27 Pedro Alves <palves@redhat.com>
4882 Tom Tromey <tom@tromey.com>
4884 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4885 destructor. Now a class.
4886 (gdb_readline_wrapper_cleanup): Remove function.
4887 (gdb_readline_wrapper): Remove cleanups.
4889 2018-03-27 Tom Tromey <tom@tromey.com>
4891 * typeprint.h (struct type_print_options) <local_typedefs,
4892 global_typedefs>: Remove "struct" keyword.
4893 (class typedef_hash_table): New class.
4894 (recursively_update_typedef_hash, add_template_parameters)
4895 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4896 (find_typedef_in_hash): Don't declare.
4897 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4898 (typedef_hash_table::recursively_update): Rename from
4899 recursively_update_typedef_hash. Now a member.
4900 (typedef_hash_table::add_template_parameters): Rename from
4901 add_template_parameters. Now a member.
4902 (typedef_hash_table::typedef_hash_table): Now a constructor;
4903 rename from create_typedef_hash.
4904 (typedef_hash_table::~typedef_hash_table): Now a destructor;
4905 rename from free_typedef_hash.
4906 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4907 (do_free_global_table): Remove.
4908 (typedef_hash_table::typedef_hash_table): New constructor; renamed
4909 from copy_type_recursive.
4910 (create_global_typedef_table): Remove.
4911 (typedef_hash_table::find_global_typedef): Now a member of
4913 (typedef_hash_table::find_typedef): Rename from
4914 find_typedef_in_hash; now a member.
4915 (whatis_exp): Update.
4916 * extension.h (struct ext_lang_type_printers): Add constructor and
4918 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4920 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4921 Now a constructor; rename from start_ext_lang_type_printers.
4922 (ext_lang_type_printers): Now a destructor; rename from
4923 free_ext_lang_type_printers.
4924 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4926 (c_type_print_base_struct_union): Update. Remove cleanups.
4928 2018-03-27 Tom Tromey <tom@tromey.com>
4930 * dwarf-index-write.c: Include <cmath>.
4932 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4934 * NEWS: Add entry describing new "set|show varsize-limit" command.
4935 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4937 * printcmd.c (_initialize_printcmd): Add "set var" alias of
4940 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
4942 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4944 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4945 * dwarf-index-common.c: New file.
4946 * dwarf-index-common.h: New file.
4947 * dwarf-index-write.c: New file.
4948 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4949 (struct dwarf2_section_info): Move from here.
4950 (dwarf2_section_info_def): Likewise.
4951 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4952 (offset_type): Likewise.
4953 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4954 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4955 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4956 (byte_swap): Likewise.
4957 (MAYBE_SWAP): Likewise.
4958 (dwarf2_per_cu_ptr): Likewise.
4959 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4960 (struct tu_stats): Likewise.
4961 (struct dwarf2_per_objfile): Likewise.
4962 (struct dwarf2_per_cu_data): Likewise.
4963 (struct signatured_type): Likewise.
4964 (sig_type_ptr): Likewise.
4965 (DEF_VEC_P (sig_type_ptr)): Likewise.
4966 (INDEX4_SUFFIX): Likewise.
4967 (INDEX5_SUFFIX): Likewise.
4968 (DEBUG_STR_SUFFIX): Likewise.
4969 (dwarf2_read_section): Make non-static.
4970 (mapped_index_string_hash): Move from here.
4971 (dwarf5_djb_hash): Likewise.
4972 (file_write): Likewise.
4973 (class data_buf): Likewise.
4974 (struct symtab_index_entry): Likewise.
4975 (struct mapped_symtab): Likewise.
4976 (find_slot): Likewise.
4977 (hash_expand): Likewise.
4978 (add_index_entry): Likewise.
4979 (uniquify_cu_indices): Likewise.
4980 (class c_str_view): Likewise.
4981 (class c_str_view_hasher): Likewise.
4982 (class vector_hasher): Likewise.
4983 (write_hash_table): Likewise.
4984 (psym_index_map): Likewise.
4985 (struct addrmap_index_data): Likewise.
4986 (add_address_entry): Likewise.
4987 (add_address_entry_worker): Likewise.
4988 (write_address_map): Likewise.
4989 (symbol_kind): Likewise.
4990 (write_psymbols): Likewise.
4991 (struct signatured_type_index_data): Likewise.
4992 (write_one_signatured_type): Likewise.
4993 (recursively_count_psymbols): Likewise.
4994 (recursively_write_psymbols): Likewise.
4995 (class debug_names): Likewise.
4996 (check_dwarf64_offsets): Likewise.
4997 (psyms_seen_size): Likewise.
4998 (write_gdbindex): Likewise.
4999 (write_debug_names): Likewise.
5000 (assert_file_size): Likewise.
5001 (write_psymtabs_to_index): Likewise.
5002 (save_gdb_index_command): Likewise.
5003 (_initialize_dwarf2_read): Don't register the "save gdb-index"
5005 * dwarf2read.h: New file.
5007 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5010 * dwarf2read.c (dwarf2_physname): Do not return the demangled
5011 symbol name if the CU's language stores symbol names in linkage
5013 * language.h (struct language_defn)
5014 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
5015 all instances of this struct.
5017 2018-03-26 Tom Tromey <tom@tromey.com>
5019 * stack.c (backtrace_command_1): Remove verbose code.
5021 2018-03-26 Tom Tromey <tom@tromey.com>
5023 * python/py-framefilter.c (py_print_type): Don't catch
5024 exceptions. Return void.
5025 (py_print_value): Likewise.
5026 (py_print_single_arg): Likewise.
5027 (enumerate_args): Don't catch exceptions.
5028 (py_print_args): Likewise.
5029 (py_print_frame): Likewise.
5030 (gdbpy_apply_frame_filter): Catch exceptions here.
5032 2018-03-26 Tom Tromey <tom@tromey.com>
5034 * stack.c (_initialize_stack): Remove trailing newlines from help
5035 text. Add "Usage" line to "backtrace" help.
5037 2018-03-26 Tom Tromey <tom@tromey.com>
5040 * python/py-framefilter.c (py_print_args): Call wrap_hint.
5042 2018-03-26 Tom Tromey <tom@tromey.com>
5044 * python/py-framefilter.c (py_print_single_arg): Return
5045 EXT_LANG_BT_ERROR from catch.
5047 2018-03-26 Tom Tromey <tom@tromey.com>
5050 * stack.c (backtrace_command_1): Move some code into no-filters
5053 2018-03-26 Tom Tromey <tom@tromey.com>
5055 * python/py-framefilter.c (throw_quit_or_print_exception): New
5057 (gdbpy_apply_frame_filter): Use it.
5059 2018-03-26 Tom Tromey <tom@tromey.com>
5062 * python/py-framefilter.c (py_print_type, py_print_value)
5063 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
5066 2018-03-26 Tom Tromey <tom@tromey.com>
5068 * python/py-framefilter.c (enumerate_args): Use
5069 gdb::unique_xmalloc_ptr.
5071 2018-03-26 Tom Tromey <tom@tromey.com>
5073 * python/py-framefilter.c (py_print_frame): Return
5075 (gdbpy_apply_frame_filter): Update comment.
5076 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5078 <EXT_LANG_BT_NO_FILTERS>: Change value.
5080 2018-03-26 Tom Tromey <tom@tromey.com>
5083 * stack.c (backtrace_command): Parse "hide" argument.
5084 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5085 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5088 2018-03-26 Tom Tromey <tom@tromey.com>
5090 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5092 (backtrace_command): Remove "fulltrace", add "flags".
5094 2018-03-26 Tom Tromey <tom@tromey.com>
5096 * stack.c (backtrace_command): Rewrite command line parsing.
5098 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5100 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5102 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5104 * filename-seen-cache.h: Add include guard.
5106 2018-03-26 Keith Seitz <keiths@redhat.com>
5108 * symfile.c (place_section): Remove "struct" from section_addr_info
5110 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5111 "struct" keyword from section_addr_info.
5113 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5115 * regformats/regdef.h (reg): Add constructors.
5117 2018-03-25 Pedro Alves <palves@redhat.com>
5119 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5120 if then/else bodies in var_func_name extraction.
5122 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5124 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5125 lookup_minimal_symbol() to find symbol entry.
5126 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5128 2018-03-23 Keith Seitz <keiths@redhat.com>
5131 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5132 nested type definitions for C++, too.
5134 2018-03-23 Tom Tromey <tom@tromey.com>
5136 * machoread.c (struct oso_el): Add a constructor. Don't define as
5138 (macho_register_oso): Remove.
5139 (macho_symtab_read): Take a std::vector.
5140 (oso_el_compare_name): Now a std::sort comparator.
5141 (macho_symfile_read_all_oso): Take a std::vector.
5142 (macho_symfile_read): Use std::vector. Remove cleanups.
5144 2018-03-22 Tom Tromey <tom@tromey.com>
5146 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5147 (record_full_goto_bookmark): Use std::string.
5149 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5152 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5155 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5157 * rs6000-tdep.c (store_insn_p): New function.
5158 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5159 and cr_reg to their unshifted values. Use store_insn_p to
5160 match LR saves using either R1 or fdata->alloca_reg. Use
5161 store_insn_p to match CR saves. Set alloca_reg_offset
5162 when alloca_reg and framep are set. Remove lr_reg shift
5163 when assigning to fdata->lr_register.
5165 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5167 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5168 command line args instead of emitting a warning.
5170 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5172 * tracepoint.h (struct static_tracepoint_marker): Initialize
5173 fields, define default constructor, move constructor and move
5174 assignment, disable the rest.
5175 <str_id, extra>: Make std::string.
5176 (release_static_tracepoint_marker): Remove.
5177 (free_current_marker): Remove.
5178 * tracepoint.c (free_current_marker): Remove.
5179 (parse_static_tracepoint_marker_definition): Adjust to
5180 std::string, use new hex2str overload.
5181 (release_static_tracepoint_marker): Remove.
5182 (print_one_static_tracepoint_marker): Get marker by reference
5183 and adjust to std::string.
5184 (info_static_tracepoint_markers_command): Adjust to std::vector
5186 * target.h (static_tracepoint_marker_p): Remove typedef.
5187 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5188 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5190 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5192 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5193 (target_debug_print_std_vector_static_tracepoint_marker): New.
5194 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5196 (target_debug_print_static_tracepoint_marker_p): ... this.
5197 * target-delegates.c: Re-generate.
5198 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5200 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5201 (decode_static_tracepoint_spec): Adjust to std::vector.
5202 (tracepoint_print_one_detail): Adjust to std::string.
5203 (strace_marker_decode_location): Adjust to std::string.
5204 (update_static_tracepoint): Adjust to std::string, remove call
5205 to release_static_tracepoint_marker.
5206 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5207 Adjust to std::vector.
5208 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5209 (remote_static_tracepoint_markers_by_strid): Adjust to
5211 * common/rsp-low.h (hex2str): New overload with explicit count
5213 * common/rsp-low.c (hex2str): New overload with explicit count
5215 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5216 (_initialize_rsp_low_selftests): Add test_hex2str test.
5217 * unittests/tracepoint-selftests.c
5218 (test_parse_static_tracepoint_marker_definition): Adjust to
5221 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5223 * tracepoint.c (parse_static_tracepoint_marker_definition):
5224 Consider case where the definition is followed by more
5226 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5227 tracepoint-selftests.c.
5228 * unittests/tracepoint-selftests.c: New.
5230 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5232 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5235 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5237 * symtab.c (find_pc_sect_line): fixed indentation.
5239 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5241 * symtab.c (find_pc_sect_line): now uses binary search.
5243 2018-03-19 Tom Tromey <tom@tromey.com>
5245 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5248 2018-03-19 Pedro Alves <palves@redhat.com>
5249 Tom Tromey <tom@tromey.com>
5251 * unittests/observable-selftests.c: New file.
5252 * common/observable.h: New file.
5253 * observable.h: New file.
5254 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5255 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5256 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5257 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5258 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5259 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5260 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5261 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5262 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5263 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5264 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5265 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5266 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5267 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5268 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5269 tui/tui-interp.c, valops.c: Update all users.
5270 * tui/tui-hooks.c (tui_bp_created_observer)
5271 (tui_bp_deleted_observer, tui_bp_modified_observer)
5272 (tui_inferior_exit_observer, tui_before_prompt_observer)
5273 (tui_normal_stop_observer, tui_register_changed_observer):
5275 (tui_observers_token): New global.
5276 (attach_or_detach, tui_attach_detach_observers): New functions.
5277 (tui_install_hooks, tui_remove_hooks): Use
5278 tui_attach_detach_observers.
5279 * record-btrace.c (record_btrace_thread_observer): Remove.
5280 (record_btrace_thread_observer_token): New global.
5281 * observer.sh: Remove.
5282 * observer.c: Rename to observable.c.
5283 * observable.c (namespace gdb_observers): Define new objects.
5284 (observer_debug): Move into gdb_observers namespace.
5285 (struct observer, struct observer_list, xalloc_observer_list_node)
5286 (xfree_observer_list_node, generic_observer_attach)
5287 (generic_observer_detach, generic_observer_notify): Remove.
5288 (_initialize_observer): Update.
5289 Don't include observer.inc.
5290 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5291 (clean mostlyclean): Likewise.
5292 (observer.h, observer.inc): Remove targets.
5293 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5294 (COMMON_SFILES): Use observable.c, not observer.c.
5295 * .gitignore: Remove observer.h.
5297 2018-03-18 Tom Tromey <tom@tromey.com>
5299 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5301 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5303 2018-03-17 Tom Tromey <tom@tromey.com>
5305 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5307 2018-03-17 Tom Tromey <tom@tromey.com>
5309 * target.c (class scoped_target_fd): New.
5310 (target_fileio_close_cleanup): Remove.
5311 (target_fileio_read_alloc_1): Use scoped_target_fd.
5313 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5315 * silent-rules.mk: New.
5316 * Makefile.in: Include silent-rules.mk
5317 (srcdir, VPATH, top_srcdir): Move up.
5318 (COMPILE): Add ECHO_CXX.
5319 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5320 (init.c): Add ECHO_INIT_C.
5321 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5322 (version.c): Add ECHO_GEN.
5323 (printcmd.o): Add ECHO_CXX.
5324 (target-float.o): Add ECHO_CXX.
5325 (ada-exp.o): Add ECHO_CXX.
5326 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5327 (insight$(EXEEXT)): Add ECHO_CXXLD.
5328 * gnulib/configure.ac: Add AM_SILENT_RULES.
5329 * gnulib/aclocal.m4: Re-generate.
5330 * gnulib/configure: Re-generate.
5331 * gnulib/import/Makefile.in: Re-generate.
5333 2018-03-16 Tom Tromey <tom@tromey.com>
5335 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5336 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5337 * utils.c (do_free_section_addr_info)
5338 (make_cleanup_free_section_addr_info): Remove.
5339 * symfile.h (struct other_sections): Add constructor.
5340 (struct section_addr_info): Remove.
5341 (section_addr_info): New typedef.
5342 (struct sym_fns) <sym_offsets>: Change type of parameter.
5343 (build_section_addr_info_from_objfile)
5344 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5345 (default_symfile_offsets, symbol_file_add)
5346 (symbol_file_add_from_bfd)
5347 (build_section_addr_info_from_section_table): Update.
5348 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5349 * symfile.c (alloc_section_addr_info): Remove.
5350 (build_section_addr_info_from_section_table): Change return type.
5352 (build_section_addr_info_from_bfd)
5353 (build_section_addr_info_from_objfile): Likewise.
5354 (free_section_addr_info): Remove.
5355 (relative_addr_info_to_section_offsets): Change type of "addrs".
5356 (addrs_section_compar): Now a std::sort comparator.
5357 (addrs_section_sort): Change return type.
5358 (addr_info_make_relative): Change type of "addrs". Update.
5359 (default_symfile_offsets, syms_from_objfile_1)
5360 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5361 (symbol_file_add_separate): Update.
5362 (symbol_file_add): Change type of "addrs". Update.
5363 (add_symbol_file_command): Update. Remove cleanups.
5364 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5366 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5367 * solib.c (solib_read_symbols): Update.
5368 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5369 * machoread.c (macho_symfile_offsets): Update.
5370 * jit.c (jit_bfd_try_read_symtab): Update.
5372 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5374 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5375 unittests/utils-selftests.c.
5376 * unittests/utils-selftests.c: New file.
5378 2018-03-14 Tom Tromey <tom@tromey.com>
5381 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5384 2018-03-14 Tom Tromey <tom@tromey.com>
5387 * printcmd.c (printf_pointer): Allow "-" in format.
5389 2018-03-14 Tom Tromey <tom@tromey.com>
5391 * printcmd.c (_initialize_printcmd): Add usage to printf.
5393 2018-03-14 Yao Qi <qiyao@sourceware.org>
5395 * MAINTAINERS: Update my email address.
5397 2018-03-13 Tom Tromey <tom@tromey.com>
5399 * machoread.c (macho_check_dsym): Change filenamep to a
5401 (macho_symfile_read): Update.
5402 * symfile.c (load_command): Use std::string.
5404 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5406 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5407 to error message string.
5408 (riscv_register_name): Use xsnprintf instead of sprintf.
5409 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5411 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5413 (riscv_push_dummy_call): Likewise.
5415 2018-03-12 Tom Tromey <tom@tromey.com>
5417 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5418 Use gdb::byte_vector.
5419 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5421 2018-03-12 Yao Qi <yao.qi@linaro.org>
5423 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5424 parameter type to readable_regcache.
5425 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5428 2018-03-11 Tom Tromey <tom@tromey.com>
5430 * dwarf2read.c (struct nextfield): Add initializers.
5431 (struct nextfnfield): Remove.
5432 (struct fnfieldlist): Add initializers. Remove "length" and
5433 "head", use std::vector.
5434 (struct decl_field_list): Remove.
5435 (struct field_info): Add initializers.
5436 <fields, baseclasses>: Now std::vector.
5437 <nbaseclasses, nfnfields, typedef_field_list_count,
5438 nested_types_list_count>: Remove.
5439 (dwarf2_add_field, dwarf2_add_type_defn)
5440 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5441 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5442 (process_structure_scope): Update.
5444 2018-03-11 Tom Tromey <tom@tromey.com>
5446 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5447 for use by std::sort.
5448 (build_type_psymtabs_1): Use std::vector.
5450 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5452 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5453 and LIBMPFR in the printed configuration.
5455 2018-03-08 Tom Tromey <tom@tromey.com>
5457 * source.c (get_filename_and_charpos): Use scoped_fd.
5458 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5459 (procfs_pidlist): Likewise.
5460 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5461 (iterate_over_mappings): Likewise.
5463 2018-03-08 Tom Tromey <tom@tromey.com>
5465 * infcall.c (struct call_return_meta_info)
5466 <stack_temporaries_enabled>: Remove.
5467 (get_call_return_value, call_function_by_hand_dummy): Update.
5468 * thread.c (disable_thread_stack_temporaries): Remove.
5469 (enable_thread_stack_temporaries): Remove.
5470 (thread_stack_temporaries_enabled_p): Return bool.
5471 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5472 (get_last_thread_stack_temporary): Update.
5473 * eval.c (evaluate_subexp): Update.
5474 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5475 class, not a function.
5476 (value_ptr, value_vec): Remove typedefs.
5477 (class thread_info) <stack_temporaries_enabled>: Now bool.
5478 <stack_temporaries>: Now a std::vector.
5479 (thread_stack_temporaries_enabled_p)
5480 (value_in_thread_stack_temporaries): Return bool.
5482 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5484 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5485 (getpkt_or_notif_sane_1): Likewise.
5487 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5489 * build-id.c (build_id_to_debug_bfd): Use std::string.
5491 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5493 * build-id.c (find_separate_debug_file_by_buildid): Return
5495 * build-id.h (find_separate_debug_file_by_buildid): Return
5497 * coffread.c (coff_symfile_read): Adjust to std::string.
5498 * elfread.c (elf_symfile_read): Adjust to std::string.
5499 * symfile.c (separate_debug_file_exists): Change parameter to
5501 (find_separate_debug_file): Return std::string.
5502 (find_separate_debug_file_by_debuglink): Return std::string.
5503 * symfile.h (find_separate_debug_file_by_debuglink): Return
5506 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5508 * common/xml-utils.c (xml_escape_text): Move code to...
5509 (xml_escape_text_append): ... this new function.
5510 * common/xml-utils.h (xml_escape_text_append): New declaration.
5511 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5513 (_initialize_xml_utils): register test_xml_escape_text_append as
5516 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5518 * defs.h: Remove MAX_REGISTER_SIZE.
5519 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5521 * python/py-unwind.c (pyuw_sniffer): Likewise.
5523 2018-03-07 Tom Tromey <tom@tromey.com>
5525 * linux-tdep.c (linux_info_proc): Update.
5526 * target.h (struct target_ops) <to_fileio_readlink>: Return
5528 (target_fileio_readlink): Return optional<string>.
5529 * remote.c (remote_hostio_readlink): Return optional<string>.
5530 * inf-child.c (inf_child_fileio_readlink): Return
5532 * target.c (target_fileio_readlink): Return optional<string>.
5534 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5536 * regcache.c (cooked_read_test): Add riscv to the list of
5537 architectures that have a save_reggroup.
5539 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5541 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5542 value is not a dynamic class object.
5544 2018-03-06 Tom Tromey <tom@tromey.com>
5546 * rust-exp.y: Formatting fixes.
5548 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5550 * riscv-tdep.c (riscv_register_name): Remove target description
5552 (riscv_gdbarch_init): Remove target description check.
5554 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5556 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5558 * riscv-tdep.h: Likewise.
5560 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5562 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5563 (riscv_pseudo_register_write): Delete.
5564 (riscv_gdbarch_init): Remove all use of pseudo registers.
5566 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5568 * record-btrace.c (btrace_print_lines): Replace cleanup
5569 parameter with RAII equivalents.
5570 (btrace_insn_history): Replace cleanup with RAII equivalents.
5571 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5572 make_cleanup_ui_out_tuple_begin_end): Remove.
5573 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5574 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5575 make_cleanup_ui_out_list_begin_end): Remove.
5577 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5579 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5580 parameter types to std::vector. Use bool.
5581 (record_btrace_wait): Replace VEC(tp_t) with
5582 std::vector<thread_info *>.
5583 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5585 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5587 * record-btrace.c (record_btrace_disable_callback): Remove.
5588 (struct scoped_btrace_disable): New.
5589 (record_btrace_open): Use scoped_btrace_disable.
5591 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5593 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5594 reading values from registers.
5596 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5598 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5601 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5603 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5604 change parameter type. Use GDB's print functions, and use
5605 core_addr_to_string where appropriate.
5606 (riscv_push_dummy_call): Use core_addr_to_string where
5607 appropriate, update call to riscv_print_arg_location, and reindent
5609 (riscv_return_value): Update call to riscv_print_arg_location.
5611 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5612 Tim Newsome <tim@sifive.com>
5613 Albert Ou <a0u@eecs.berkeley.edu>
5614 Darius Rad <darius@bluespec.com>
5616 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5617 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5618 (ALLDEPFILES): Add riscv-tdep.c
5619 * configure.tgt: Add riscv support.
5620 * riscv-tdep.c: New file.
5621 * riscv-tdep.h: New file.
5622 * NEWS: Mention new target.
5623 * MAINTAINERS: Add entry for riscv.
5625 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5627 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5628 fields within aggregates.
5630 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5632 * record-btrace.c (btrace_print_lines): Change type of flags to
5633 gdb_disassembly_flags.
5635 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5637 * fbsd-nat.c: Include "inf-ptrace.h".
5638 (USE_SIGTRAP_SIGINFO): Conditionally define.
5639 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5640 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5641 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5643 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5645 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5647 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5648 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5649 "supports_stopped_by_hw_breakpoint" target methods.
5651 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5653 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5654 * fbsd-nat.c (debug_fbsd_nat): New variable.
5655 (show_fbsd_nat_debug): New function.
5656 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5657 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5659 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5661 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5662 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5664 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5665 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5668 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5670 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5671 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5673 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5675 * charset.c (struct charset_vector): New.
5676 (charsets): Change type to charset_vector.
5677 (find_charset_names): Adjust.
5679 (_initialize_charset): Adjust.
5681 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5683 * progspace.h (struct program_space) <deleted_solibs>: Change
5684 type to std::vector<std::string>.
5685 * progspace.c (clear_program_space_solib_cache): Adjust.
5686 * breakpoint.c (print_solib_event): Adjust.
5687 (check_status_catch_solib): Adjust.
5688 * solib.c (update_solib_list): Adjust.
5689 * ui-out.h (class ui_out) <field_string>: New overload.
5690 * ui-out.c (ui_out::field_string): New overload.
5692 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5694 * progspace.h (struct program_space): Add constructor and
5695 destructor, initialize fields.
5696 (add_program_space): Remove.
5697 * progspace.c (add_program_space): Rename to...
5698 (program_space::program_space): ... this.
5699 (release_program_space): Rename to...
5700 (program_space::~program_space): ... this.
5701 (delete_program_space): Use delete to delete program_space.
5702 (initialize_progspace): Use new to allocate program_space.
5703 * inferior.c (add_inferior_with_spaces): Likewise.
5704 (clone_inferior_command): Likewise.
5705 * infrun.c (follow_fork_inferior): Likewise.
5706 (handle_vfork_child_exec_or_exit): Likewise.
5708 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5710 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5711 (delim_string_to_char_ptr_vec): Return std::vector of
5712 gdb::unique_xmalloc_ptr.
5713 (dirnames_to_char_ptr_vec_append): Take std::vector of
5714 gdb::unique_xmalloc_ptr.
5715 (dirnames_to_char_ptr_vec): Return std::vector of
5716 gdb::unique_xmalloc_ptr.
5717 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5718 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5719 (delim_string_to_char_ptr_vec): Return an std::vector of
5720 gdb::unique_xmalloc_ptr, adjust the code.
5721 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5722 gdb::unique_xmalloc_ptr, adjust the code.
5723 (dirnames_to_char_ptr_vec): Return an std::vector of
5724 gdb::unique_xmalloc_ptr, adjust the code.
5725 * auto-load.c (auto_load_safe_path_vec): Change type to
5726 std::vector of gdb::unique_xmalloc_ptr.
5727 (auto_load_expand_dir_vars): Return an std::vector of
5728 gdb::unique_xmalloc_ptr, adjust the code.
5729 (auto_load_safe_path_vec_update): Adjust.
5730 (filename_is_in_auto_load_safe_path_vec): Adjust.
5731 (auto_load_objfile_script_1): Adjust.
5732 * build-id.c (build_id_to_debug_bfd): Adjust.
5733 * linux-thread-db.c (thread_db_load_search): Adjust.
5734 * source.c (add_path): Adjust.
5736 * symfile.c (find_separate_debug_file): Adjust.
5737 * utils.c (do_free_char_ptr_vec): Remove.
5738 (make_cleanup_free_char_ptr_vec): Remove.
5740 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5743 * common/pathstuff.c: Conditionally include "<windows.h>".
5745 2018-03-01 Georg Sauthoff <mail@georg.so>
5748 * gcore.in: Quote variables and switch interpreter to bash.
5750 2018-03-01 Tom Tromey <tom@tromey.com>
5752 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5753 assertion. Add assertion for discriminant_index.
5754 (quirk_rust_enum): Use correct base type name in univariant case.
5756 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5758 * record.c (get_call_history_modifiers): Return a
5760 (cmd_record_call_history): Adjust.
5761 * record-btrace.c (record_btrace_call_history): Adjust.
5762 (record_btrace_call_history_range): Adjust.
5763 (record_btrace_call_history_from): Adjust.
5764 * target-debug.h (target_debug_print_record_print_flags): New.
5765 * target-delegates.c: Re-generate.
5766 * target.c (target_call_history): Change flags type.
5767 (target_call_history_from): Likewise.
5768 (target_call_history_range): Likewise.
5769 * target.h (struct target_ops) <target_call_history>: Likewise.
5770 (target_call_history_from): Likewise.
5771 (target_call_history_range): Likewise.
5773 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5774 Simon Marchi <simon.marchi@polymtl.ca>
5776 * common/common-utils.c: Include "sys/stat.h".
5777 (is_regular_file): Move here from "source.c"; change return
5779 * common/common-utils.h (is_regular_file): New prototype.
5780 * common/pathstuff.c (contains_dir_separator): New function.
5781 * common/pathstuff.h (contains_dir_separator): New prototype.
5782 * source.c: Don't include "sys/stat.h".
5783 (is_regular_file): Move to "common/common-utils.c".
5785 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5787 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5788 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5789 * auto-load.c: Include "common/pathstuff.h".
5790 * common/common-def.h (current_directory): Move here.
5791 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5793 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5795 * common/pathstuff.c: New file.
5796 * common/pathstuff.h: New file.
5797 * compile/compile.c: Include "common/pathstuff.h".
5798 * defs.h (current_directory): Move to "common/common-defs.h".
5799 * dwarf2read.c: Include "common/pathstuff.h".
5801 * guile/scm-safe-call.c: Likewise.
5802 * linux-thread-db.c: Likewise.
5804 * nto-tdep.c: Likewise.
5805 * objfiles.c: Likewise.
5806 * source.c: Likewise.
5807 * symtab.c: Likewise.
5808 * utils.c: Include "common/pathstuff.h".
5809 (gdb_realpath): Move to "common/pathstuff.c".
5810 (gdb_realpath_keepfile): Likewise.
5811 (gdb_abspath): Likewise.
5812 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5813 (gdb_realpath_keepfile): Likewise.
5814 (gdb_abspath): Likewise.
5816 2018-02-28 John Baldwin <jhb@FreeBSD.org>
5818 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5819 wildcard process pid for super_resume for kernels with a
5822 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
5824 * compile/compile.c (get_args): Add additional comments
5825 explaining function.
5827 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
5828 Tom Tromey <tom@tromey.com>
5830 * target.h (memory_write_request_s): Remove typedef. Don't define
5832 (target_write_memory_blocks): Change argument to std::vector.
5833 (struct memory_write_request): Add constructor.
5834 * target-memory.c (compare_block_starting_address): Return bool.
5835 Change argument types.
5836 (claim_memory): Change arguments to use std::vector.
5837 (split_regular_and_flash_blocks, blocks_to_erase)
5838 (compute_garbled_blocks): Likewise.
5839 (cleanup_request_data, cleanup_write_requests_vector): Remove.
5840 (target_write_memory_blocks): Change argument to std::vector.
5841 * symfile.c (struct load_section_data): Add constructor and
5842 destructor. Use std::vector for "requests".
5843 (struct load_progress_data): Add initializers.
5844 (load_section_callback): Update. Use "new".
5845 (clear_memory_write_data): Remove.
5846 (generic_load): Update.
5848 2018-02-27 Alan Hayward <alan.hayward@arm.com>
5850 * arch/aarch64.h: Use common/tdesc.h.
5852 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5854 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5855 architecture with a 64-bit ABI.
5857 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5859 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5860 ahead of target description loading.
5862 2018-02-26 Tom Tromey <tom@tromey.com>
5864 * stack.c (backtrace_command_1): Update.
5865 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5867 * python/py-framefilter.c (py_print_frame)
5868 (gdbpy_apply_frame_filter): Change type of "flags".
5869 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5871 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5872 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5873 * extension.h (enum frame_filter_flag): Rename from
5875 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5876 (apply_ext_lang_frame_filter): Change type of "flags".
5877 * extension.c (apply_ext_lang_frame_filter): Change type of
5879 * extension-priv.h (struct extension_language_ops)
5880 <apply_frame_filter>: Change type of "flags".
5882 2018-02-26 Tom Tromey <tom@tromey.com>
5885 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
5886 off-by-one in py_end computation.
5887 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5889 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5892 2018-02-26 Tom Tromey <tom@tromey.com>
5894 * dwarf2read.c (struct variant_field): New.
5895 (struct nextfield) <variant>: New field.
5896 (dwarf2_add_field): Handle DW_TAG_variant_part.
5897 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5898 discriminated union.
5899 (read_structure_type): Handle DW_TAG_variant_part.
5900 (handle_struct_member_die): New function, extracted from
5901 process_structure_scope. Handle DW_TAG_variant.
5902 (process_structure_scope): Handle discriminated unions. Call
5903 handle_struct_member_die.
5905 2018-02-26 Tom Tromey <tom@tromey.com>
5907 * rust-lang.h (rust_last_path_segment): Declare.
5908 * rust-lang.c (rust_last_path_segment): Now public. Change
5910 (struct disr_info): Remove.
5911 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5912 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5913 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5914 (rust_enum_p, rust_enum_variant): New function.
5915 (rust_underscore_fields): Remove "offset" parameter.
5916 (rust_print_enum): New function.
5917 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5918 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5919 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
5921 (rust_internal_print_type): New function, from rust_print_type.
5923 (rust_print_type): Call rust_internal_print_type.
5924 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5925 Update enum handling.
5926 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5927 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5928 (rust_union_quirks): New functions.
5929 (process_full_comp_unit, process_full_type_unit): Call
5931 (process_structure_scope): Update rust_unions if necessary.
5933 2018-02-26 Tom Tromey <tom@tromey.com>
5935 * value.h (value_union_variant): Declare.
5936 * valops.c (value_union_variant): New function.
5937 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5938 (struct discriminant_info): New.
5939 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5941 (struct main_type) <flag_discriminated_union>: New field.
5943 2018-02-26 Tom Tromey <tom@tromey.com>
5945 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5946 unittests/unpack-selftests.c.
5947 * unittests/unpack-selftests.c: New file.
5948 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5950 2018-02-26 Yao Qi <yao.qi@linaro.org>
5952 * dwarf2read.c (struct partial_die_info) <read>: New method.
5953 (read_partial_die): Remove the declaration.
5954 (load_partial_dies): Update.
5955 (partial_die_info::partial_die_info):
5956 (read_partial_die): Change it to partial_die_info::read.
5958 2018-02-26 Yao Qi <yao.qi@linaro.org>
5960 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5961 (fixup_partial_die): Remove declaration.
5962 (scan_partial_symbols): Update.
5963 (partial_die_parent_scope): Likewise.
5964 (partial_die_full_name): Likewise.
5965 (fixup_partial_die): Change it to partial_die_info::fixup.
5967 2018-02-26 Yao Qi <yao.qi@linaro.org>
5969 * dwarf2read.c (read_partial_die): Update the declaration.
5970 (load_partial_dies): Caller update.
5971 (read_partial_die): Remove one argument abbrev_len.
5973 2018-02-26 Yao Qi <yao.qi@linaro.org>
5975 * dwarf2read.c (struct partial_die_info): Add ctor, delete
5976 assignment operator.
5977 (load_partial_dies): Use ctor and copy ctor.
5978 (read_partial_die): Update.
5979 (dwarf2_cu::find_partial_die): Use ctor.
5981 2018-02-26 Yao Qi <yao.qi@linaro.org>
5983 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5984 (find_partial_die_in_comp_unit): Change it to
5985 dwarf2_cu::find_partial_die.
5986 (find_partial_die): Update.
5988 2018-02-26 Yao Qi <yao.qi@linaro.org>
5990 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5993 2018-02-26 Yao Qi <yao.qi@linaro.org>
5995 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5997 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5999 * arch/amd64.h: Use common/tdesc.h.
6000 * arch/i386.c: Likewise.
6001 * arch/i386.h: Likewise.
6002 * arch/tic6x.c: Likewise.
6003 * arch/tdesc.h: Move file from here...
6004 * common/tdesc.h: ...to here.
6005 * features/aarch64-core.c: Regenerate.
6006 * features/aarch64-fpu.c: Regenerate.
6007 * features/i386/32bit-avx.c: Regenerate.
6008 * features/i386/32bit-avx512.c: Regenerate.
6009 * features/i386/32bit-core.c: Regenerate.
6010 * features/i386/32bit-linux.c: Regenerate.
6011 * features/i386/32bit-mpx.c: Regenerate.
6012 * features/i386/32bit-pkeys.c: Regenerate.
6013 * features/i386/32bit-sse.c: Regenerate.
6014 * features/i386/64bit-avx.c: Regenerate.
6015 * features/i386/64bit-avx512.c: Regenerate.
6016 * features/i386/64bit-core.c: Regenerate.
6017 * features/i386/64bit-linux.c: Regenerate.
6018 * features/i386/64bit-mpx.c: Regenerate.
6019 * features/i386/64bit-pkeys.c: Regenerate.
6020 * features/i386/64bit-segments.c: Regenerate.
6021 * features/i386/64bit-sse.c: Regenerate.
6022 * features/i386/x32-core.c: Regenerate.
6023 * features/tic6x-c6xp.c: Regenerate.
6024 * features/tic6x-core.c: Regenerate.
6025 * features/tic6x-gp.c: Regenerate.
6026 * target-descriptions.c: Use common/tdesc.h.
6027 * target-descriptions.h: Likewise.
6029 2018-02-24 Tom Tromey <tom@tromey.com>
6031 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
6032 (try_thread_db_load_from_dir, thread_db_load_search): Use
6034 (info_auto_load_libthread_db_compare): Return bool. Change
6036 (info_auto_load_libthread_db): Use std::vector, std::string.
6039 2018-02-24 Tom Tromey <tom@tromey.com>
6041 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
6043 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
6045 * gdbarch.c: Rebuild.
6046 * gdbarch.h: Rebuild.
6047 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
6048 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
6049 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
6052 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
6054 * gdbtypes.h (sect_offset): Change type to uint64_t.
6055 (sect_offset_str): New function.
6056 * dwarf2read.c (create_addrmap_from_aranges): Use
6058 (error_check_comp_unit_head): Likewise.
6059 (create_debug_type_hash_table): Likewise.
6060 (read_cutu_die_from_dwo): Likewise.
6061 (init_cutu_and_read_dies): Likewise.
6062 (init_cutu_and_read_dies_no_follow): Likewise.
6063 (process_psymtab_comp_unit_reader): Likewise.
6064 (partial_die_parent_scope): Likewise.
6065 (peek_die_abbrev): Likewise.
6066 (process_queue): Likewise.
6067 (dwarf2_physname): Likewise.
6068 (read_namespace_alias): Likewise.
6069 (read_import_statement): Likewise.
6070 (create_dwo_cu_reader): Likewise.
6071 (create_cus_hash_table): Likewise.
6072 (lookup_dwo_cutu): Likewise.
6073 (inherit_abstract_dies): Likewise.
6074 (read_func_scope): Likewise.
6075 (read_call_site_scope): Likewise.
6076 (dwarf2_add_member_fn): Likewise.
6077 (read_common_block): Likewise.
6078 (read_module_type): Likewise.
6079 (read_typedef): Likewise.
6080 (read_subrange_type): Likewise.
6081 (load_partial_dies): Likewise.
6082 (read_partial_die): Likewise.
6083 (find_partial_die): Likewise.
6084 (read_str_index): Likewise.
6085 (dwarf2_string_attr): Likewise.
6086 (build_error_marker_type): Likewise.
6087 (lookup_die_type): Likewise.
6088 (dump_die_shallow): Likewise.
6089 (follow_die_ref): Likewise.
6090 (dwarf2_fetch_die_loc_sect_off): Likewise.
6091 (dwarf2_fetch_constant_bytes): Likewise.
6092 (follow_die_sig): Likewise.
6093 (get_signatured_type): Likewise.
6094 (get_DW_AT_signature_type): Likewise.
6095 (dwarf2_find_containing_comp_unit): Likewise.
6096 (set_die_type): Likewise.
6098 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6100 * arch/aarch64.c: Include "common-defs.h".
6101 * arch/amd64.c: Likewise.
6102 * arch/i386.c: Likewise.
6104 2018-02-21 Tom Tromey <tom@tromey.com>
6106 * value.h: (extract_field_op): Update.
6107 * eval.c (extract_field_op): Return a const char *.
6108 * expression.h (parse_expression_for_completion): Update.
6109 * completer.c (complete_expression): Update.
6110 (add_struct_fields): Make fieldname const.
6111 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6112 (mark_completion_tag, parse_exp_in_context_1): Update.
6113 (parse_expression_for_completion): Change "name" to
6114 unique_xmalloc_ptr*.
6116 2018-02-21 Tom Tromey <tom@tromey.com>
6118 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6120 2018-02-21 Yao Qi <yao.qi@linaro.org>
6122 * avr-tdep.c (avr_read_pc): Change parameter type to
6124 * gdbarch.sh (read_pc): Likewise.
6125 * gdbarch.c: Re-generated.
6126 * gdbarch.h: Re-generated.
6127 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6129 * ia64-tdep.c (ia64_read_pc): Likewise.
6130 * mips-tdep.c (mips_read_pc): Likewise.
6131 * spu-tdep.c (spu_read_pc): Likewise.
6133 2018-02-21 Yao Qi <yao.qi@linaro.org>
6135 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6136 * regcache-dump.c: New file.
6137 * regcache.c: Move register_dump to regcache-dump.c.
6138 (maintenance_print_registers): Likewise.
6139 (maintenance_print_raw_registers): Likewise.
6140 (maintenance_print_cooked_registers): Likewise.
6141 (maintenance_print_register_groups): Likewise.
6142 (maintenance_print_remote_registers): Likewise.
6143 (_initialize_regcache): Likewise.
6144 * regcache.h (register_dump): Moved from regcache.c.
6146 2018-02-21 Yao Qi <yao.qi@linaro.org>
6148 * regcache.c (regcache::regcache): Update.
6149 (regcache::invalidate): Move it to detached_regcache::invalidate.
6150 (get_thread_arch_aspace_regcache): Update.
6151 (regcache::raw_update): Update.
6152 (regcache::cooked_read): Remove some code.
6153 (regcache::cooked_read_value): Likewise.
6154 (regcache::raw_write): Remove assert on m_readonly_p.
6155 (regcache::raw_supply_integer): Move it to
6156 detached_regcache::raw_supply_integer.
6157 (regcache::raw_supply_zeroed): Likewise.
6158 * regcache.h (detached_regcache) <raw_supply_integer>: New
6160 <raw_supply_zeroed, invalidate>: Likewise.
6161 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6162 <invalidate>: Likewise.
6163 <m_readonly_p>: Removed.
6165 2018-02-21 Yao Qi <yao.qi@linaro.org>
6167 * infcmd.c (get_return_value): Let stop_regs point to
6168 get_current_regcache.
6169 * regcache.c (regcache::regcache): Remove.
6170 (register_dump_reg_buffer): New class.
6171 (regcache_print): Adjust.
6172 * regcache.h (regcache): Remove constructors.
6174 2018-02-21 Yao Qi <yao.qi@linaro.org>
6176 * regcache.c (class register_dump): New class.
6177 (register_dump_regcache, register_dump_none): New class.
6178 (register_dump_remote, register_dump_groups): New class.
6179 (regcache_print): Update.
6180 * regcache.h (regcache_dump_what): Move it to regcache.c.
6181 (regcache) <dump>: Remove.
6183 2018-02-21 Yao Qi <yao.qi@linaro.org>
6185 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6187 (jit_unwind_reg_set_impl): Call raw_supply.
6188 (jit_frame_sniffer): Use reg_buffer_rw.
6189 * record-full.c (record_full_core_regbuf): Change its type.
6190 (record_full_core_open_1): Use reg_buffer_rw.
6191 (record_full_close): Likewise.
6192 (record_full_core_fetch_registers): Use regcache->raw_supply.
6193 (record_full_core_store_registers): Likewise.
6194 * regcache.c (regcache::get_register_status): Move it to
6196 (regcache_raw_set_cached_value): Remove.
6197 (regcache::raw_set_cached_value): Remove.
6198 (regcache::raw_write): Call raw_supply.
6199 (regcache::raw_supply): Move it to reg_buffer_rw.
6200 * regcache.h (regcache_raw_set_cached_value): Remove.
6201 (reg_buffer_rw): New class.
6203 2018-02-21 Yao Qi <yao.qi@linaro.org>
6205 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6206 readonly_detached_regcache.
6207 (dummy_frame_prev_register): Use regcache->cooked_read.
6208 * frame.c (frame_save_as_regcache): Change return type.
6209 (frame_pop): Update.
6210 * frame.h (frame_save_as_regcache): Update declaration.
6211 * inferior.h (get_infcall_suspend_state_regcache): Update
6213 * infrun.c (infcall_suspend_state) <registers>: use
6214 readonly_detached_regcache.
6215 (save_infcall_suspend_state): Don't use regcache_dup.
6216 (get_infcall_suspend_state_regcache): Change return type.
6217 * linux-fork.c (struct fork_info) <savedregs>: Change to
6218 readonly_detached_regcache.
6220 (fork_save_infrun_state): Don't use regcache_dup.
6221 (info_checkpoints_command): Adjust.
6222 * mi/mi-main.c (register_changed_p): Update declaration.
6223 (mi_cmd_data_list_changed_registers): Use
6224 readonly_detached_regcache.
6225 (register_changed_p): Change parameter type to
6226 readonly_detached_regcache.
6227 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6228 readonly_detached_regcache.
6229 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6230 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6232 (regcache::save): Move it to reg_buffer.
6233 (regcache::restore): Change parameter type.
6234 (regcache_dup): Remove.
6235 * regcache.h (reg_buffer) <save>: New method.
6236 (readonly_detached_regcache): New class.
6237 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6238 readonly_detached_regcache.
6239 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6241 2018-02-21 Yao Qi <yao.qi@linaro.org>
6243 * frame.c (frame_save_as_regcache): Use regcache method save.
6244 (frame_pop): Use regcache method restore.
6245 * infrun.c (restore_infcall_suspend_state): Likewise.
6246 * linux-fork.c (fork_load_infrun_state): Likewise.
6247 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6249 * regcache.c (regcache_save): Remove.
6250 (regcache::restore): More asserts.
6251 (regcache_cpy): Remove.
6252 * regcache.h (regcache_save): Remove the declaration.
6253 (regcache::restore): Move from private to public.
6254 Remove the friend declaration of regcache_cpy.
6255 (regcache_cpy): Remove declaration.
6257 2018-02-21 Yao Qi <yao.qi@linaro.org>
6259 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6260 parameter type to 'readable_regcache *'.
6261 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6262 * arm-tdep.c (arm_neon_quad_read): Likewise.
6263 (arm_pseudo_read): Likewise.
6264 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6265 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6266 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6267 * gdbarch.c: Re-generated.
6268 * gdbarch.h: Re-generated.
6269 * gdbarch.sh (pseudo_register_read): Change parameter type to
6270 'readable_regcache *'.
6271 (pseudo_register_read_value): Likewise.
6272 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6273 (h8300_pseudo_register_read): Likewise.
6274 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6275 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6276 (i386_pseudo_register_read_into_value): Likewise.
6277 (i386_pseudo_register_read_value): Likewise.
6278 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6280 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6281 * m32c-tdep.c (m32c_raw_read): Likewise.
6282 (m32c_read_flg): Likewise.
6283 (m32c_banked_register): Likewise.
6284 (m32c_banked_read): Likewise.
6285 (m32c_sb_read): Likewise.
6286 (m32c_part_read): Likewise.
6287 (m32c_cat_read): Likewise.
6288 (m32c_r3r2r1r0_read): Likewise.
6289 (m32c_pseudo_register_read): Likewise.
6290 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6291 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6292 (mep_pseudo_cr64_read): Likewise.
6293 (mep_pseudo_register_read): Likewise.
6294 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6295 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6296 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6297 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6298 (regcache::cooked_read): Likewise.
6299 (regcache::cooked_read_value): Likewise.
6300 (regcache_cooked_read_signed):
6301 (regcache::cooked_read): Likewise.
6302 * regcache.h (readable_regcache): New class.
6303 (regcache): Inherit readable_regcache. Move some methods to
6305 * rl78-tdep.c (rl78_pseudo_register_read): Change
6306 parameter type to 'readable_regcache *'.
6307 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6308 (e500_pseudo_register_read): Change parameter type to
6309 'readable_regcache *'.
6310 (dfp_pseudo_register_read): Likewise.
6311 (vsx_pseudo_register_read): Likewise.
6312 (efpr_pseudo_register_read): Likewise.
6313 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6314 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6315 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6316 (sh64_pseudo_register_read): Likewise.
6317 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6318 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6319 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6320 (spu_pseudo_register_read): Likewise.
6321 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6322 (xtensa_pseudo_register_read): Likewise.
6324 2018-02-21 Yao Qi <yao.qi@linaro.org>
6326 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6327 (regcache::arch): Move it to reg_buffer::arch.
6328 (regcache::register_buffer): Likewise.
6329 (regcache::assert_regnum): Likewise.
6330 (regcache::num_raw_registers): Likewise.
6331 * regcache.h (reg_buffer): New class.
6332 (regcache): Inherit reg_buffer.
6334 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6336 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6337 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6339 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6341 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6343 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6345 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6346 (SFILES): Remove common/*.c files.
6347 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6348 * common/common.host: Add common reference.
6349 * configure.ac: Likewise.
6350 * configure: Regenerate.
6352 2018-02-16 Yao Qi <yao.qi@linaro.org>
6354 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6355 (block_initialize_namespace): Use new.
6356 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6357 (dwarf2_free_objfile): Use delete.
6358 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6359 (copy_type_recursive): Use new.
6360 * gdb_obstack.h (allocate_on_obstack): New.
6362 2018-02-15 Yao Qi <yao.qi@linaro.org>
6365 * inferior.c (exit_inferior_1): Reset inf->control.
6367 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6369 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6372 2018-02-14 Pedro Alves <palves@redhat.com>
6374 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6375 frame_cleanup_after_sniffer on exception.
6377 2018-02-14 Tom Tromey <tom@tromey.com>
6379 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6381 (solib_bfd_open): Make pathname const.
6382 * solib.c (solib_bfd_open): Make pathname const.
6383 * solib-spu.c (spu_bfd_fopen): Make name const.
6384 (spu_bfd_open): Make pathname const.
6385 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6386 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6388 2018-02-14 Tom Tromey <tom@tromey.com>
6390 * symfile.c (symfile_bfd_open): Update.
6391 * source.h (openp, source_full_path_of, find_and_open_source):
6392 Change argument type to unique_xmalloc_ptr.
6393 * source.c (openp): Take a unique_xmalloc_ptr.
6394 (source_full_path_of, find_and_open_source): Likewise.
6395 (open_source_file, symtab_to_fullname): Update.
6396 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6398 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6399 (exec_file_find): Update.
6400 * psymtab.c (psymtab_to_fullname): Update.
6401 * nto-tdep.h (nto_find_and_open_solib): Update.
6402 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6404 * exec.c (exec_file_attach): Update.
6405 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6406 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6408 2018-02-14 Tom Tromey <tom@tromey.com>
6410 * solib.c: Include source.h.
6411 * nto-tdep.c: Include source.h.
6412 * mi/mi-cmd-env.c: Include source.h.
6413 * infcmd.c: Include source.h.
6414 * exec.c: Include source.h.
6415 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6416 (add_path, directory_switch, source_path, init_source_path): Move
6418 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6419 (add_path, directory_switch, source_path, init_source_path):
6422 2018-02-14 Tom Tromey <tom@tromey.com>
6424 * solist.h (exec_file_find, solib_find): Return
6426 (solib_bfd_fopen): Take a const char *.
6427 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6428 (exec_file_find, solib_find): Likewise.
6429 (solib_bfd_fopen): Do not take ownership of "pathname".
6430 (solib_bfd_open): Use unique_xmalloc_ptr.
6431 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6432 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6433 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6434 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6436 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6438 * ada-lang.c (name_match_type_from_name): Remove reference to
6439 ada_name_for_lookup in function's documentation.
6440 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6442 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6444 * defs.h (enum openp_flags): New enum.
6445 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6446 Move to enum openp_flags.
6447 (openp_flags): New enum flags.
6448 (openp): Change parameter type to openp_flags.
6449 * source.c (openp): Change parameter type to openp_flags.
6450 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6451 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6453 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6455 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6458 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6460 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6462 (class dwarf2_queue_guard): ...the destructor of this new class.
6463 (dw2_do_instantiate_symtab): Create instance of the new class
6464 dwarf2_queue_guard, remove cleanup.
6466 2018-02-09 Tom Tromey <tom@tromey.com>
6468 * source.c (find_source_lines): Don't reference past the end of
6471 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6473 * remote.c (remote_btrace_maybe_reopen): Change error message.
6474 * btrace.c (btrace_enable): Likewise.
6475 (parse_xml_btrace): Likewise.
6476 (parse_xml_btrace_conf): Likewise.
6478 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6480 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6481 (linux_enable_pt, linux_enable_bts): Call
6482 diagnose_perf_event_open_fail.
6484 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6486 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6487 Remove parameter and change return type. Update callers. Move it.
6488 (linux_enable_bts, linux_enable_pt): Improve error message.
6489 (linux_enable_pt): Remove zero buffer size check.
6490 (linux_enable_btrace): Improve error messages. Remove NULL return
6493 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6495 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6496 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6497 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6498 (linux_supports_pt, linux_supports_btrace): Remove.
6499 (linux_enable_bts): Call cpu_supports_bts.
6500 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6501 * remote.c (remote_supports_btrace): Remove.
6502 (init_remote_ops): Remove remote_supports_btrace.
6503 * target-delegates.c: Regenerated.
6504 * target.c (target_supports_btrace): Remove.
6505 * target.h (target_ops) <to_supports_btrace>: Remove
6506 (target_supports_btrace): Remove.
6507 * x86-linux-nat.c (x86_linux_create_target): Remove
6508 linux_supports_btrace.
6510 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6512 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6514 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6515 exception and use message in own exception.
6517 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6519 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6520 (perf_event_pt_event_type): Use gdb_file_up.
6521 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6522 scoped_fd, and scoped_mmap.
6524 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6526 * common/scoped_mmap.h: New.
6527 * unittests/scoped_mmap-selftest.c: New.
6528 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6529 unittests/scoped_mmap-selftest.c.
6531 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6533 * common/scoped_fd.h: New.
6534 * unittests/scoped_fd-selftest.c: New.
6535 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6536 unittests/scoped_fd-selftest.c.
6538 2018-02-09 Tom Tromey <tom@tromey.com>
6540 * auto-load.c (auto_load_section_scripts): Use
6541 gdb::unique_xmalloc_ptr.
6543 2018-02-09 Tom Tromey <tom@tromey.com>
6545 * auto-load.c (execute_script_contents): Use std::string.
6547 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6549 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6550 Python function, rather than a new command.
6552 2018-02-08 Tom Tromey <tom@tromey.com>
6554 * solib.c (solib_find_1): Use std::string.
6555 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6557 2018-02-08 Tom Tromey <tom@tromey.com>
6559 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6561 2018-02-08 Tom Tromey <tom@tromey.com>
6563 * source.c (find_source_lines): Use gdb::def_vector.
6565 2018-02-08 Tom Tromey <tom@tromey.com>
6567 * macrocmd.c (struct temporary_macro_definition): New.
6568 (macro_define_command): Use temporary_macro_definition. Remove
6570 (free_macro_definition_ptr): Remove.
6572 2018-02-08 Tom Tromey <tom@tromey.com>
6574 * macroexp.c (maybe_expand): Use std::string.
6576 2018-02-08 Tom Tromey <tom@tromey.com>
6578 * macroexp.c (struct macro_buffer): Add initializers for some
6580 (init_buffer, init_shared_buffer, free_buffer)
6581 (free_buffer_return_text): Remove.
6582 (macro_buffer): New constructors.
6583 (~macro_buffer): New destructor.
6584 (macro_buffer::set_shared): New method.
6585 (macro_buffer::resize_buffer, macro_buffer::appendc)
6586 (macro_buffer::appendmem): Now methods, not free functions.
6587 (set_token, append_tokens_without_splicing, stringify)
6588 (macro_stringify): Update.
6589 (gather_arguments): Change return type. Remove argc_p argument,
6590 add args_ptr argument. Use std::vector.
6591 (substitute_args): Remove argc argument. Accept std::vector.
6592 (expand): Update. Use std::vector.
6593 (scan, macro_expand, macro_expand_next): Update.
6595 2018-02-08 Tom Tromey <tom@tromey.com>
6597 * symtab.c (default_collect_symbol_completion_matches_break_on):
6598 Use unique_xmalloc_ptr.
6599 * macroscope.h: (sal_macro_scope, user_macro_scope)
6600 (default_macro_scope): Return unique_xmalloc_ptr.
6601 * macroscope.c (sal_macro_scope, user_macro_scope)
6602 (default_macro_scope): Return unique_xmalloc_ptr.
6603 * macroexp.h (macro_expand, macro_expand_once): Return
6605 * macroexp.c (macro_expand, macro_expand_once): Return
6607 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6608 (info_macro_command, info_macros_command): Use
6610 * compile/compile-c-support.c (write_macro_definitions): Use
6612 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6614 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6616 * value.c (value_static_field): Assign field type instead of
6617 containing type when returning an optimized out value.
6619 2018-02-06 Yao Qi <yao.qi@linaro.org>
6621 * ft32-tdep.c (ft32_read_pc): Remove.
6622 (ft32_write_pc): Remove.
6623 (ft32_gdbarch_init): Update.
6624 * m32r-tdep.c (m32r_read_pc): Remove.
6625 (m32r_gdbarch_init): Update.
6626 * mep-tdep.c (mep_read_pc): Remove.
6627 (mep_gdbarch_init): Update.
6628 * microblaze-tdep.c (microblaze_write_pc): Remove.
6629 (microblaze_gdbarch_init): Update.
6630 * mn10300-tdep.c (mn10300_read_pc): Remove.
6631 (mn10300_write_pc): Remove.
6632 (mn10300_gdbarch_init): Update.
6633 * moxie-tdep.c (moxie_read_pc): Remove.
6634 (moxie_write_pc): Remove.
6635 (moxie_gdbarch_init): Update.
6637 2018-02-06 Yao Qi <yao.qi@linaro.org>
6639 * expprint.c (print_subexp_standard): Handle
6640 OP_F77_UNDETERMINED_ARGLIST.
6641 (dump_subexp_body_standard): Likewise.
6643 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6645 * target-descriptions.c (tdesc_element_visitor) Add empty
6647 (tdesc_type): Move make_gdb_type from here.
6648 (tdesc_type_builtin): Likewise.
6649 (tdesc_type_vector): Likewise.
6650 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6651 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6652 (make_gdb_type_union): Likewise.
6653 (make_gdb_type_flags): Likewise.
6654 (make_gdb_type_enum): Likewise.
6655 (make_gdb_type): New function.
6656 (tdesc_register_type): Use static make_gdb_type.
6658 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6660 * infcmd.c (default_print_one_register_info): Align natural-format
6661 column values consistently one under another.
6662 (pad_to_column): New function.
6664 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6666 * dwarf2read.c (dwarf2_physname): Move commment.
6668 2018-02-01 Leszek Swirski <leszeks@google.com>
6670 * varobj.c (varobj_formatted_print_options): Allow recursive
6671 pretty printing if pretty printing is enabled.
6673 2018-02-01 Leszek Swirski <leszeks@google.com>
6675 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6676 names after a structop as a filename.
6678 2018-02-01 Yao Qi <yao.qi@linaro.org>
6680 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6681 (arm_record_coproc_data_proc): Likewise.
6683 2018-02-01 Yao Qi <yao.qi@linaro.org>
6685 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6687 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6689 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6690 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6692 2018-01-31 Pedro Alves <palves@redhat.com>
6694 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6695 * inflow.c (child_terminal_save_inferior): Wrap reference to
6696 tcgetpgrp in HAVE_TERMIOS_H.
6697 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6699 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6700 always iterate over all inferiors.
6701 (gdbsim_cntrl_c): Adjust.
6702 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6704 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6706 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6707 index type is objfile-owned if the element type is as well.
6709 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6713 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6715 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6716 "features/s390x-linux64.c".
6717 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6718 s390_linux32 and s390x_linux64.
6719 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6721 * s390-tdep.c: Include "features/s390-linux32.c" and
6722 "features/s390x-linux64.c".
6723 (s390_tdesc_valid): Add check for tdesc_has_registers.
6724 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6725 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6726 tdesc_s390x_linux64.
6727 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6728 tdesc_s390x_linux64 to...
6729 * s390-tdep.h: ...here.
6731 2018-01-30 Pedro Alves <palves@redhat.com>
6734 * config.in, configure: Regenerate.
6735 * configure.ac: Check for getpgid.
6736 * go32-nat.c (go32_pass_ctrlc): New.
6737 (go32_target): Install it.
6738 * inf-child.c (inf_child_target): Install
6739 child_terminal_save_inferior, child_pass_ctrlc and
6741 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6742 (inf_ptrace_target): No longer install it.
6743 * infcmd.c (interrupt_target_1): Adjust.
6744 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6745 (child_interrupt): Declare.
6746 (inferior::terminal_state): New.
6747 * inflow.c (struct terminal_info): Update comments.
6748 (inferior_process_group): Delete.
6749 (terminal_is_ours): Delete.
6750 (gdb_tty_state): New.
6751 (child_terminal_init): Adjust.
6752 (is_gdb_terminal, sharing_input_terminal_1)
6753 (sharing_input_terminal): New functions.
6754 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6755 Set the process's actual process group in the foreground if
6756 possible. Handle is_ours_for_output/is_ours distinction. Don't
6757 mark terminal as the inferior's if not sharing GDB's terminal.
6758 Don't check attach_flag.
6759 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6760 pass down a target_terminal_state.
6761 (child_terminal_save_inferior): New, factored out from ...
6762 (child_terminal_ours_1): ... this. Handle
6763 target_terminal_state::is_ours_for_output.
6764 (child_interrupt, child_pass_ctrlc): New.
6765 (inflow_inferior_exit): Clear the inferior's terminal_state.
6766 (copy_terminal_info): Copy the inferior's terminal state.
6767 (_initialize_inflow): Remove reference to terminal_is_ours.
6768 * inflow.h (inferior_process_group): Delete.
6769 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6770 * procfs.c (procfs_target): Don't install procfs_interrupt.
6771 (procfs_interrupt): Delete.
6772 * remote.c (remote_serial_quit_handler): Adjust.
6773 (remote_interrupt): Remove ptid parameter. Adjust.
6774 * target-delegates.c: Regenerate.
6775 * target.c: Include "terminal.h".
6776 (target_terminal::terminal_state): Rename to ...
6777 (target_terminal::m_terminal_state): ... this.
6778 (target_terminal::init): Adjust.
6779 (target_terminal::inferior): Adjust to per-inferior
6781 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6782 (target_terminal::ours, target_terminal::ours_for_output): Use
6783 target_terminal_is_ours_kind.
6784 (target_interrupt): Remove ptid parameter. Adjust.
6785 (default_target_pass_ctrlc): Adjust.
6786 * target.h (target_ops::to_terminal_save_inferior): New field.
6787 (target_ops::to_interrupt): Remove ptid_t parameter.
6788 (target_interrupt): Remove ptid_t parameter. Update comment.
6789 (target_pass_ctrlc): Update comment.
6790 * target/target.h (target_terminal_state): New scoped enum,
6792 (target_terminal::terminal_state): ... here.
6793 (target_terminal::inferior): Update comments.
6794 (target_terminal::restore_inferior): New.
6795 (target_terminal::is_inferior, target_terminal::is_ours)
6796 (target_terminal::is_ours_for_output): Adjust.
6797 (target_terminal::scoped_restore_terminal_state): Adjust to
6798 rename, and call restore_inferior() instead of inferior().
6799 (target_terminal::scoped_restore_terminal_state::m_state): Change
6801 (target_terminal::terminal_state): Rename to ...
6802 (target_terminal::m_terminal_state): ... this and change type.
6804 2018-01-30 Pedro Alves <palves@redhat.com>
6806 * linux-nat.c (wait_for_signal): New function.
6807 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6809 (async_terminal_is_ours)
6810 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6811 (linux_nat_add_target): Don't override
6812 to_terminal_inferior/to_terminal_ours.
6814 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
6816 * remote.c (remote_follow_fork): Don't call "detach_inferior".
6818 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
6820 * dwarf2read.c (free_dwo_files): Add forward-declaration.
6821 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6822 dwarf2_per_objfile_free here.
6823 (dwarf2_per_objfile_free): Remove.
6824 (_initialize_dwarf2_read): Don't register
6825 dwarf2_per_objfile_free as a registry cleanup.
6827 2018-01-27 Eli Zaretskii <eliz@gnu.org>
6829 Avoid compilation errors in MinGW native builds
6831 The error is triggered by including python-internal.h, and the
6834 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6835 from build-gnulib/import/math.h:27,
6836 from d:/usr/Python26/include/pyport.h:235,
6837 from d:/usr/Python26/include/Python.h:58,
6838 from python/python-internal.h:94,
6839 from python/py-arch.c:24:
6840 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6844 This happens because Python headers define 'hypot' to expand t
6845 '_hypot' in the Windows builds.
6846 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6847 'hypoth'. This avoids a compilation error.
6849 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6851 * MAINTAINERS (Write After Approval): Fix ordering.
6853 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6855 * MAINTAINERS (Write After Approval): Add Alan Hayward.
6857 2018-01-26 Alan Modra <amodra@gmail.com>
6859 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6860 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6861 Remove nop. Make const. Comment.
6862 (powerpc32_plt_stub_so_2): New.
6863 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6864 Correct count. Update uses.
6865 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6866 Move common code reading PLT entry word. Correct
6867 powerpc32_plt_stub PLT address calculation.
6868 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6869 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6870 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6871 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6872 (ppc64_standard_linkage8): Likewise.
6873 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6874 Correct insns description.
6875 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6877 2018-01-24 Pedro Alves <palves@redhat.com>
6879 GCC PR libstdc++/83906
6880 * gdbtypes.c (operator==(const dynamic_prop &,
6881 const dynamic_prop &)): New.
6882 (operator==(const range_bounds &, const range_bounds &)): New.
6883 (check_types_equal): Use them instead of memcmp.
6884 * gdbtypes.h (operator==(const dynamic_prop &,
6885 const dynamic_prop &)): Declare.
6886 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6887 (operator==(const range_bounds &, const range_bounds &)): Declare.
6888 (operator!=(const range_bounds &, const range_bounds &)): Declare.
6890 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6892 * s390-linux-tdep.c (s390_record_address_mask)
6893 (s390_record_calc_disp_common, s390_record_calc_disp)
6894 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6895 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6896 (s390_process_record): Move to s390-tdep.c.
6897 (s390_linux_init_abi_any): Adjust.
6898 * s390-tdep.c (s390_record_address_mask)
6899 (s390_record_calc_disp_common, s390_record_calc_disp)
6900 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6901 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6902 (s390_process_record): Moved from s390-linux-tdep.c
6903 (s390_gdbarch_init): Adjust.
6905 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6907 * s390-linux-nat.c (s390-tdep.h): New include.
6908 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6909 (HFILES_NO_SRCDIR): Add s390-tdep.h.
6910 (ALLDEPFILES): Add s390-tdep.c.
6911 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6912 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6913 * s390-tdep.h: ...this. New file.
6914 * s390-linux-tdep.c (s390-tdep.h): New include.
6915 (_initialize_s390_tdep): Rename to...
6916 (_initialize_s390_linux_tdep): ...this and adjust.
6917 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6918 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6920 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6921 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6922 (s390_is_partial_instruction, s390_software_single_step)
6923 (is_non_branch_ril, s390_displaced_step_copy_insn)
6924 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6925 (s390_prologue_data, s390_addr, s390_store, s390_load)
6926 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6927 (s390_register_call_saved, s390_guess_tracepoint_registers)
6928 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6929 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6930 (s390_pseudo_register_name, s390_pseudo_register_type)
6931 (s390_pseudo_register_read, s390_pseudo_register_write)
6932 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6933 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6934 (s390_addr_bits_remove, s390_address_class_type_flags)
6935 (s390_address_class_type_flags_to_name)
6936 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6937 (s390_function_arg_float, s390_function_arg_vector)
6938 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6939 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6940 (s390_frame_align, s390_register_return_value, s390_return_value)
6941 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6942 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6943 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6944 (s390_trad_frame_prev_register, s390_unwind_cache)
6945 (s390_prologue_frame_unwind_cache)
6946 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6947 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6948 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6949 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6950 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6951 (s390_frame_base_address, s390_local_base_address)
6952 (s390_frame_base, s390_gcc_target_options)
6953 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6954 (s390_validate_reg_range, s390_tdesc_valid)
6955 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6956 * s390-tdep.c: ...this. New file.
6958 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6960 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6961 (s390_process_record, s390_gdbarch_tdep_alloc)
6962 (s390_linux_init_abi_any): Use/set new hook.
6964 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6966 * s390-linux-tdep.c (osabi.h): New include.
6967 (s390_linux_init_abi_31, s390_linux_init_abi_64)
6968 (s390_linux_init_abi_any): New functions.
6969 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6971 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6973 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6974 tdesc_has_registers check
6976 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6978 * s390-linux-tdep.c (s390_tdesc_valid): New function.
6979 (s390_validate_reg_range): New macro.
6980 (s390_gdbarch_init): Adjust.
6982 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6984 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6985 (s390_gdbarch_tdep_alloc): Adjust.
6986 (s390_gdbarch_init): Adjust.
6988 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6990 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6991 <have_tdb>: Change type to bool.
6992 (s390_gdbarch_tdep_alloc): Adjust.
6993 (s390_gdbarch_init): Adjust.
6995 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6997 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6998 (gdbarch_tdep) <have_upper, have_vx>: New fields.
6999 (s390_gdbarch_tdep_alloc): New function.
7000 (s390_gdbarch_init): Allocate tdep at start and use its fields
7001 instead of separate variables.
7003 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7005 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7006 when looking for cached gdbarch and add comment for remaining.
7008 2018-01-22 Pedro Alves <palves@redhat.com>
7009 Sergio Durigan Junior <sergiodj@redhat.com>
7011 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7014 2018-01-22 Maciej W. Rozycki <macro@mips.com>
7016 * MAINTAINERS: Update my company e-mail address.
7018 2018-01-22 Yao Qi <yao.qi@linaro.org>
7020 * regcache.c (cooked_write_test): New function.
7021 (_initialize_regcache): Register the test.
7023 2018-01-22 Yao Qi <yao.qi@linaro.org>
7025 * ia64-tdep.c (ia64_pseudo_register_read): Call
7026 regcache->cooked_read instead of regcache_cooked_read_unsigned.
7027 * m32c-tdep.c (m32c_cat_read): Likewise.
7028 (m32c_r3r2r1r0_read): Likewise.
7029 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7030 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7032 2018-01-22 Yao Qi <yao.qi@linaro.org>
7034 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
7035 method raw_read instead of regcache_raw_read.
7036 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7037 * arm-tdep.c (arm_neon_quad_read): Likewise.
7038 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7039 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7040 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7041 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
7042 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7043 (i386_pseudo_register_read_into_value): Likewise.
7044 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7045 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7046 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7047 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
7048 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
7049 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7050 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7051 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7052 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
7054 2018-01-22 Yao Qi <yao.qi@linaro.org>
7056 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
7057 * configure.tgt: Remove target mt.
7058 * mt-tdep.c: Remove.
7059 * regcache.c (cooked_read_test): Remove the check for mt.
7061 2018-01-22 Yao Qi <yao.qi@linaro.org>
7063 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
7064 instead of gdbarch_pseudo_register_read_value.
7066 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7068 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7071 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7073 * linespec.c (create_sals_line_offset): Remove code that preserved
7074 the symtab_and_line's line number.
7076 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7078 * varobj.c (varobj_create): Don't set valid_block when creating a
7081 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7083 * varobj.c (varobj_create): Remove out of date comment.
7085 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7088 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7089 updating innermost block.
7090 * parse.c (innermost_block_tracker::update): Take extra type
7091 parameter, and check types match before updating innermost block.
7092 (write_dollar_variable): Update innermost block for registers.
7093 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7094 (innermost_block_tracker::innermost_block_tracker): Initialise
7096 (innermost_block_tracker::reset): Take type parameter.
7097 (innermost_block_tracker::update): Take type parameter, and pass
7098 type through as needed.
7099 (innermost_block_tracker::m_types): New member.
7100 * varobj.c (varobj_create): Pass type when reseting innermost
7103 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7105 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7106 * ada-lang.c (resolve_subexp): Likewise.
7107 * breakpoint.c (set_breakpoint_condition) Likewise.
7108 (watch_command_1) Likewise.
7109 * c-exp.y (variable): Likewise.
7110 * d-exp.y (PrimaryExpression): Likewise.
7111 * f-exp.y (variable): Likewise.
7112 * go-exp.y (variable): Likewise.
7113 * m2-exp.y (variable): Likewise.
7114 * objfiles.c (objfile::~objfile): Likewise.
7115 * p-exp.y (variable): Likewise.
7116 * parse.c (innermost_block): Change type.
7117 * parser-defs.h (class innermost_block_tracker): New.
7118 (innermost_block): Change to innermost_block_tracker.
7119 * printcmd.c (display_command): Switch to innermost_block API.
7120 (do_one_display): Likewise.
7121 * rust-exp.y (do_one_display): Likewise.
7122 * symfile.c (clear_symtab_users): Likewise.
7123 * varobj.c (varobj_create): Switch to innermost_block API, replace
7124 use of innermost_block with block stored on varobj object.
7126 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7128 * expression.h (innermost_block): Remove declaration.
7129 * varobj.c: Add 'parser-defs.h' include.
7131 2018-01-19 Tom Tromey <tom@tromey.com>
7133 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7134 symbols in the static and global blocks.
7136 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7138 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7139 gdb_ptrace.h, and move including gdb_wait.h ...
7140 * nat/linux-ptrace.h: ... to here.
7142 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7144 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7145 inf_ptrace_detach_success.
7146 (inf_ptrace_detach_success): Add inferior parameter, use it
7147 instead of inferior_ptid, pass it to detach_inferior.
7148 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7150 * inferior.c (detach_inferior): Add overload that takes an
7152 * inferior.h (detach_inferior): Likewise.
7153 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7154 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7155 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7157 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7159 * target.h (struct target_ops) <to_detach>: Add inferior
7161 (target_detach): Likewise.
7162 * target.c (dispose_inferior): Pass inferior down.
7163 (target_detach): Pass inferior down. Assert that it is equal to
7164 the current inferior.
7165 * aix-thread.c (aix_thread_detach): Pass inferior down.
7166 * corefile.c (core_file_command): Pass current_inferior() down.
7167 * corelow.c (core_detach): Add inferior parameter.
7168 * darwin-nat.c (darwin_detach): Likewise.
7169 * gnu-nat.c (gnu_detach): Likewise.
7170 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7171 * infcmd.c (detach_command): Pass current_inferior() down to
7173 * infrun.c (follow_fork_inferior): Pass parent_inf to
7175 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7177 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7178 * linux-thread-db.c (thread_db_detach): Likewise.
7179 * nto-procfs.c (procfs_detach): Likewise.
7180 * procfs.c (procfs_detach): Likewise.
7181 * record.c (record_detach): Likewise.
7182 * record.h (struct inferior): Forward-declare.
7183 (record_detach): Add inferior parameter.
7184 * remote-sim.c (gdbsim_detach): Likewise.
7185 * remote.c (remote_detach_1): Likewise.
7186 (remote_detach): Likewise.
7187 (extended_remote_detach): Likewise.
7188 * sol-thread.c (sol_thread_detach): Likewise.
7189 * target-debug.h (target_debug_print_inferior_p): New macro.
7190 * target-delegates.c: Re-generate.
7191 * top.c (kill_or_detach): Pass inferior down to target_detach.
7192 * windows-nat.c (windows_detach): Add inferior parameter.
7194 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7196 * target.h (struct target_ops) <to_detach>: Remove args
7198 (target_detach): Likewise.
7199 * target.c (dispose_inferior): Adjust.
7200 (target_detach): Remove args parameter, adjust.
7201 * aix-thread.c (aix_thread_detach): Adjust.
7202 * corefile.c (core_file_command): Adjust.
7203 * corelow.c (core_detach): Adjust.
7204 * darwin-nat.c (darwin_detach): Adjust.
7205 * gnu-nat.c (gnu_detach): Adjust.
7206 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7207 * infcmd.c (detach_command): Adjust
7208 * infrun.c (follow_fork_inferior): Adjust.
7209 (handle_vfork_child_exec_or_exit): Adjust.
7210 * linux-fork.c (linux_fork_detach): Remove args parameter.
7211 * linux-fork.h (linux_fork_detach): Likewise.
7212 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7213 * linux-thread-db.c (thread_db_detach): Likewise.
7214 * nto-procfs.c (procfs_detach): Likewise.
7215 * procfs.c (procfs_detach): Likewise.
7216 (do_detach): Remove signo parameter.
7217 * record.c (record_detach): Remove args parameter.
7218 * record.h (record_detach): Likewise.
7219 * remote-sim.c (gdbsim_detach): Likewise.
7220 * remote.c (remote_detach_1): Likewise.
7221 (remote_detach): Likewise.
7222 (extended_remote_detach): Likewise.
7223 * sol-thread.c (sol_thread_detach): Likewise.
7224 * target-delegates.c: Re-generate.
7225 * top.c (struct qt_args) <args>: Remove field.
7226 (kill_or_detach): Don't pass args.
7227 (quit_force): Don't set args.
7228 * windows-nat.c (windows_detach): Remove args parameter.
7230 2018-01-19 Yao Qi <yao.qi@linaro.org>
7232 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7233 (arm_linux_init_abi): Install it.
7235 2018-01-19 Yao Qi <yao.qi@linaro.org>
7237 * osabi.c (gdb_osabi_names): Extend the regexp for
7238 arm-linux-gnueabihf.
7240 2018-01-18 Yao Qi <yao.qi@linaro.org>
7242 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7244 (abbrev_table::add_abbrev): Update.
7245 (abbrev_table::lookup_abbrev): Update.
7247 2018-01-18 Yao Qi <yao.qi@linaro.org>
7249 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7251 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7253 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7256 2018-01-17 Tom Tromey <tom@tromey.com>
7258 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7260 2018-01-17 Tom Tromey <tom@tromey.com>
7262 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7263 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7264 (create_array_type_with_stride): Update.
7265 * dwarf2read.c (set_die_type): Update.
7267 2018-01-17 Tom Tromey <tom@tromey.com>
7269 * dwarf2read.c (delayed_method_info): Remove typedef.
7270 (dwarf2_cu::method_info): Now a std::vector.
7271 (add_to_method_list): Update.
7272 (free_delayed_list): Remove.
7273 (compute_delayed_physnames): Update.
7274 (process_full_comp_unit, process_full_type_unit): Clear the method
7275 list. Remove cleanups.
7276 (psymtab_include_file_name): Add name_holder parameter. Use
7278 (dwarf_decode_lines): Update.
7280 2018-01-17 Tom Tromey <tom@tromey.com>
7281 Simon Marchi <simon.marchi@ericsson.com>
7283 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7284 (dwarf2_per_objfile::free_cached_comp_units)
7285 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7286 (init_cutu_and_read_dies_no_follow): Update.
7287 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7288 (dwarf2_cu::~dwarf2_cu): New.
7289 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7290 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7292 2018-01-17 Tom Tromey <tom@tromey.com>
7293 Simon Marchi <simon.marchi@ericsson.com>
7295 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7296 (struct die_reader_specs) <abbrev_table>: New member.
7297 (struct abbrev_table): Add constructor.
7298 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7299 <abbrev_obstack>: Now an auto_obstack.
7300 (abbrev_table_up): New typedef.
7301 (init_cu_die_reader): Add abbrev_table parameter.
7302 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7303 Add result_dwo_abbrev_table.
7304 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7305 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7307 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7309 (skip_children): Update.
7310 (abbrev_table::alloc_abbrev): Rename from
7311 abbrev_table_alloc_abbrev.
7312 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7313 (abbrev_table::lookup_abbrev): Rename from
7314 abbrev_table_lookup_abbrev.
7315 (abbrev_table_read_table): Return abbrev_table_up.
7316 (abbrev_table_free, abbrev_table_free_cleanup)
7317 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7318 (load_partial_dies): Update.
7320 2018-01-17 Tom Tromey <tom@tromey.com>
7322 * dwarf2read.c (dwarf2_compute_name): Update comment.
7323 (read_func_scope, read_variable): Update.
7324 (new_symbol): Remove.
7325 (new_symbol_full): Rename to new_symbol.
7327 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7330 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7331 a warning instead of throwing an error, set section size to 0 and return
7333 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7335 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7337 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7339 (linux_ptrace_attach_fail_reason_string): Likewise.
7340 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7342 (linux_ptrace_attach_fail_reason_string): Likewise.
7343 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7345 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7347 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7349 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7352 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7353 checking for fs_base/gs_base fields in struct user_regs_struct.
7354 * configure: Regenerate.
7356 2018-01-17 Yao Qi <yao.qi@linaro.org>
7358 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7360 (aarch64_linux_init_abi): Install it to gdbarch hook
7363 2018-01-15 Pedro Alves <palves@redhat.com>
7365 * common/signals-state-save-restore.c
7366 (save_original_signals_state): Fix typos.
7368 2017-01-12 Tom Tromey <tom@tromey.com>
7369 Sergio Durigan Junior <sergiodj@redhat.com>
7371 * Makefile.in (install-only): Install gdb-add-index.
7373 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7375 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7377 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7379 * infrun.c (keep_going_pass_signal): Clear step-over info when
7380 insert_breakpoints fails.
7382 2018-01-11 Pedro Alves <palves@redhat.com>
7385 * infrun.c (resume): Rename to ...
7386 (resume_1): ... this.
7387 (resume): Reimplement as wrapper around resume_1.
7389 2018-01-11 Pedro Alves <palves@redhat.com>
7392 * remote.c (remote_parse_stop_reply): Default to the last-set
7393 general thread instead of to 'magic_null_ptid'.
7395 2018-01-10 Pedro Alves <palves@redhat.com>
7397 * language.h (language_get_symbol_name_matcher): Rename ...
7398 (get_symbol_name_matcher): ... this.
7399 * language.c (language_get_symbol_name_matcher): Ditto.
7400 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7403 2018-01-10 Pedro Alves <palves@redhat.com>
7407 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7408 Adjust to use language_get_symbol_name_matcher instead of
7409 language_defn::la_get_symbol_name_matcher.
7410 * language.c (language_get_symbol_name_matcher): If in Ada mode
7411 and the lookup name is a verbatim match, return Ada's matcher.
7412 * language.h (language_get_symbol_name_matcher): Adjust comment.
7413 (ada_lookup_name_info::verbatim_p):: New method.
7415 2018-01-10 Pedro Alves <palves@redhat.com>
7418 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7419 minsym's language is language_auto or language_cplus, pass down
7420 language_ada instead.
7421 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7423 2018-01-10 Pedro Alves <palves@redhat.com>
7426 * minsyms.c (linkage_name_str): New function.
7427 (iterate_over_minimal_symbols): Use it.
7429 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7431 * NEWS: Document that 'info proc' now works on FreeBSD.
7433 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7435 * configure.ac: Check for kinfo_getfile in libutil.
7436 * configure: Regenerate.
7437 * config.in: Regenerate.
7438 * fbsd-nat.c: Include "fbsd-tdep.h".
7439 (fbsd_fetch_cmdline): New.
7440 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7441 rather than calling error.
7442 (fbsd_info_proc): New.
7443 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7444 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7445 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7447 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7449 * fbsd-nat.c (struct free_deleter): Remove.
7450 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7452 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7454 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7455 NULL for an empty pathname.
7457 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7459 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7460 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7461 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7462 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7463 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7464 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7465 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7466 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7467 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7468 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7469 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7470 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7471 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7472 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7473 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7475 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7477 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7478 (gnu_xfer_auxv): New function.
7479 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7482 2018-01-08 Yao Qi <yao.qi@linaro.org>
7483 Simon Marchi <simon.marchi@ericsson.com>
7485 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7487 (COMMON_OBS): Remove selftest.o.
7488 * configure.ac: Append selftest-arch.c and common/selftest.c to
7489 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7490 * configure: Re-generated.
7491 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7493 (maintenance_info_selftests): Likewise.
7495 2018-01-08 Xavier Roirand <roirand@adacore.com>
7497 * ada-valprint.c (val_print_packed_array_elements): Use
7498 proper number of elements when printing an array indexed
7499 by an enumeration type.
7501 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7503 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7504 (dw2_get_file_names_reader): Adjust.
7505 (lookup_dwo_signatured_type): Adjust.
7506 (lookup_dwp_signatured_type): Adjust.
7507 (lookup_signatured_type): Adjust.
7508 (create_type_unit_group): Adjust.
7509 (get_type_unit_group): Adjust.
7510 (process_psymtab_comp_unit_reader): Adjust.
7511 (build_type_psymtabs_reader): Adjust.
7512 (scan_partial_symbols): Adjust.
7513 (add_partial_symbol): Adjust.
7514 (add_partial_subprogram): Adjust.
7515 (peek_die_abbrev): Adjust.
7516 (fixup_go_packaging): Adjust.
7517 (process_imported_unit_die): Adjust.
7518 (dwarf2_compute_name): Adjust.
7519 (dwarf2_physname): Adjust.
7520 (read_import_statement): Adjust.
7521 (handle_DW_AT_stmt_list): Adjust.
7522 (read_file_scope): Adjust.
7523 (read_func_scope): Adjust.
7524 (read_lexical_block_scope): Adjust.
7525 (read_call_site_scope): Adjust.
7526 (read_variable): Adjust.
7527 (dwarf2_rnglists_process): Adjust.
7528 (dwarf2_ranges_process): Adjust.
7529 (dwarf2_ranges_read): Adjust.
7530 (dwarf2_get_pc_bounds): Adjust.
7531 (dwarf2_record_block_ranges): Adjust.
7532 (dwarf2_add_field): Adjust.
7533 (dwarf2_add_member_fn): Adjust.
7534 (read_structure_type): Adjust.
7535 (process_structure_scope): Adjust.
7536 (read_enumeration_type): Adjust.
7537 (read_array_type): Adjust.
7538 (mark_common_block_symbol_computed): Adjust.
7539 (read_common_block): Adjust.
7540 (read_namespace_type): Adjust.
7541 (read_namespace): Adjust.
7542 (read_module_type): Adjust.
7543 (read_tag_pointer_type): Adjust.
7544 (read_tag_ptr_to_member_type): Adjust.
7545 (read_tag_string_type): Adjust.
7546 (read_subroutine_type): Adjust.
7547 (read_typedef): Adjust.
7548 (read_base_type): Adjust.
7549 (attr_to_dynamic_prop): Adjust.
7550 (read_subrange_type): Adjust.
7551 (read_unspecified_type): Adjust.
7552 (dwarf2_read_abbrevs): Adjust.
7553 (load_partial_dies): Adjust.
7554 (read_partial_die): Adjust.
7555 (find_partial_die): Adjust.
7556 (guess_partial_die_structure_name): Adjust.
7557 (fixup_partial_die): Adjust.
7558 (read_attribute_value): Adjust.
7559 (read_addr_index): Adjust.
7560 (read_addr_index_from_leb128): Adjust.
7561 (read_str_index): Adjust.
7562 (dwarf2_string_attr): Adjust.
7563 (get_debug_line_section): Adjust.
7564 (dwarf_decode_line_header): Adjust.
7565 (lnp_state_machine::check_line_address): Adjust.
7566 (dwarf_decode_lines_1): Adjust.
7567 (dwarf_decode_lines): Adjust.
7568 (dwarf2_start_symtab): Adjust.
7569 (var_decode_location): Adjust.
7570 (new_symbol_full): Adjust.
7571 (dwarf2_const_value_data): Adjust.
7572 (dwarf2_const_value_attr): Adjust.
7573 (dwarf2_const_value): Adjust.
7575 (die_containing_type): Adjust.
7576 (build_error_marker_type): Adjust.
7577 (lookup_die_type): Adjust.
7578 (guess_full_die_structure_name): Adjust.
7579 (anonymous_struct_prefix): Adjust.
7580 (determine_prefix): Adjust.
7581 (dwarf2_name): Adjust.
7582 (follow_die_ref_or_sig): Adjust.
7583 (follow_die_offset): Adjust.
7584 (follow_die_ref): Adjust.
7585 (follow_die_sig_1): Adjust.
7586 (follow_die_sig): Adjust.
7587 (get_signatured_type): Adjust.
7588 (get_DW_AT_signature_type): Adjust.
7589 (decode_locdesc): Adjust.
7590 (dwarf_decode_macros): Adjust.
7591 (cu_debug_loc_section): Adjust.
7592 (fill_in_loclist_baton): Adjust.
7593 (dwarf2_symbol_mark_computed): Adjust.
7594 (init_one_comp_unit): Don't assign
7595 dwarf2_cu::dwarf2_per_objfile.
7596 (set_die_type): Adjust.
7598 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7600 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7601 <dwarf2_per_objfile>: New field.
7602 (dwarf2_per_objfile): Remove global.
7603 (get_dwarf2_per_objfile): New function.
7604 (set_dwarf2_per_objfile): New function.
7605 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7607 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7608 (read_abbrev_offset): Likewise.
7609 (read_indirect_string): Likewise.
7610 (read_indirect_line_string): Likewise.
7611 (read_indirect_string_at_offset): Likewise.
7612 (read_indirect_string_from_dwz): Likewise.
7613 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7615 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7616 (create_all_comp_units): Change objfile parameter to
7618 (create_all_type_units): Likewise.
7619 (process_queue): Add dwarf2_per_objfile parameter.
7620 (read_and_check_comp_unit_head): Likewise.
7621 (lookup_dwo_unit_in_dwp): Likewise.
7622 (get_dwp_file): Likewise.
7623 (process_cu_includes): Likewise.
7624 (struct free_dwo_file_cleanup_data): New struct.
7625 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7626 set_dwarf2_per_objfile.
7627 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7628 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7629 context, adjust calls.
7630 (dw2_instantiate_symtab): Likewise.
7631 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7632 (dw2_get_cu): Likewise.
7633 (create_cu_from_index_list): Change objfile parameter to
7635 (create_cus_from_index_list): Get dwarf2_per_objfile from
7636 context, adjust calls.
7637 (create_cus_from_index): Likewise.
7638 (create_signatured_type_table_from_index): Change objfile
7639 parameter to dwarf2_per_objfile.
7640 (create_signatured_type_table_from_debug_names): Change objfile
7641 parameter to dwarf2_per_objfile.
7642 (create_addrmap_from_index): Likewise.
7643 (create_addrmap_from_aranges): Likewise.
7644 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7645 (dw2_setup): Remove.
7646 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7648 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7649 get_dwarf2_per_objfile.
7650 (dw2_forget_cached_source_info): Likewise.
7651 (dw2_map_symtabs_matching_filename): Likewise.
7652 (struct dw2_symtab_iterator) <index>: Remove.
7653 <dwarf2_per_objfile>: New field.
7654 (dw2_symtab_iter_init): Replace index parameter with
7656 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7657 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7658 (dw2_print_stats): Likewise.
7659 (dw2_dump): Likewise.
7660 (dw2_expand_symtabs_for_function): Likewise.
7661 (dw2_expand_all_symtabs): Likewise.
7662 (dw2_expand_symtabs_with_fullname): Likewise.
7663 (dw2_expand_marked_cus): Replace index and objfile parameters
7664 with dwarf2_per_objfile.
7665 (dw_expand_symtabs_matching_file_matcher): Add
7666 dwarf2_per_objfile parameter and adjust calls.
7667 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7669 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7670 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7672 (create_cus_from_debug_names_list): Replace objfile parameter
7673 with dwarf2_per_objfile and adjust calls.
7674 (create_cus_from_debug_names): Likewise.
7675 (dwarf2_read_debug_names): Likewise.
7676 (mapped_debug_names::namei_to_name): Adjust call.
7677 (dw2_debug_names_iterator::next): Likewise.
7678 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7679 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7680 (dw2_debug_names_dump): Likewise.
7681 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7682 (dw2_debug_names_expand_symtabs_matching): Likewise.
7683 (dwarf2_initialize_objfile): Likewise.
7684 (dwarf2_build_psymtabs): Likewise.
7685 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7687 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7688 (read_and_check_comp_unit_head): Likewise.
7689 (read_abbrev_offset): Likewise.
7690 (create_debug_type_hash_table): Likewise.
7691 (create_debug_types_hash_table): Likewise.
7692 (create_all_type_units): Replace objfile parameter with
7694 (add_type_unit): Add dwarf2_per_objfile parameter.
7695 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7696 with dwarf2_per_objfile.
7697 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7698 (lookup_dwp_signatured_type): Likewise.
7699 (lookup_signatured_type): Likewise.
7700 (read_cutu_die_from_dwo): Likewise.
7701 (init_tu_and_read_dwo_dies): Likewise.
7702 (init_cutu_and_read_dies): Likewise.
7703 (init_cutu_and_read_dies_no_follow): Likewise.
7704 (allocate_type_unit_groups_table): Add objfile parameter.
7705 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7706 (get_type_unit_group): Likewise.
7707 (process_psymtab_comp_unit): Update call.
7708 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7709 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7710 (print_tu_stats): Likewise.
7711 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7713 (build_type_psymtabs): Change objfile parameter to
7715 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7716 passed in void* parameter.
7717 (process_skeletonless_type_units): Change objfile parameter to
7719 (set_partial_user): Likewise.
7720 (dwarf2_build_psymtabs_hard): Likewise.
7721 (read_comp_units_from_section): Likewise.
7722 (create_all_comp_units): Likewise.
7723 (scan_partial_symbols): Update calls.
7724 (add_partial_symbol): Likewise.
7725 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7726 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7727 (process_queue): Add dwarf2_per_objfile parameter.
7728 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7729 (compute_compunit_symtab_includes): Likewise.
7730 (process_cu_includes): Add dwarf2_per_objfile parameter.
7731 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7732 (process_full_type_unit): Likewise.
7733 (process_imported_unit_die): Update call.
7734 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7735 (read_file_scope): Likewise.
7736 (allocate_dwo_file_hash_table): Add objfile parameter.
7737 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7738 (create_cus_hash_table): Likewise.
7739 (create_dwp_hash_table): Likewise.
7740 (create_dwo_unit_in_dwp_v1): Likewise.
7741 (create_dwp_v2_section): Likewise.
7742 (create_dwo_unit_in_dwp_v2): Likewise.
7743 (lookup_dwo_unit_in_dwp): Likewise.
7744 (try_open_dwop_file): Likewise.
7745 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7746 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7747 cleanup to include a reference to dwarf2_per_objfile.
7748 (open_dwp_file): Add dwarf2_per_objfile parameter.
7749 (open_and_init_dwp_file): Likewise.
7750 (get_dwp_file): Likewise.
7751 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7752 (queue_and_load_all_dwo_tus): Update call.
7753 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7755 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7756 (dwarf2_ranges_process): Likewise.
7757 (dwarf2_get_pc_bounds): Likewise.
7758 (mark_common_block_symbol_computed): Likewise.
7759 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7760 (dwarf2_read_abbrevs): Update call.
7761 (read_partial_die): Use dwarf2_per_objfile from cu.
7762 (find_partial_die): Likewise.
7763 (fixup_partial_die): Likewise.
7764 (read_attribute_value): Likewise.
7765 (read_indirect_string_at_offset_from): Add objfile parameter.
7766 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7768 (read_indirect_string_from_dwz): Add objfile parameter.
7769 (read_indirect_string): Add objfile parameter.
7770 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7771 (read_addr_index): Use dwarf2_per_objfile from cu.
7772 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7774 (read_str_index): Use dwarf2_per_objfile from cu.
7775 (get_debug_line_section): Likewise.
7776 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7777 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7778 (new_symbol_full): Use dwarf2_per_objfile from cu.
7779 (build_error_marker_type): Likewise.
7780 (lookup_die_type): Likewise.
7781 (determine_prefix): Likewise.
7782 (follow_die_offset): Likewise.
7783 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7784 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7785 (dwarf2_fetch_die_type_sect_off): Likewise.
7786 (dwarf2_get_die_type): Likewise.
7787 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7788 (get_signatured_type): Likewise.
7789 (get_DW_AT_signature_type): Likewise.
7790 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7791 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7792 (cu_debug_loc_section): Likewise.
7793 (fill_in_loclist_baton): Likewise.
7794 (dwarf2_symbol_mark_computed): Likewise.
7795 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7797 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7799 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7800 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7801 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7802 (set_die_type): Use dwarf2_free_objfile from cu.
7803 (get_die_type_at_offset): Likewise.
7804 (dwarf2_per_objfile_free): Don't assign global variable.
7805 (debug_names) <constructor>: Add dwarf2_per_objfile
7806 parameter, update m_debugstrlookup construction.
7807 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7809 <m_dwarf2_per_objfile>: New field.
7810 <lookup>: Use m_dwarf2_per_objfile.
7811 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7812 (psyms_seen_size): Likewise.
7813 (write_gdbindex): Replace objfile parameter with
7815 (write_debug_names): Likewise.
7816 (write_psymtabs_to_index): Likewise.
7817 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7820 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7822 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7823 <dwarf2_per_objfile>: New field.
7824 (struct dwarf2_per_cu_data) <objfile>: Remove.
7825 <dwarf2_per_objfile>: New field.
7826 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7828 (create_signatured_type_table_from_index): Likewise.
7829 (create_debug_type_hash_table): Likewise.
7830 (fill_in_sig_entry_from_dwo_entry): Likewise.
7831 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7832 (create_type_unit_group): Assign dwarf2_per_objfile instead of
7834 (create_partial_symtab): Access objfile through
7836 (process_psymtab_comp_unit_reader): Likewise.
7837 (read_comp_units_from_section): Likewise.
7838 (scan_partial_symbols): Likewise.
7839 (add_partial_symbol): Likewise.
7840 (add_partial_subprogram): Likewise.
7841 (peek_die_abbrev): Likewise.
7842 (fixup_go_packaging): Likewise.
7843 (process_full_comp_unit): Likewise.
7844 (process_full_type_unit): Likewise.
7845 (process_imported_unit_die): Likewise.
7846 (dwarf2_compute_name): Likewise.
7847 (dwarf2_physname): Likewise.
7848 (read_import_statement): Likewise.
7849 (create_cus_hash_table): Assign dwarf2_physname instead of
7851 (read_func_scope): Access objfile through dwarf2_per_objfile.
7852 (read_lexical_block_scope): Likewise.
7853 (read_call_site_scope): Likewise.
7854 (read_variable): Likewise.
7855 (dwarf2_rnglists_process): Likewise.
7856 (dwarf2_ranges_process): Likewise.
7857 (dwarf2_ranges_read): Likewise.
7858 (dwarf2_record_block_ranges): Likewise.
7859 (dwarf2_add_field): Likewise.
7860 (dwarf2_add_member_fn): Likewise.
7861 (read_structure_type): Likewise.
7862 (process_structure_scope): Likewise.
7863 (read_enumeration_type): Likewise.
7864 (read_array_type): Likewise.
7865 (read_common_block): Likewise.
7866 (read_namespace_type): Likewise.
7867 (read_namespace): Likewise.
7868 (read_module_type): Likewise.
7869 (read_tag_pointer_type): Likewise.
7870 (read_tag_ptr_to_member_type): Likewise.
7871 (read_tag_string_type): Likewise.
7872 (read_subroutine_type): Likewise.
7873 (read_typedef): Likewise.
7874 (read_base_type): Likewise.
7875 (attr_to_dynamic_prop): Likewise.
7876 (read_subrange_type): Likewise.
7877 (read_unspecified_type): Likewise.
7878 (load_partial_dies): Likewise.
7879 (read_partial_die): Likewise.
7880 (find_partial_die): Likewise.
7881 (guess_partial_die_structure_name): Likewise.
7882 (fixup_partial_die): Likewise.
7883 (read_attribute_value): Likewise.
7884 (read_addr_index_from_leb128): Likewise.
7885 (dwarf2_read_addr_index): Likewise.
7886 (dwarf2_string_attr): Likewise.
7887 (lnp_state_machine::check_line_address): Likewise.
7888 (dwarf_decode_lines_1): Likewise.
7889 (dwarf_decode_lines): Likewise.
7890 (dwarf2_start_symtab): Likewise.
7891 (var_decode_location): Likewise.
7892 (new_symbol_full): Likewise.
7893 (dwarf2_const_value_data): Likewise.
7894 (dwarf2_const_value_attr): Likewise.
7895 (dwarf2_const_value): Likewise.
7896 (die_type): Likewise.
7897 (die_containing_type): Likewise.
7898 (lookup_die_type): Likewise.
7899 (guess_full_die_structure_name): Likewise.
7900 (anonymous_struct_prefix): Likewise.
7901 (dwarf2_name): Likewise.
7902 (follow_die_ref_or_sig): Likewise.
7903 (follow_die_offset): Likewise.
7904 (follow_die_ref): Likewise.
7905 (dwarf2_fetch_die_loc_sect_off): Likewise.
7906 (dwarf2_fetch_constant_bytes): Likewise.
7907 (dwarf2_fetch_die_type_sect_off): Likewise.
7908 (dwarf2_get_die_type): Likewise.
7909 (follow_die_sig): Likewise.
7910 (decode_locdesc): Likewise.
7911 (dwarf2_per_cu_objfile): Likewise.
7912 (dwarf2_per_cu_text_offset): Likewise.
7913 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7915 (set_die_type): Access objfile through
7918 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7920 * valprint.c (converted_character_d): Remove typedef.
7921 (DEF_VEC_O (converted_character_d)): Remove.
7922 (count_next_character): Use std::vector.
7923 (print_converted_chars_to_obstack): Likewise.
7924 (generic_printstr): Likewise.
7926 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7928 * xml-support.h (struct gdb_xml_value): Add constructor.
7929 <value>: Change type to unique_xmalloc_ptr.
7930 (gdb_xml_value_s): Remove typedef.
7931 (DEF_VEC_O (gdb_xml_value_s)): Remove.
7932 (gdb_xml_element_start_handler): Change parameter type to
7934 (xml_find_attribute): Likewise.
7935 * xml-support.c (xml_find_attribute): Change parameter type to
7936 std::vector and adjust.
7937 (gdb_xml_values_cleanup): Remove.
7938 (gdb_xml_parser::start_element): Adjust to std::vector.
7939 (xinclude_start_include): Change paraeter type to std::vector
7941 * btrace.c (check_xml_btrace_version): Likewise.
7942 (parse_xml_btrace_block): Likewise.
7943 (parse_xml_btrace_pt_config_cpu): Likewise.
7944 (parse_xml_btrace_pt): Likewise.
7945 (parse_xml_btrace_conf_bts): Likewise.
7946 (parse_xml_btrace_conf_pt): Likewise.
7947 * memory-map.c (memory_map_start_memory): Likewise.
7948 (memory_map_start_property): Likewise.
7949 * osdata.c (osdata_start_osdata): Likewise.
7950 (osdata_start_item): Likewise.
7951 (osdata_start_column): Likewise.
7952 * remote.c (start_thread): Likewise.
7953 * solib-aix.c (library_list_start_library): Likewise.
7954 (library_list_start_list): Likewise.
7955 * solib-svr4.c (library_list_start_library): Likewise.
7956 (svr4_library_list_start_list): Likewise.
7957 * solib-target.c (library_list_start_segment): Likewise.
7958 (library_list_start_section): Likewise.
7959 (library_list_start_library): Likewise.
7960 (library_list_start_list): Likewise.
7961 * tracepoint.c (traceframe_info_start_memory): Likewise.
7962 (traceframe_info_start_tvar): Likewise.
7963 * xml-syscall.c (syscall_start_syscall): Likewise.
7964 * xml-tdesc.c (tdesc_start_target): Likewise.
7965 (tdesc_start_feature): Likewise.
7966 (tdesc_start_reg): Likewise.
7967 (tdesc_start_union): Likewise.
7968 (tdesc_start_struct): Likewise.
7969 (tdesc_start_flags): Likewise.
7970 (tdesc_start_enum): Likewise.
7971 (tdesc_start_field): Likewise.
7972 (tdesc_start_enum_value): Likewise.
7973 (tdesc_start_vector): Likewise.
7975 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7977 * extension.h (struct xmethod_worker) <clone>: Remove.
7978 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7980 (python_xmethod_worker::clone): Remove.
7981 * valops.c (find_overload_match): Use std::move instead of
7984 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7986 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7987 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7988 <free_xmethod_worker_data>: Remove.
7989 <get_matching_xmethod_workers>: Chance VEC to std::vector.
7990 <get_xmethod_arg_types>: Remove.
7991 <get_xmethod_result_type>: Remove.
7992 <invoke_xmethod>: Remove.
7993 * extension.c (new_xmethod_worker): Remove.
7994 (clone_xmethod_worker): Remove.
7995 (get_matching_xmethod_workers): Return void, pass std::vector by
7997 (get_xmethod_arg_types): Rename to...
7998 (xmethod_worker::get_arg_types): ... this, and adjust.
7999 (get_xmethod_result_type): Rename to...
8000 (xmethod_worker::get_result_type): ... this, and adjust.
8001 (invoke_xmethod): Remove.
8002 (free_xmethod_worker): Remove.
8003 (free_xmethod_worker_vec): Remove.
8004 * extension.h (enum ext_lang_rc): Move here from
8006 (struct xmethod_worker): Add constructor and destructor.
8009 <invoke, clone, do_get_result_type, do_get_arg_types>: New
8010 virtual pure methods.
8011 <get_arg_types, get_result_type>: New methods.
8012 (xmethod_worker_ptr): Remove typedef.
8013 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8014 (xmethod_worker_vec): Remove typedef.
8015 (xmethod_worker_up): New typedef.
8016 (invoke_xmethod): Remove.
8017 (clone_xmethod_worker): Remove.
8018 (free_xmethod_worker): Remove.
8019 (free_xmethod_worker_vec): Remove.
8020 (get_xmethod_arg_types): Remove.
8021 (get_xmethod_result_type): Remove.
8022 * valops.c (find_method_list): Use std::vector, don't use
8023 intermediate vector.
8024 (value_find_oload_method_list): Use std::vector.
8025 (find_overload_match): Use std::vector.
8026 (find_oload_champ): Use std::vector.
8027 * value.c (value_free): Use operator delete.
8028 (value_of_xmethod): Rename to...
8029 (value_from_xmethod): ... this. Don't assign
8030 xmethod_worker::value, take rvalue-reference.
8031 (result_type_of_xmethod): Adjust.
8032 (call_xmethod): Adjust.
8033 * value.h: Include extension.h.
8034 (struct xmethod_worker): Don't forward-declare.
8035 (value_of_xmethod): Rename to...
8036 (value_from_xmethod): ... this, take rvalue-reference.
8037 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
8038 (struct python_xmethod_worker): ... this, add constructor and
8040 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
8041 (gdbpy_free_xmethod_worker_data): Rename to...
8042 (python_xmethod_worker::~python_xmethod_worker): ... this and
8044 (gdbpy_clone_xmethod_worker_data): Rename to...
8045 (python_xmethod_worker::clone): ... this and adjust.
8046 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
8048 (gdbpy_get_xmethod_arg_types): Rename to...
8049 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
8050 (gdbpy_get_xmethod_result_type): Rename to...
8051 (python_xmethod_worker::do_get_result_type): ... this and
8053 (gdbpy_invoke_xmethod): Rename to...
8054 (python_xmethod_worker::invoke): ... this and adjust.
8055 (new_python_xmethod_worker): Rename to...
8056 (python_xmethod_worker::python_xmethod_worker): ... this and
8058 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
8060 (gdbpy_free_xmethod_worker_data): Remove.
8061 (gdbpy_get_matching_xmethod_workers): Use std::vector.
8062 (gdbpy_get_xmethod_arg_types): Remove.
8063 (gdbpy_get_xmethod_result_type): Remove.
8064 (gdbpy_invoke_xmethod): Remove.
8065 * python/python.c (python_extension_ops): Remove obsolete
8068 2018-01-05 Pedro Alves <palves@redhat.com>
8071 * common/signals-state-save-restore.c
8072 (save_original_signals_state): New parameter 'quiet'. Warn if we
8073 find a custom handler preinstalled, instead of internal erroring.
8074 But only warn if !quiet.
8075 * common/signals-state-save-restore.h
8076 (save_original_signals_state): New parameter 'quiet'.
8077 * main.c (captured_main_1): Move save_original_signals_state call
8078 after option handling, and pass QUIET.
8080 2018-01-05 Pedro Alves <palves@redhat.com>
8082 * spu-tdep.c (spu_catch_start): Pass
8083 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8085 2018-01-05 Pedro Alves <palves@redhat.com>
8088 * ada-lang.c (literal_symbol_name_matcher): New function.
8089 (ada_get_symbol_name_matcher): Use it for
8090 symbol_name_match_type::SEARCH_NAME.
8091 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8092 it down instead of assuming symbol_name_match_type::FULL.
8093 * block.h (block_lookup_symbol): New parameter 'match_type'.
8094 * c-valprint.c (print_unpacked_pointer): Use
8095 lookup_symbol_search_name instead of lookup_symbol.
8096 * compile/compile-object-load.c (get_out_value_type): Pass down
8097 symbol_name_match_type::SEARCH_NAME.
8098 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8099 symbol_name_match_type::FULL.
8100 * cp-support.c (cp_get_symbol_name_matcher): Handle
8101 symbol_name_match_type::SEARCH_NAME.
8102 * infrun.c (insert_exception_resume_breakpoint): Use
8103 lookup_symbol_search_name.
8104 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8105 * psymtab.c (maintenance_check_psymtabs): Use
8106 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8107 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8109 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8110 if symbol_name_match_type::SEARCH_NAME.
8111 (lookup_symbol_in_language): Pass down
8112 symbol_name_match_type::FULL.
8113 (lookup_symbol_search_name): New.
8114 (lookup_language_this): Pass down
8115 symbol_name_match_type::SEARCH_NAME.
8116 (lookup_symbol_aux, lookup_local_symbol): New parameter
8117 'match_type'. Pass it down.
8118 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8119 (lookup_symbol_search_name): New declaration.
8120 (lookup_symbol_in_block): New 'match_type' parameter.
8122 2018-01-05 Pedro Alves <palves@redhat.com>
8125 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8127 (ada_lookup_symbol): Reimplement in terms of
8128 ada_lookup_symbol_list, bits factored out from
8129 ada_lookup_encoded_symbol.
8131 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8133 * ada-exp.y (write_object_renaming): When subscripting an array
8134 using a symbol as the index, pass the block in call to
8135 ada_lookup_encoded_symbol when looking that symbol up.
8137 2018-01-05 Jerome Guitton <guitton@adacore.com>
8139 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8142 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8144 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8145 the case where VALUE_LVAL (val0) is not lval_memory.
8147 2018-01-05 Xavier Roirand <roirand@adacore.com>
8149 * ada-valprint.c (print_optional_low_bound): Handle
8150 character-indexed array printing like boolean-indexed array
8153 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8155 * NEWS: Create a new section for the next release branch.
8156 Rename the section of the current branch, now that it has
8159 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8161 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8162 * version.in: Bump version to 8.1.50.DATE-git.
8164 2018-01-03 Xavier Roirand <roirand@adacore.com>
8166 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8168 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8170 (default_exception_support_info) <catch_handlers_sym>: Add field.
8171 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8172 (ada_exception_name_addr_1): Add "catch handlers" handling.
8173 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8175 (create_excep_cond_exprs) <ex>: Add parameter.
8176 (re_set_exception): Update create_excep_cond_exprs call.
8177 (print_it_exception, print_one_exception, print_mention_exception)
8178 (print_recreate_exception): Add "catch handler" handling.
8179 (allocate_location_catch_handlers, re_set_catch_handlers)
8180 (check_status_catch_handlers, print_it_catch_handlers)
8181 (print_one_catch_handlers, print_mention_catch_handlers)
8182 (print_recreate_catch_handlers): New function.
8183 (catch_handlers_breakpoint_ops): New variable.
8184 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8185 Add parameter. Add "catch handler" handling.
8186 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8187 Add "catch handler" handling.
8188 (ada_exception_catchpoint_cond_string): Add "catch handler"
8190 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8192 (catch_ada_handlers_command): New function.
8193 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8194 operations structure.
8195 (_initialize_ada_language): Add "catch handlers" command entry.
8196 * NEWS: Document "catch handlers" feature.
8198 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8200 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8201 account when creating the array type of the slice.
8202 (ada_value_slice): Likewise.
8204 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8206 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8208 (create_array_type_with_stride): Add byte_stride_prop parameter.
8209 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8210 New parameter. Update all callers in this file.
8211 (array_type_has_dynamic_stride): New function.
8212 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8213 of arrays with dynamic byte strides.
8214 * dwarf2read.c (read_array_type): Add support for dynamic
8215 DW_AT_byte_stride attributes.
8217 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8219 * dwarf2read.c (read_unspecified_type): Treat
8220 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8222 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8224 Update copyright year range in all GDB files.
8226 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8228 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8229 and gdb/testsuite/gdb.base/step-line.c.
8231 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8233 * copyright.py (main): Dump the contents of
8234 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8235 even if BY_HAND is empty.
8237 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8239 * top.c (print_gdb_version): Update Copyright year in version
8242 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8244 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8246 For older changes see ChangeLog-2017.
8252 version-control: never