1 2018-06-07 Pedro Alves <palves@redhat.com>
3 * target.h (target_ops) <beneath>: Now a method. All references
5 (class target_stack): New.
6 * target.c (g_target_stack): New.
7 (g_current_top_target): Delete.
8 (current_top_target): Get the top target out of g_target_stack.
9 (target_stack::push, target_stack::unpush): New.
10 (push_target, unpush_target): Reimplement.
11 (target_is_pushed): Reimplement in terms of g_target_stack.
12 (target_ops::beneath, target_stack::find_beneath): New.
14 2018-06-07 Pedro Alves <palves@redhat.com>
16 * target.h (find_target_beneath): Delete declaration.
17 * target.c (find_target_beneath): Delete definition.
18 * aix-thread.c: All callers of find_target_beneath adjusted to
19 call target_ops::beneath instead.
20 * bsd-uthread.c: Likewise.
21 * linux-thread-db.c: Likewise.
22 * ravenscar-thread.c: Likewise.
23 * sol-thread.c: Likewise.
24 * spu-multiarch.c: Likewise.
26 2018-06-07 Pedro Alves <palves@redhat.com>
28 * target.h (target_ops) <beneath>: Now a method. All references
30 (target_ops) <m_beneath>: New.
31 * target.c (target_ops::beneath): New.
32 * corelow.c: Adjust all references to target_ops::beneath.
33 * linux-thread-db.c: Likewise.
34 * make-target-delegates: Likewise.
35 * record-btrace.c: Likewise.
36 * record-full.c: Likewise.
39 * target-delegates.c: Regenerate.
41 2018-06-07 Pedro Alves <palves@redhat.com>
43 * target.h (target_stack): Delete.
44 (current_top_target): Declare function.
45 * target.c (target_stack): Delete.
46 (g_current_top_target): New.
47 (current_top_target): New function.
48 * auxv.c: Use current_top_target instead of target_stack
50 * avr-tdep.c: Likewise.
51 * breakpoint.c: Likewise.
52 * corefile.c: Likewise.
53 * elfread.c: Likewise.
55 * exceptions.c: Likewise.
57 * gdbarch-selftests.c: Likewise.
58 * gnu-v3-abi.c: Likewise.
59 * ia64-tdep.c: Likewise.
60 * ia64-vms-tdep.c: Likewise.
61 * infcall.c: Likewise.
64 * linespec.c: Likewise.
65 * linux-tdep.c: Likewise.
66 * minsyms.c: Likewise.
67 * ppc-linux-nat.c: Likewise.
68 * ppc-linux-tdep.c: Likewise.
70 * regcache.c: Likewise.
72 * rs6000-tdep.c: Likewise.
73 * s390-linux-nat.c: Likewise.
74 * s390-tdep.c: Likewise.
75 * solib-aix.c: Likewise.
76 * solib-darwin.c: Likewise.
77 * solib-dsbt.c: Likewise.
78 * solib-spu.c: Likewise.
79 * solib-svr4.c: Likewise.
80 * solib-target.c: Likewise.
81 * sparc-tdep.c: Likewise.
82 * sparc64-tdep.c: Likewise.
83 * spu-tdep.c: Likewise.
84 * symfile.c: Likewise.
86 * target-descriptions.c: Likewise.
87 * target-memory.c: Likewise.
90 * tracefile-tfile.c: Likewise.
91 * tracepoint.c: Likewise.
93 * valprint.c: Likewise.
95 * windows-tdep.c: Likewise.
96 * mi/mi-main.c: Likewise.
98 2018-06-07 Tom Tromey <tom@tromey.com>
100 * valprint.h (build_address_symbolic): Declare.
101 * printcmd.c (print_address_symbolic): Update.
102 (build_address_symbolic): Change "name" and "filename" to
104 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
106 * defs.h (build_address_symbolic): Remove declaration.
108 2018-06-07 Alan Hayward <alan.hayward@arm.com>
110 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
111 (aarch64_vnv_type): Add function.
112 (aarch64_pseudo_register_name): Add V regs for SVE.
113 (aarch64_pseudo_register_type): Likewise.
114 (aarch64_pseudo_register_reggroup_p): Likewise.
115 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
116 (aarch64_pseudo_read_value): Add V regs for SVE.
117 (aarch64_pseudo_write_2): Use V0 offset for SVE
118 (aarch64_pseudo_write): Add V regs for SVE.
119 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
121 2018-06-05 Tom Tromey <tom@tromey.com>
123 * cli/cli-cmds.c (show_version): Update.
124 * top.c (print_gdb_version): Add "interactive" parameter.
126 * main.c (captured_main_1): Update.
127 * top.h (print_gdb_version): Add "interactive" parameter and a
130 2018-06-05 David Malcolm <dmalcolm@redhat.com>
132 * common/enum-flags.h: Add trailing semicolon to example in
135 2018-06-05 Tom Tromey <tom@tromey.com>
138 * NEWS: Add entry about pager.
139 * utils.c (pagination_disabled_for_command): New global.
140 (prompt_for_continue): Allow "c" response to prompt.
141 (reinitialize_more_filter): Clear
142 pagination_disabled_for_command.
143 (fputs_maybe_filtered): Check pagination_disabled_for_command.
145 2018-06-04 Tom Tromey <tom@tromey.com>
147 * ada-lang.h (ada_lookup_symbol_list): Update.
148 * ada-lang.c (resolve_subexp): Update.
149 (symbols_are_identical_enums): Change type of syms. Remove nsyms
151 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
152 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
153 results parameter to std::vector.
154 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
156 * ada-exp.y (block_lookup): Update.
157 (select_possible_type_sym): Change type of syms. Remove nsyms
159 (write_var_or_type, write_name_assoc): Update.
161 2018-06-04 Joel Brobecker <brobecker@adacore.com>
163 * windows-nat.c (windows_nat_target::xfer_partial): Return
164 TARGET_XFER_E_IO if we need to delegate to the target beneath
167 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
169 * Makefile.in (config.status): Add configure.nat as a
172 2018-06-04 Tom Tromey <tom@tromey.com>
174 * cp-name-parser.y (cpname_state): Add method declarations.
175 (HANDLE_QUAL): Update.
176 (cpname_state::d_grab, cpname_state::fill_comp)
177 (cpname_state::make_operator, cpname_state::make_dtor)
178 (cpname_state::make_builtin_type, cpname_state::make_name)
179 (cpname_state::d_qualify, cpname_state::d_int_type)
180 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
181 (%union): Move earlier.
183 2018-06-04 Alan Hayward <alan.hayward@arm.com>
185 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
187 2018-06-04 Alan Hayward <alan.hayward@arm.com>
189 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
190 (aarch64_pseudo_write_1): Likewise.
191 (aarch64_pseudo_read_value): Use helper.
192 (aarch64_pseudo_write): Likewise.
194 2018-06-04 Pedro Alves <palves@redhat.com>
196 * darwin-nat.c (darwin_ops): Delete.
197 (darwin_attach_pid): Use get_native_target.
199 2018-06-04 Alan Hayward <alan.hayward@arm.com>
201 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
202 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
204 2018-06-04 Alan Hayward <alan.hayward@arm.com>
206 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
207 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
208 (aarch64_gdbarch_init): Check for SVE.
209 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
211 2018-06-04 Alan Hayward <alan.hayward@arm.com>
213 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
214 * aarch64-tdep.h (aarch64_read_description): Likewise.
215 * arch/aarch64.c (aarch64_create_target_description): Likewise.
216 * arch/aarch64.h (aarch64_create_target_description): Likewise.
217 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
218 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
219 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
221 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
223 * value.c (value_fetch_lazy_bitfield): New.
224 (value_fetch_lazy_memory): New.
225 (value_fetch_lazy_register): New.
226 (value_fetch_lazy): Factor out to smaller functions.
228 2018-06-01 Tom Tromey <tom@tromey.com>
230 * cp-name-parser.y (backslashable, represented): Now const.
232 2018-06-01 Tom Tromey <tom@tromey.com>
234 * cp-name-parser.y: Include parser-defs.h.
235 (parser_fprintf): Remove declaration.
237 2018-06-01 Tom Tromey <tom@tromey.com>
239 * cp-name-parser.y: Use %pure-parser, %lex-param, and
241 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
242 (global_result): Remove globals.
243 (struct cpname_state): New.
244 (yyparse): Don't declare.
245 (yylex, yyerror): Move declarations after %union.
246 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
247 (make_name): Add state parameter.
249 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
251 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
253 (yylex): Add lvalp, state parameters.
254 (yyerror): Add state parameter.
255 (cp_demangled_name_to_comp): Update.
257 2018-06-01 Tom Tromey <tom@tromey.com>
259 * cp-name-parser.y (parser_fprintf): Declare.
260 (GDB_YY_REMAP_PREFIX): Define.
261 Include yy-remap.h. Don't redefine yy* identifiers.
263 2018-06-01 Tom Tromey <tom@tromey.com>
265 * python/py-type.c (typy_legacy_template_argument): Update.
266 * cp-support.h (cp_demangled_name_to_comp): Update.
267 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
268 parameter to be a "std::string *".
271 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
273 * ada-lex.l: Include "diagnostics.h" instead of
274 "common/diagnostics.h".
275 * unittests/environ-selftests.c: Likewise.
276 * common/diagnostics.h: Moved to ../include.
278 2018-06-01 Joel Brobecker <brobecker@adacore.com>
280 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
281 to language_mode_manual while calling breakpoint_re_set_one.
283 2018-06-01 Tom Tromey <tom@tromey.com>
285 * valops.c (value_cast_structs, destructor_name_p): Update.
286 * symtab.c (gdb_mangle_name): Update.
287 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
289 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
290 (pascal_object_print_value_fields, pascal_object_print_value):
292 * p-typeprint.c (pascal_type_print_derivation_info): Update.
293 * linespec.c (find_methods): Update.
294 * gdbtypes.h (type_name_no_tag): Remove.
295 (type_name_or_error): Rename from type_name_no_tag_or_error.
296 * gdbtypes.c (type_name_no_tag): Remove.
297 (type_name_or_error): Rename from type_name_no_tag_or_error.
298 (lookup_struct_elt_type, check_typedef): Update.
299 * expprint.c (print_subexp_standard): Update.
300 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
301 * d-namespace.c (d_lookup_nested_symbol): Update.
302 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
303 (cp_print_class_member): Update.
304 * cp-namespace.c (cp_lookup_nested_symbol): Update.
305 * completer.c (add_struct_fields): Update.
306 * c-typeprint.c (cp_type_print_derivation_info)
307 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
309 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
310 (ada_prefer_type, ada_is_exception_sym): Update.
312 2018-06-01 Tom Tromey <tom@tromey.com>
314 * valops.c (enum_constant_from_type, value_namespace_elt)
315 (value_maybe_namespace_elt): Update.
316 * valarith.c (find_size_for_pointer_math): Update.
317 * target-descriptions.c (make_gdb_type): Update.
318 * symmisc.c (print_symbol): Update.
319 * stabsread.c (define_symbol, read_type)
320 (complain_about_struct_wipeout, add_undefined_type)
321 (cleanup_undefined_types_1): Update.
322 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
323 (rust_range_type_p, val_print_struct, rust_print_struct_def)
324 (rust_internal_print_type, rust_composite_type)
325 (rust_evaluate_funcall, rust_evaluate_subexp)
326 (rust_inclusive_range_type_p): Update.
327 * python/py-type.c (typy_get_tag): Update.
328 * p-typeprint.c (pascal_type_print_base): Update.
329 * mdebugread.c (parse_symbol, parse_type): Update.
330 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
332 * guile/scm-type.c (gdbscm_type_tag): Update.
333 * go-lang.c (sixg_string_p): Update.
334 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
336 * gdbtypes.h (struct main_type) <tag_name>: Remove.
337 (TYPE_TAG_NAME): Remove.
338 * gdbtypes.c (type_name_no_tag): Simplify.
339 (check_typedef, check_types_equal, recursive_dump_type)
340 (copy_type_recursive, arch_composite_type): Update.
341 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
342 in summary mode when needed.
343 * eval.c (evaluate_funcall): Update.
344 * dwarf2read.c (fixup_go_packaging, read_structure_type)
345 (process_structure_scope, read_enumeration_type)
346 (read_namespace_type, read_module_type, determine_prefix): Update.
347 * cp-support.c (inspect_type): Update.
348 * coffread.c (process_coff_symbol, decode_base_type): Update.
349 * c-varobj.c (c_is_path_expr_parent): Update.
350 * c-typeprint.c (c_type_print_base_struct_union): Update.
351 (c_type_print_base_1): Update. Print struct/class/union/enum in
352 summary when using C language.
353 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
354 (gen_maybe_namespace_elt): Update.
355 * ada-lang.c (ada_type_name): Simplify.
356 (empty_record, ada_template_to_fixed_record_type_1)
357 (template_to_static_fixed_type)
358 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
360 2018-06-01 Tom Tromey <tom@tromey.com>
362 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
364 * c-typeprint.c (c_print_type_1): Add "language" parameter.
365 (c_print_type): Update.
366 (c_print_type): New overload.
367 (c_type_print_varspec_prefix, c_type_print_args)
368 (c_type_print_varspec_suffix, c_print_type_no_offsets)
369 (c_type_print_base_struct_union, c_type_print_base_1)
370 (cp_type_print_method_args): Add "language" parameter.
371 (c_type_print_base): Update.
372 * c-lang.h (c_print_type): Add new overload.
374 2018-06-01 Tom Tromey <tom@tromey.com>
376 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
377 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
379 2018-06-01 Alan Hayward <alan.hayward@arm.com>
381 * aarch64-tdep.c (aarch64_sve_register_names): New const
383 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
384 (AARCH64_SVE_Z_REGS_NUM): New define.
385 (AARCH64_SVE_P_REGS_NUM): Likewise.
386 (AARCH64_SVE_NUM_REGS): Likewise.
388 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
390 * nat/linux-ptrace.h [__alpha__]
391 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
394 2018-05-31 Maciej W. Rozycki <macro@mips.com>
396 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
397 the endianness selected.
398 * NEWS: Document `set endian auto' mode operation update.
400 2018-05-31 Alan Hayward <alan.hayward@arm.com>
402 * Makefile.in: Add new header.
403 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
404 (sve_vl_from_vg): Likewise.
405 (sve_vq_from_vl): Likewise.
406 (sve_vl_from_vq): Likewise.
407 (sve_vq_from_vg): Likewise.
408 (sve_vg_from_vq): Likewise.
409 * configure.nat: Add new c file.
410 * nat/aarch64-sve-linux-ptrace.c: New file.
411 * nat/aarch64-sve-linux-ptrace.h: New file.
413 2018-05-31 Alan Hayward <alan.hayward@arm.com>
415 * aarch64-linux-nat.c (aarch64_linux_read_description):
417 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
419 * aarch64-tdep.c (tdesc_aarch64_list): Add.
420 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
421 (aarch64_gdbarch_init): Add parmeter zero.
422 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
423 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
424 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
426 * doc/gdb.texinfo: Describe SVE feature
427 * features/aarch64-sve.c: New file.
429 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
432 * gdbarch.sh (significant_addr_bit): Default to zero when
433 not set by target architecture.
434 * gdbarch.c: Re-generated.
435 * utils.c (address_significant): Update.
437 2018-05-30 Joel Brobecker <brobecker@adacore.com>
439 * stack.c (func_command): Remove trailing newline in call to error.
441 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
443 * regcache.h (regcache_raw_collect): Remove, update callers to
444 use regcache::raw_collect.
445 * regcache.c (regcache_raw_collect): Remove.
447 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
449 * regcache.h (regcache_raw_supply): Remove, update callers to
450 use detached_regcache::raw_supply.
451 * regcache.c (regcache_raw_supply): Remove.
453 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
455 * regcache.h (regcache_cooked_write_part): Remove, update
456 callers to use regcache::cooked_write_part.
457 * regcache.c (regcache_cooked_write_part): Remove.
459 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
461 * regcache.h (regcache_cooked_read_part): Remove, update callers
462 to use readable_regcache::cooked_read_part.
463 * regcache.c (regcache_cooked_read_part): Remove.
465 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
467 * regcache.h (regcache_cooked_read_value): Remove, update
468 callers to use readable_regcache::cooked_read_value.
469 * regcache.c (regcache_cooked_read_value): Remove.
471 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
473 * regcache.h (regcache_cooked_write): Remove, update callers to
474 use regcache::cooked_write.
475 * regcache.c (regcache_cooked_write): Remove.
477 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
479 * regcache.h (regcache_invalidate): Remove, update callers to
480 use detached_regcache::invalidate instead.
481 * regcache.c (regcache_invalidate): Remove.
483 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
485 * regcache.h (regcache_raw_write_part): Remove, update callers
486 to use regcache::raw_write_part instead.
487 * regcache.c (regcache_raw_write_part): Remove.
489 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
491 * regcache.h (regcache_raw_read_part): Remove, update callers to
492 use readable_regcache::raw_read_part instead.
493 * regcache.c (regcache_raw_read_part): Remove.
495 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
497 * regcache.h (regcache_cooked_read): Remove, update callers to
498 use readable_regcache::cooked_read instead.
499 * regcache.c (regcache_cooked_read): Remove.
501 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
503 * regcache.h (regcache_raw_write): Remove, update callers to use
504 regcache::raw_write instead.
505 * regcache.c (regcache_raw_write): Remove.
507 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
509 * regcache.h (regcache_raw_read): Remove, update callers to use
510 readable_regcache::raw_read instead.
511 * regcache.c (regcache_raw_read): Remove.
513 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
515 * regcache.h (regcache_raw_update): Remove, update callers to
516 use readable_regcache::raw_update instead.
517 * regcache.c (regcache_raw_update): Remove.
519 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
521 * regcache.h (regcache_register_status): Remove, update callers
522 to use reg_buffer::get_register_status directly instead.
523 * regcache.c (regcache_register_status): Remove.
525 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
527 * regcache.h (regcache_get_ptid): Remove, update all callers to
528 call regcache::ptid instead.
529 * regcache.c (regcache_get_ptid): Remove.
531 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
533 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
535 2018-05-30 Pedro Alves <palves@redhat.com>
537 * common/common-exceptions.h (exception_rethrow): Use
540 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
542 * breakpoint.c (print_solib_event, check_status_catch_solib):
543 Remove struct keyword in range-based for loops.
544 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
545 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
547 * linespec.c (find_superclass_methods, search_minsyms_for_name):
549 * symfile.c (addr_info_make_relative): Likewise.
550 * thread.c (value_in_thread_stack_temporaries): Likewise.
552 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
554 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
555 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
556 * coff-pe-read.c (add_pe_forwarded_sym): Replace
557 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
558 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
559 * jit.c (jit_breakpoint_re_set_internal): Likewise.
560 * printcmd.c (info_address_command): Likewise.
562 2018-05-29 Tom Tromey <tom@tromey.com>
564 * windows-nat.c (handle_exception): Update fall-through comment.
566 2018-05-29 Tom Tromey <tom@tromey.com>
568 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
569 (struct program_space) <added_solibs>: Now a std::vector.
570 * breakpoint.c (print_solib_event): Update.
571 (check_status_catch_solib): Update.
572 * progspace.c (clear_program_space_solib_cache): Update.
573 * solib.c (update_solib_list): Update.
575 2018-05-29 Tom Tromey <tom@tromey.com>
577 * python/py-type.c (typy_richcompare): Update.
578 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
579 * gdbtypes.h (types_deeply_equal): Return bool.
580 (types_equal): Likewise.
581 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
583 (check_types_equal): Change worklist to std::vector. Return
585 (struct type_equality_entry): Add constructor.
586 (compare_maybe_null_strings): Return bool.
587 (check_types_worklist): Return bool. Change worklist to
589 (types_deeply_equal): Use std::vector.
590 (types_equal): Return bool.
591 (compare_maybe_null_strings): Simplify.
593 2018-05-29 Tom Tromey <tom@tromey.com>
595 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
597 2018-05-29 Tom Tromey <tom@tromey.com>
599 * objc-lang.h: Don't include cp-support.h.
600 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
603 2018-05-27 Tom Tromey <tom@tromey.com>
605 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
607 2018-05-25 Tom Tromey <tom@tromey.com>
609 * value.c (value::location): Initialize.
611 2018-05-25 Tom Tromey <tom@tromey.com>
613 * dbxread.c (init_bincl_list): Remove.
614 (bincl_list): Now a std::vector.
615 (bincls_allocated, next_bincl): Remove.
616 (free_bincl_list, do_free_bincl_list_cleanup)
617 (make_cleanup_free_bincl_list): Remove.
618 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
620 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
621 (struct header_file_location): Add constructor.
622 (add_bincl_to_list): Remove.
624 2018-05-25 Tom Tromey <tom@tromey.com>
626 * tui/tui.c (tui_enable): Update.
627 * mi/mi-interp.c (mi_interp::init): Update.
628 * interps.h (class interp) <name>: New method.
629 <m_name>: Rename from name.
630 (~scoped_restore_interp): Update.
631 * interps.c (interp::interp): Update.
632 (interp_add, interp_set, interp_lookup_existing)
633 (current_interp_named_p): Update.
635 2018-05-25 Tom Tromey <tom@tromey.com>
637 * interps.c (interp_name): Remove.
638 * mi/mi-interp.c (mi_interp::init): Update.
639 * interps.h (interp_name): Remove.
640 (~scoped_restore_interp): Update.
641 * tui/tui.c (tui_enable): Update.
643 2018-05-25 Tom Tromey <tom@tromey.com>
645 * utils.c (fputs_maybe_filtered): Update.
646 * linespec.c (decode_line_full): Update.
647 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
648 (mi_print_breakpoint_for_event, mi_solib_loaded)
649 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
650 (mi_user_selected_context_changed): Update.
651 * mi/mi-main.c (mi_execute_command): Update.
652 * cli/cli-script.c (execute_control_command): Update.
653 * python/python.c (execute_gdb_command): Update.
654 * solib.c (info_sharedlibrary_command): Update.
655 * interps.c (interp_ui_out): Remove.
656 * interps.h (interp_ui_out): Remove.
658 2018-05-25 Tom Tromey <tom@tromey.com>
660 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
661 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
662 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
664 2018-05-25 Tom Tromey <tom@tromey.com>
666 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
667 * interps.c (interp_exec): Use scoped_restore.
669 2018-05-25 Tom Tromey <tom@tromey.com>
671 * remote.c (remote_target::remote_file_get): Use
673 (remote_target::remote_file_put): Likewise.
675 2018-05-25 Tom Tromey <tom@tromey.com>
677 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
679 (get_pe_section_index, add_pe_exported_sym): Update.
680 (read_pe_exported_syms): Use gdb::def_vector.
682 2018-05-25 Tom Tromey <tom@tromey.com>
684 * frame.c (remove_prev_frame): Remove.
685 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
687 2018-05-25 Maciej W. Rozycki <macro@mips.com>
689 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
691 * mips-linux-nat.c (supply_fpregset): Always call
692 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
693 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
694 `mips_fill_fpregset'.
695 * mips-linux-tdep.c (mips_supply_fpregset)
696 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
697 (mips_fill_fpregset_wrapper): Remove functions.
698 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
699 (mips_linux_fpregset): Remove variable.
700 (mips_linux_iterate_over_regset_sections): Use
701 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
702 (mips_linux_o32_sigframe_init): Remove comment.
704 2018-05-25 Pedro Alves <palves@redhat.com>
706 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
707 (struct readahead_cache, struct packet_reg, struct
708 remote_arch_state, class remote_state): Move higher up in the
710 (remote_target::m_remote_state): Now an object instead of a pointer.
711 (remote_target::get_remote_state): Adjust.
713 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
715 * stack.c (select_and_print_frame): Delete.
716 (struct function_bounds): Move struct within function.
717 (func_command): Most content moved into new function
718 find_frame_for_function, use new function, print result, add
720 (find_frame_for_function): New function, now returns a result.
722 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
724 * stack.c (iterate_over_block_arg_vars): Fix comment.
725 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
727 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
731 (scoped_restore_selected_frame::scoped_restore_selected_frame):
733 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
735 * frame.h (class scoped_restore_selected_frame): New class.
736 * stack.c (print_frame_local_vars): Remove catching and rethrowing
737 of any exception, use scoped_restore_selected_frame to restore the
740 2018-05-24 Pedro Alves <palves@redhat.com>
742 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
745 2018-05-23 Tom Tromey <tom@tromey.com>
747 * complaints.c (struct complaints): Remove.
748 (symfile_complaint_book): Remove.
749 (series): New global.
750 (complaint_internal): Update.
751 (clear_complaints): Update.
753 2018-05-23 Tom Tromey <tom@tromey.com>
755 * complaints.c (counters): New global.
756 (struct complain): Remove.
757 (struct complaints) <root>: Remove.
758 (complaint_sentinel): Remove.
759 (symfile_complaint_book): Update.
760 (find_complaint) Remove.
761 (complaint_internal, clear_complaints): Update.
763 2018-05-23 Tom Tromey <tom@tromey.com>
765 * complaints.c (struct complain) <file, line>: Remove.
766 (find_complaint): Remove file, line parameters.
767 (complaint_internal): Update.
769 2018-05-23 Tom Tromey <tom@tromey.com>
771 * complaints.c (vcomplaint): Remove.
772 (complaint_internal) Merge in contents of vcomplaint.
774 2018-05-23 Tom Tromey <tom@tromey.com>
776 * complaints.c (struct complaints) <explanation>: Remove.
777 (symfile_explanations): Remove.
778 (symfile_complaint_book): Update.
779 (vcomplaint): Update.
780 (struct explanation): Remove.
782 2018-05-23 Tom Tromey <tom@tromey.com>
784 * complaints.c (symfile_complaints): Remove.
785 (complaint_internal): Remove "complaints" parameter.
786 (clear_complaints, vcomplaint): Remove "c" parameter.
787 (get_complaints): Remove.
788 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
789 (dwarf2_debug_line_missing_file_complaint)
790 (dwarf2_debug_line_missing_end_sequence_complaint)
791 (dwarf2_complex_location_expr_complaint)
792 (dwarf2_const_value_length_mismatch_complaint)
793 (dwarf2_section_buffer_overflow_complaint)
794 (dwarf2_macro_malformed_definition_complaint)
795 (dwarf2_invalid_attrib_class_complaint)
796 (create_addrmap_from_index, dw2_symtab_iter_next)
797 (dw2_expand_marked_cus)
798 (dw2_debug_names_iterator::find_vec_in_debug_names)
799 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
800 (create_debug_type_hash_table, init_cutu_and_read_dies)
801 (partial_die_parent_scope, add_partial_enumeration)
802 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
803 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
804 (read_import_statement, read_file_scope, create_dwo_cu_reader)
805 (create_cus_hash_table, create_dwp_hash_table)
806 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
807 (dwarf2_rnglists_process, dwarf2_ranges_process)
808 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
809 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
810 (handle_struct_member_die, process_structure_scope)
811 (read_array_type, read_common_block, read_module_type)
812 (read_tag_pointer_type, read_typedef, read_base_type)
813 (read_subrange_type, load_partial_dies, partial_die_info::read)
814 (partial_die_info::read, partial_die_info::read)
815 (partial_die_info::read, read_checked_initial_length_and_offset)
816 (dwarf2_string_attr, read_formatted_entries)
817 (dwarf_decode_line_header)
818 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
819 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
820 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
821 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
822 (get_signatured_type, get_DW_AT_signature_type)
823 (decode_locdesc, file_file_name, consume_improper_spaces)
824 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
825 (dwarf_decode_macro_bytes, dwarf_decode_macros)
826 (dwarf2_symbol_mark_computed, set_die_type)
827 (read_attribute_value): Update.
828 * stap-probe.c (handle_stap_probe, get_stap_base_address):
830 * dbxread.c (unknown_symtype_complaint)
831 (lbrac_mismatch_complaint, repeated_header_complaint)
832 (set_namestring, function_outside_compilation_unit_complaint)
833 (read_dbx_symtab, process_one_symbol): Update.
834 * gdbtypes.c (stub_noname_complaint): Update.
835 * windows-nat.c (handle_unload_dll): Update.
836 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
837 (decode_base_type): Update.
838 * xcoffread.c (bf_notfound_complaint, ef_complaint)
839 (eb_complaint, record_include_begin, record_include_end)
840 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
841 (process_xcoff_symbol, read_symbol)
842 (function_outside_compilation_unit_complaint)
843 (scan_xcoff_symtab): Update.
844 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
845 * buildsym.c (finish_block_internal, make_blockvector)
846 (end_symtab_get_static_block, augment_type_symtab): Update.
847 * dtrace-probe.c (dtrace_process_dof)
848 (dtrace_static_probe_ops::get_probes): Update.
849 * complaints.h (struct complaint): Don't declare.
850 (symfile_complaints): Remove.
851 (complaint_internal): Remove "complaints" parameter.
852 (complaint): Likewise.
853 (clear_complaints): Likewise.
854 * symfile.c (syms_from_objfile_1, finish_new_objfile)
855 (reread_symbols): Update.
856 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
857 (dwarf2_frame_cache, decode_frame_entry): Update.
858 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
859 * objc-lang.c (lookup_objc_class, lookup_child_selector)
860 (info_selectors_command): Update.
861 * macrotab.c (macro_include, check_for_redefinition)
862 (macro_undef): Update.
863 * objfiles.c (filter_overlapping_sections): Update.
864 * stabsread.c (invalid_cpp_abbrev_complaint)
865 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
866 (define_symbol, error_type, read_type, rs6000_builtin_type)
867 (stabs_method_name_from_physname, read_member_functions)
868 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
869 (attach_fields_to_type, complain_about_struct_wipeout)
870 (read_range_type, read_args, common_block_start)
871 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
873 * mdebugread.c (index_complaint, unknown_ext_complaint)
874 (basic_type_complaint, bad_tag_guess_complaint)
875 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
876 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
877 (parse_procedure, parse_lines)
878 (function_outside_compilation_unit_complaint)
879 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
880 (bad_tag_guess_complaint, reg_value_complaint): Update.
881 * cp-support.c (demangled_name_complaint): Update.
882 * macroscope.c (sal_macro_scope): Update.
883 * dwarf-index-write.c (class debug_names): Update.
885 2018-05-23 Tom Tromey <tom@tromey.com>
887 * complaints.c (clear_complaints): Remove "noisy" parameter.
888 * complaints.h (clear_complaints): Update.
889 * symfile.c (syms_from_objfile_1, finish_new_objfile)
890 (reread_symbols): Update.
892 2018-05-23 Tom Tromey <tom@tromey.com>
894 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
896 (vcomplaint, clear_complaints): Update.
897 (symfile_explanations): Remove some messages.
899 2018-05-23 Tom Tromey <tom@tromey.com>
901 * complaints.c (internal_complaint): Remove.
902 * complaints.h (internal_complaint): Remove.
904 2018-05-22 Maciej W. Rozycki <macro@mips.com>
906 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
908 2018-05-22 Pedro Alves <palves@redhat.com>
910 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
911 (remote_fileio_badfd, remote_fileio_return_errno)
912 (remote_fileio_return_success, remote_fileio_func_open)
913 (remote_fileio_func_open, remote_fileio_func_close)
914 (remote_fileio_func_read, remote_fileio_func_write)
915 (remote_fileio_func_lseek, remote_fileio_func_rename)
916 (remote_fileio_func_unlink, remote_fileio_func_stat)
917 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
918 (remote_fileio_func_isatty, remote_fileio_func_system): Add
919 remote_target parameter.
920 (remote_fio_func_map) <func>: Add remote_target parameter.
921 (do_remote_fileio_request, remote_fileio_request):
922 * remote-fileio.h (remote_fileio_request):
923 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
924 remote_target parameter.
925 (remote_notif_process, handle_notification): Adjust to pass down
927 (remote_notif_state_allocate): Add remote_target parameter. Save
929 * remote-notif.h (struct remote_target): Forward declare.
930 (struct notif_client) <parse, ack, can_get_pending_events>: Add
931 remote_target parameter.
932 (struct remote_notif_state) <remote>: New field.
933 (remote_notif_ack, remote_notif_parse): Add remote_target
935 (remote_notif_state_allocate, remote_notif_state_allocate): Add
936 remote_target parameter.
937 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
938 (threads_listing_context, rmt_thread_action, protocol_feature)
939 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
940 (packet_result, struct threads_listing_context, remote_state):
941 Move definitions and declarations higher up.
942 (remote_target) <~remote_target>: Declare.
943 (remote_download_command_source, remote_file_put, remote_file_get)
944 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
945 (remote_hostio_pread_vFile, remote_hostio_send_command)
946 (remote_hostio_set_filesystem, remote_hostio_open)
947 (remote_hostio_close, remote_hostio_unlink, remote_state)
948 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
949 (get_memory_write_packet_size, get_memory_read_packet_size)
950 (append_pending_thread_resumptions, remote_detach_1)
951 (append_resumption, remote_resume_with_vcont)
952 (add_current_inferior_and_thread, wait_ns, wait_as)
953 (process_stop_reply, remote_notice_new_inferior)
954 (process_initial_stop_replies, remote_add_thread)
955 (btrace_sync_conf, remote_btrace_maybe_reopen)
956 (remove_new_fork_children, kill_new_fork_children)
957 (discard_pending_stop_replies, stop_reply_queue_length)
958 (check_pending_events_prevent_wildcard_vcont)
959 (discard_pending_stop_replies_in_queue, stop_reply)
960 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
961 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
962 (remote_interrupt_as, remote_interrupt_ns)
963 (remote_get_noisy_reply, remote_query_attached)
964 (remote_add_inferior, remote_current_thread, get_current_thread)
965 (set_thread, set_general_thread, set_continue_thread)
966 (set_general_process, write_ptid)
967 (remote_unpack_thread_info_response, remote_get_threadinfo)
968 (parse_threadlist_response, remote_get_threadlist)
969 (remote_threadlist_iterator, remote_get_threads_with_ql)
970 (remote_get_threads_with_qxfer)
971 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
972 (get_offsets, remote_check_symbols, remote_supported_packet)
973 (remote_query_supported, remote_packet_size)
974 (remote_serial_quit_handler, remote_detach_pid)
975 (remote_vcont_probe, remote_resume_with_hc)
976 (send_interrupt_sequence, interrupt_query)
977 (remote_notif_get_pending_events, fetch_register_using_p)
978 (send_g_packet, process_g_packet, fetch_registers_using_g)
979 (store_register_using_P, store_registers_using_G)
980 (set_remote_traceframe, check_binary_download)
981 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
982 (remote_xfer_live_readonly_partial, remote_read_bytes)
983 (remote_send_printf, remote_flash_write, readchar)
984 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
985 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
986 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
987 (extended_remote_disable_randomization, extended_remote_run)
988 (send_environment_packet, extended_remote_environment_support)
989 (extended_remote_set_inferior_cwd, remote_write_qxfer)
990 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
991 (packet_command): Now methods of ...
992 (remote_target): ... this class.
993 (m_remote_state) <remote_target>: New field.
994 (struct remote_state) <stop_reply_queue,
995 remote_async_inferior_event_token, wait_forever_enabled_p>: New
997 (remote_state::remote_state): Allocate stop_reply_queue.
998 (remote_state): Delete global.
999 (get_remote_state_raw): Delete.
1000 (remote_target::get_remote_state): Allocate m_remote_state on
1002 (get_current_remote_target): New.
1003 (remote_ops, extended_remote_ops): Delete.
1004 (wait_forever_enabled_p, remote_async_inferior_event_token):
1005 Delete, moved to struct remote_state.
1006 (remote_target::close): Delete self. Destruction bits split to
1008 (remote_target::~remote_target): ... this.
1009 (show_memory_packet_size): Adjust to use
1010 get_current_remote_target.
1011 (struct protocol_feature) <func>: Add remote_target parameter.
1012 All callers adjusted.
1013 (curr_quit_handler_target): New.
1014 (remote_serial_quit_handler): Reimplement.
1015 (remote_target::open_1): Adjust to use get_current_remote_target.
1016 Heap-allocate remote_target/extended_remote_target instances.
1017 (vcont_builder::vcont_builder): Add remote_target parameter, and
1018 save it in m_remote. All callers adjusted.
1019 (vcont_builder::m_remote): New field.
1020 (vcont_builder::restart, vcont_builder::flush)
1021 (vcont_builder::push_action): Use it.
1022 (remote_target::commit_resume): Use it.
1023 (struct queue_iter_param) <remote>: New field.
1024 (remote_target::remove_new_fork_children): Fill in 'remote' field.
1025 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1026 (check_pending_event_prevents_wildcard_vcont_callback)
1027 (remote_target::check_pending_events_prevent_wildcard_vcont)
1028 (remote_target::discard_pending_stop_replies)
1029 (remote_target::discard_pending_stop_replies_in_queue)
1030 (remote_target::remote_notif_remove_queued_reply): Fill in
1032 (remote_notif_get_pending_events): New.
1033 (remote_target::readchar, remote_target::remote_serial_write):
1034 Save/restore curr_quit_handler_target.
1036 (kill_new_fork_children): Fill in 'remote' field.
1037 (packet_command): Use get_current_remote_target, defer to
1038 remote_target method of same name.
1039 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1040 parameter, and save it in m_remote. All callers adjusted.
1041 (scoped_remote_fd::release): Use m_remote.
1042 (scoped_remote_fd::m_remote): New field.
1043 (remote_file_put, remote_file_get, remote_file_delete): Use
1044 get_current_remote_target, defer to remote_target method of same
1046 (remote_btrace_reset): Add remote_state paremeter. Update all
1048 (remote_async_inferior_event_handler). Pass down 'data'.
1049 (remote_new_objfile): Use get_current_remote_target.
1050 (remote_target::vcont_r_supported): New.
1051 (set_range_stepping): Use get_current_remote_target and
1052 remote_target::vcont_r_supported.
1053 (_initialize_remote): Don't allocate 'remote_state' and
1054 'stop_reply_queue' globals.
1055 * remote.h (struct remote_target): Forward declare.
1056 (getpkt, putpkt, remote_notif_get_pending_events): Add
1057 'remote_target' parameter.
1059 2018-05-22 Pedro Alves <palves@redhat.com>
1061 * remote.c (vcont_builder): Now a class. Make all data members
1063 (vcont_builder) <vcont_builder, restart, flush, push_action>:
1065 (vcont_builder_restart): Rename to ...
1066 (vcont_builder::restart): ... this.
1067 (vcont_builder_flush): Rename to ...
1068 (vcont_builder::flush): ... this.
1069 (vcont_builder_push_action): Rename to ...
1070 (vcont_builder::push_action): ... this.
1071 (remote_target::commit_resume): Adjust.
1073 2018-05-22 Pedro Alves <palves@redhat.com>
1075 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1076 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1077 (get_fixed_memory_packet_size): New.
1078 (get_memory_packet_size): Use it.
1079 (set_memory_packet_size): Don't override the config size with
1080 DEFAULT_MAX_MEMORY_PACKET_SIZE.
1081 (show_memory_packet_size): Use get_fixed_memory_packet_size.
1082 Don't refer to get_memory_packet_size if not connected to a remote
1083 target. Show "(default)" if configured size is 0.
1085 2018-05-22 Pedro Alves <palves@redhat.com>
1087 * remote.c (remote_target::mourn_inferior): Move
1088 discard_pending_stop_replies call here from ...
1089 (_initialize_remote): ... here.
1091 2018-05-22 Pedro Alves <palves@redhat.com>
1093 * remote.c (compare_section_command): Remove set_general_process
1096 2018-05-22 Pedro Alves <palves@redhat.com>
1098 * remote.c (struct packet_reg, struct remote_arch_state):
1099 Move higher up in the file.
1100 (remote_state) <m_arch_states>: Store remote_arch_state values
1101 instead of remote_arch_state pointers.
1102 (remote_state::get_remote_arch_state): Adjust.
1104 2018-05-22 Pedro Alves <palves@redhat.com>
1106 * remote.c: Include <unordered_map>.
1107 (remote_state): Now a class.
1108 (remote_state) <get_remote_arch_state>: Declare method.
1109 <get_remote_arch_state>: New field.
1110 (remote_arch_state) <remote_arch_state>: Declare ctor.
1111 <regs>: Now a unique_ptr.
1112 (remote_gdbarch_data_handle): Delete.
1113 (get_remote_arch_state): Delete.
1114 (remote_state::get_remote_arch_state): New.
1115 (get_remote_state): Adjust to call remote_state's
1116 get_remote_arch_state method.
1117 (init_remote_state): Delete, bits factored out to ...
1118 (remote_arch_state::remote_arch_state): ... this new method.
1119 (get_remote_packet_size, get_memory_packet_size)
1120 (process_g_packet, remote_target::fetch_registers)
1121 (remote_target::prepare_to_store, store_registers_using_G)
1122 (remote_target::store_registers, remote_target::get_trace_status):
1123 Adjust to call remote_state's method.
1124 (_initialize_remote): Remove reference to
1125 remote_gdbarch_data_handle.
1127 2018-05-22 Pedro Alves <palves@redhat.com>
1129 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
1130 pread>: New method declarations.
1131 (remote_target::open_1): Adjust.
1132 (readahead_cache_invalidate): Rename to ...
1133 (readahead_cache::invalidate): ... this, and adjust to be a class
1135 (readahead_cache_invalidate_fd): Rename to ...
1136 (readahead_cache::invalidate_fd): ... this, and adjust to be a
1138 (remote_hostio_pwrite): Adjust.
1139 (remote_hostio_pread_from_cache): Rename to ...
1140 (readahead_cache::pread): ... this, and adjust to be a class
1142 (remote_hostio_close): Adjust.
1144 2018-05-22 Pedro Alves <palves@redhat.com>
1146 * remote.c (remote_hostio_close_cleanup): Delete.
1147 (class scoped_remote_fd): New.
1148 (remote_file_put, remote_file_get): Use it.
1150 2018-05-22 Pedro Alves <palves@redhat.com>
1152 (struct vCont_action_support): Use bool and initialize all fields.
1153 (struct readahead_cache): Initialize all fields.
1154 (remote_state): Use bool and initialize all fields.
1155 (remote_state::remote_state, remote_state::~remote_state): New.
1156 (new_remote_state): Delete.
1157 (_initialize_remote): Use new to allocate remote_state.
1159 2018-05-22 Pedro Alves <palves@redhat.com>
1163 * c-exp.y: Include "c-support.h".
1164 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
1165 of tolower. Use c_ident_is_alpha to scan names.
1166 * c-lang.c: Include "c-support.h".
1167 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1168 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1169 * c-support.h: New file, with bits factored out from ...
1170 * cp-name-parser.y: ... this file.
1171 Include "c-support.h".
1172 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1173 c-support.h and renamed.
1174 (symbol_end, yylex): Adjust.
1176 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1178 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1179 parameter type to CORE_ADDR.
1180 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1181 parameter type in declaration to CORE_ADDR.
1182 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1183 target_auxv_search to get AT_HWCAP and use the result to get the
1185 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1186 to CORE_ADDR. Remove the cast of the return value to unsigned
1187 long. Fix error predicate of target_auxv_search.
1188 (ppc_linux_nat_target::read_description): Change the type of the
1189 hwcap variable to CORE_ADDR.
1191 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1193 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1194 if the size of fpscr is larger than 32 bits.
1196 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1198 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1199 (ppc32_linux_vsxregmap): New global.
1200 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1201 regcache_supply_regset, and regcache_collect_regset.
1202 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1203 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1204 (fetch_vsx_register, store_vsx_register): Remove.
1205 (fetch_vsx_registers): Add regno parameter. Get regset using
1206 ppc_linux_vsxregset. Use regset to supply registers.
1207 (store_vsx_registers): Add regno parameter. Get regset using
1208 ppc_linux_vsxregset. Use regset to collect registers.
1209 (fetch_register): Call fetch_vsx_registers instead of
1211 (store_register): Call store_vsx_registers instead of
1213 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1214 new regno parameter.
1215 (store_ppc_registers): Call store_vsx_registers with -1 for the
1216 new regno parameter.
1217 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1218 (ppc_collect_vsxregset): Remove.
1220 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1222 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1224 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1225 for vector register offset fields.
1226 (ppc64_fbsd_reg_offsets): Likewise.
1227 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1228 to vector register offset fields.
1229 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1230 to vector register offset fields.
1231 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1232 vector register offset fields.
1233 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1234 initializers for vector register offset fields.
1235 (rs6000_aix64_reg_offsets): Likewise.
1236 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1237 (ppc_supply_vrregset): Remove.
1238 (ppc_collect_vrregset): Remove.
1239 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1240 (ppc_linux_vrregset) : New function.
1241 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1242 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1243 (ppc32_linux_vrregset): Remove.
1244 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1245 and use result instead of ppc32_linux_vrregset.
1246 (ppc32_linux_reg_offsets): Remove initializers for vector register
1248 (ppc64_linux_reg_offsets): Likewise.
1249 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1250 * ppc-linux-nat.c: Include regset.h.
1251 (gdb_vrregset_t): Adjust comment to account for little-endian
1253 (supply_vrregset, fill_vrregset): Remove.
1254 (fetch_altivec_register, store_altivec_register): Remove.
1255 (fetch_altivec_registers): Add regno parameter. Get regset using
1256 ppc_linux_vrregset. Use regset to supply registers.
1257 (store_altivec_registers): Add regno parameter. Get regset using
1258 ppc_linux_vrregset. Use regset to collect registers.
1259 (fetch_register): Call fetch_altivec_registers instead of
1260 fetch_altivec_register.
1261 (store_register): Call store_altivec_registers instead of
1262 store_altivec_register.
1263 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1264 the new regno parameter.
1265 (store_ppc_registers): Call store_altivec_registers with -1 for
1266 the new regno parameter.
1268 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1270 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1271 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1272 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1273 (gdb_vrregset_t): Change array type size to
1274 PPC_LINUX_SIZEOF_VRREGSET.
1275 (gdb_vsxregset_t): Change array type size to
1276 PPC_LINUX_SIZEOF_VSXREGSET.
1277 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1278 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1279 PPC_LINUX_SIZEOF_VSXREGSET.
1281 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1283 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1284 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1286 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1287 ppc_linux_target_wordsize with tid.
1288 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1290 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1291 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1292 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1293 tid parameter. Remove static specifier.
1294 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1295 (ppc_linux_target_wordsize): New declaration.
1297 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1299 * arch/ppc-linux-common.c: New file.
1300 * arch/ppc-linux-common.h: New file.
1301 * arch/ppc-linux-tdesc.h: New file.
1302 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1303 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1304 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1305 arch/ppc-linux-tdesc.h.
1306 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1307 arch/ppc-linux-tdesc.h.
1308 (ppc_linux_nat_target::read_description): Remove target
1309 description matching code. Fill a ppc_linux_features struct and
1310 call ppc_linux_match_description with it. Move comment about ISA
1311 2.05 to ppc-linux-common.c.
1312 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1313 arch/ppc-linux-tdesc.h.
1314 (ppc_linux_core_read_description): Remove target description
1315 matching code. Fill a ppc_linux_features struct and call
1316 ppc_linux_match_description with it.
1317 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1318 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1319 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1320 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1321 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1322 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1323 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1324 (tdesc_powerpc_e500l): Remove.
1326 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1328 * ada-lang.c (catch_assert_command): Pass empty string instead
1329 of NULL for excep_string argument.
1331 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1333 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1334 the width of the requested register exceeds the width of the
1337 2018-05-21 Tom Tromey <tom@tromey.com>
1339 * printcmd.c (output_command): Remove.
1340 (output_command_const): Rename to output_command.
1341 * valprint.h (output_command): Rename from output_command_const.
1342 * tracepoint.c (trace_dump_actions): Call output_command.
1344 2018-05-21 Tom Tromey <tom@tromey.com>
1346 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1347 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1348 * ada-lang.h (create_ada_exception_catchpoint): Update.
1349 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1351 (create_excep_cond_exprs, ~ada_catchpoint)
1352 (should_stop_exception, print_one_exception)
1353 (print_mention_exception, print_recreate_exception): Update.
1354 (ada_get_next_arg): Remove.
1355 (catch_ada_exception_command_split): Use std::string. Change type
1356 of "excep_string", "cond_string".
1357 (catch_ada_exception_command): Update.
1358 (create_ada_exception_catchpoint): Change type of excep_string.
1359 (ada_exception_sal): Remove excep_string parameter.
1360 (~ada_catchpoint): Remove.
1362 2018-05-21 Tom Tromey <tom@tromey.com>
1364 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1367 2018-05-21 Tom Tromey <tom@tromey.com>
1369 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1370 Return unique_xmalloc_ptr.
1371 (print_it_exception): Update.
1373 2018-05-21 Tom Tromey <tom@tromey.com>
1375 * tracepoint.c (trace_dump_actions): Use std::string.
1377 2018-05-21 Tom Tromey <tom@tromey.com>
1379 * symfile.c (reread_symbols): Use std::string for original_name.
1381 2018-05-21 Tom Tromey <tom@tromey.com>
1383 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1384 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1387 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1389 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1391 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1392 * objfiles.c (get_objfile_bfd_data): Allocate
1393 objfile_per_bfd_storage with obstack_new when allocating on
1396 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1398 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1400 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1401 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1402 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1403 (add_pending): Likewise.
1404 (parse_symbol): Likewise.
1405 (parse_partial_symbols): Likewise.
1406 (psymtab_to_symtab_1): Likewise.
1407 (new_psymtab): Likewise.
1408 (elfmdebug_build_psymtabs): Likewise.
1409 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1410 * objfiles.c (get_objfile_bfd_data): Likewise.
1411 (objfile_register_static_link): Likewise.
1412 * psymtab.c (allocate_psymtab): Likewise.
1413 * stabsread.c (read_member_functions): Likewise.
1414 * xcoffread.c (xcoff_end_psymtab): Likewise.
1416 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1418 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1419 compiler supports std::is_trivially_constructible.
1420 * common/poison.h: Include obstack.h.
1421 (IsMallocable): Define to is_trivially_constructible if the
1422 compiler supports it, define to true_type otherwise.
1426 (XOBNEWVEC): Redefine.
1427 * gdb_obstack.h (obstack_zalloc): New.
1428 (OBSTACK_ZALLOC): Redefine.
1429 (obstack_calloc): New.
1430 (OBSTACK_CALLOC): Redefine.
1432 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1433 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1435 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1436 obstack_calloc/obstack_zalloc.
1437 (gdbarch_obstack_zalloc): Remove.
1438 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1440 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1442 * stack.c (backtrace_command_1): Remove useless variable int i.
1444 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1446 * stack.c (print_frame_info): Fix comment.
1448 2018-05-18 Tom Tromey <tom@tromey.com>
1450 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1451 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1452 (~dwarf2_per_objfile): Update
1453 (dwarf2_get_dwz_file): Use new.
1454 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1457 2018-05-18 Tom Tromey <tom@tromey.com>
1459 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1461 * dwarf2read.c (struct dwp_file): Add constructor and
1463 (open_and_init_dwp_file): Return a unique_ptr.
1464 (dwarf2_per_objfile, create_dwp_hash_table)
1465 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1466 (lookup_dwo_unit_in_dwp): Update.
1467 (open_and_init_dwp_file, get_dwp_file): Update.
1469 2018-05-18 Tom Tromey <tom@tromey.com>
1471 * dwarf2read.c (dwarf2_per_objfile): Update.
1472 (struct mapped_index): Add initializers.
1473 (dwarf2_read_index): Use new.
1474 (dw2_symtab_iter_init): Update.
1475 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1478 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1480 * dwarf2read.c (mapped_index) <total_size>: Remove.
1482 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1484 * unittests/format_pieces-selftests.c (test_format_specifier):
1487 2018-05-18 Tom Tromey <tom@tromey.com>
1489 * c-typeprint.c (maybe_print_hole): New function.
1490 (c_print_type_struct_field_offset): Update.
1491 (c_type_print_base_struct_union): Call maybe_print_hole.
1493 2018-05-17 Keith Seitz <keiths@redhat.com>
1495 * breakpoint.c (build_bpstat_chain): New function, moved from
1497 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1498 If no stop chain is passed, call build_bpstat_chain to build it.
1499 * breakpoint.h (build_bpstat_chain): Declare.
1500 (bpstat_stop_status): Move documentation here from breakpoint.c.
1501 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1502 build the stop chain and pass it to skip_inline_frames.
1503 Pass this stop chain to bpstat_stop_status.
1504 * inline-frame.c: Include breakpoint.h.
1505 (stopped_by_user_bp_inline_frame): New function.
1506 (skip_inline_frames): Add parameter `stop_chain'.
1507 Move documention to inline-frame.h.
1508 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1509 whether the frame should be elided.
1510 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1511 Add moved documentation and update for new parameter.
1513 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1516 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1517 unittests/format_pieces-selftests.c.
1518 * common/format.h (format_piece) <operator==>: New.
1519 (format_pieces) <operator[]>: Remove.
1520 * common/format.c (format_pieces::format_pieces): Handle \e.
1521 * unittests/format_pieces-selftests.c: New.
1523 2018-05-17 Tom Tromey <tom@tromey.com>
1526 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1527 (dw2_instantiate_symtab): Add skip_partial parameter.
1528 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1529 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1530 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1531 (dw2_expand_symtabs_matching_one)
1532 (dw2_find_pc_sect_compunit_symtab)
1533 (dw2_debug_names_lookup_symbol)
1534 (dw2_debug_names_expand_symtabs_for_function): Update.
1535 (init_cutu_and_read_dies): Add skip_partial parameter.
1536 (process_psymtab_comp_unit, build_type_psymtabs_1)
1537 (process_skeletonless_type_unit, load_partial_comp_unit)
1538 (psymtab_to_symtab_1): Update.
1539 (load_full_comp_unit): Add skip_partial parameter.
1540 (process_imported_unit_die, dwarf2_read_addr_index)
1541 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1542 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1543 (read_signatured_type): Update.
1545 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1547 * value.c (release_value): Remove unused variable.
1548 (record_latest_value): Likewise.
1549 (access_value_history): Likewise.
1550 (preserve_values): Likewise.
1552 2018-05-17 Tom Tromey <tom@tromey.com>
1554 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1557 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1560 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1561 Also handle registers whose width is not a multiple of
1563 (linux_nat_trad_target::store_register): Likewise.
1565 2018-05-16 Tom Tromey <tom@tromey.com>
1567 * gdbcore.h (core_bfd): Redefine.
1568 * corelow.c (core_target::close): Update.
1569 (core_target_open): Update.
1570 * progspace.h (struct program_space) <cbfd>: Now a
1573 2018-05-16 Tom Tromey <tom@tromey.com>
1576 * symfile-add-flags.h (enum symfile_add_flags)
1577 <SYMFILE_NOT_FILENAME>: New constant.
1578 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1579 objfile name from BFD.
1580 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1581 * minidebug.c (find_separate_debug_file_in_section): Put
1582 ".gnu_debugdata" into BFD's file name.
1584 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1586 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1589 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1592 * aarch64-tdep.c (aarch64_analyze_prologue,
1593 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1594 Indicate not interested in errors.
1596 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1598 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1599 Supply the MIPS_ZERO_REGNUM register.
1601 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1603 * mips-tdep.c (mask_address_var): Make variable static.
1605 2018-05-14 Tom Tromey <tom@tromey.com>
1607 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1609 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1611 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1612 FXSAVE_ADDR for the mxcsr register.
1614 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1616 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1618 2018-05-11 Pedro Alves <palves@redhat.com>
1620 * corelow.c (core_target) <core_target>: No longer inline.
1621 Initialize m_core_gdbarch, m_core_vec and build the section table
1623 <~core_target>: New.
1624 <core_gdbarch, get_core_register_section>: New methods.
1625 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1626 factored out from ...
1627 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1629 (sniff_core_bfd): Add gdbarch parameter.
1630 (core_close): Delete, merged into ...
1631 (core_target::close): ... here. Delete self.
1632 (core_close_cleanup): Delete.
1633 (core_target_open): Allocate a core_target on the heap. Use a
1634 unique_ptr instead of a cleanup. Bits moved into the core_target
1635 ctor. Adjust to use core_target methods instead of globals.
1636 (get_core_register_section): Rename to ...
1637 (core_target::get_core_register_section): ... this and adjust.
1638 (struct get_core_registers_cb_data): New.
1639 (get_core_registers_cb): Use it. Use bool.
1640 (core_target::fetch_registers, core_target::files_info)
1641 (core_target::xfer_partial, core_target::read_description)
1642 (core_target::pid_to, core_target::thread_name): Adjust to
1643 reference class fields instead of globals.
1644 * target.h (struct target_ops_deleter, target_ops_up): New.
1646 2018-05-11 Pedro Alves <palves@redhat.com>
1648 * corefile.c (core_file_command): Move to corelow.c.
1649 * corelow.c (the_core_target): Delete.
1650 (core_file_command): Moved from corefile.c. Check exec_bfd
1651 instead of the_core_target. Use target_detach instead of calling
1652 into the_core_target directly.
1653 (maybe_say_no_core_file_now): New.
1654 (core_target::detach): Use it.
1655 (_initialize_corelow): Remove references to the_core_target.
1656 * gdbcore.h (the_core_target): Delete.
1658 2018-05-11 Tom Tromey <tromey@redhat.com>
1659 Pedro Alves <palves@redhat.com>
1661 * corefile.c (core_bfd): Remove.
1662 * gdbcore.h (core_bfd): Now a macro.
1663 * progspace.h (struct program_space) <cbfd>: New field.
1665 2018-05-11 Tom Tromey <tom@tromey.com>
1667 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1670 2018-05-10 Tom Tromey <tom@tromey.com>
1672 * configure: Rebuild.
1673 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1675 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1678 * regformats/regdat.sh: Adjust script, following the addition
1679 of the new expedite_regs parameter to init_target_desc.
1681 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1684 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1685 set_gdbarch_significant_addr_bit.
1686 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1687 set_gdbarch_significant_addr_bit.
1688 * utils.c (address_significant): Update to sign extend addr.
1690 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1692 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1693 (xtensa_linux_init_abi): Limit tdep->num_regs by
1694 tdep->num_nopriv_regs.
1695 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1696 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1699 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1701 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1703 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1705 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1706 (I387_MXCSR_INIT_VAL): New constant.
1707 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1708 buffer if it was supplied by the inferior.
1709 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1710 (i387_xsave_get_clear_bv): New function.
1711 (i387_supply_xsave): Only read x87 control registers from the
1712 xsave buffer if the feature is enabled, and the state will have
1713 been written, otherwise, provide a suitable default.
1714 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1715 including x87 control registers. Update control registers if they
1716 have changed from the default value, and mark features as enabled
1718 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1720 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1722 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1724 2018-05-07 Tom Tromey <tom@tromey.com>
1726 * configure: Rebuild.
1727 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1729 2018-05-07 Tom Tromey <tom@tromey.com>
1732 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1733 bit. Use correct value for VDIV.
1735 2018-05-04 Tom Tromey <tom@tromey.com>
1737 * configure: Rebuild.
1738 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1740 2018-05-04 Tom Tromey <tom@tromey.com>
1742 * linux-record.c (record_linux_system_call) <case
1743 RECORD_SYS_RECVFROM>: Add "break".
1745 2018-05-04 Tom Tromey <tom@tromey.com>
1747 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1748 Add missing "break".
1749 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1750 Add missing "break".
1752 2018-05-04 Tom Tromey <tom@tromey.com>
1754 * rs6000-tdep.c (ppc_process_record_op4)
1755 (ppc_process_record_op63): Add fall-through comment.
1757 2018-05-04 Tom Tromey <tom@tromey.com>
1759 * i386-tdep.c (i386_process_record): Add fall-through comment.
1761 2018-05-04 Tom Tromey <tom@tromey.com>
1763 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1766 2018-05-04 Tom Tromey <tom@tromey.com>
1768 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1769 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1770 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1772 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1774 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1777 2018-05-04 Tom Tromey <tom@tromey.com>
1779 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1781 2018-05-04 Tom Tromey <tom@tromey.com>
1783 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1784 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1785 * symfile.c (section_is_mapped): Fix fall-through comment.
1786 * stabsread.c (define_symbol, read_member_functions): Fix
1787 fall-through comment.
1788 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1790 * remote.c (remote_wait_as): Fix fall-through comment.
1791 * p-exp.y (yylex): Fix fall-through comment.
1792 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1794 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1795 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1796 * jv-exp.y (yylex): Fix fall-through comment.
1797 * go-exp.y (lex_one_token): Fix fall-through comment.
1798 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1799 fall-through comment.
1800 * f-exp.y (yylex): Fix fall-through comment.
1801 * dwarf2read.c (process_die): Fix fall-through comments.
1802 * dbxread.c (process_one_symbol): Fix fall-through comment.
1803 * d-exp.y (lex_one_token): Fix fall-through comment.
1804 * cp-name-parser.y (yylex): Fix fall-through comment.
1805 * coffread.c (coff_symtab_read): Fix fall-through comment.
1806 * c-exp.y (lex_one_token): Fix fall-through comment.
1807 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1809 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1812 2018-05-04 Tom Tromey <tom@tromey.com>
1815 * NEWS: Mention gdb.execute change.
1816 * gdbcmd.h (execute_control_command): Don't declare.
1817 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1818 execute_control_commands, execute_control_commands_to_string.
1819 * cli/cli-script.h (execute_control_commands)
1820 (execute_control_commands_to_string): Declare.
1821 (execute_control_command): Add from_tty parameter.
1822 * cli/cli-script.c (execute_control_commands)
1823 (execute_control_commands_to_string): New functions.
1824 (execute_user_command): Use execute_control_commands.
1825 (execute_control_command_1): Add "from_tty" parameter. Update.
1826 (execute_control_command): Likewise.
1828 2018-05-04 Tom Tromey <tom@tromey.com>
1831 * NEWS: Mention that breakpoint commands are writable.
1832 * python/py-breakpoint.c (bppy_set_commands): New function.
1833 (breakpoint_object_getset) <"commands">: Use it.
1835 2018-05-04 Tom Tromey <tom@tromey.com>
1837 * tracepoint.c (actions_command): Update.
1838 * mi/mi-cmd-break.c (mi_command_line_array)
1839 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1840 (mi_read_next_line): Remove.
1841 (mi_cmd_break_commands): Update.
1842 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1844 * cli/cli-script.c (get_command_line): Update.
1845 (process_next_line): Use function_view. Constify.
1846 (recurse_read_control_structure, read_command_lines)
1847 (read_command_lines_1): Change argument types to function_view.
1848 (do_define_command, document_command): Update.
1849 * breakpoint.h (check_tracepoint_command): Don't declare.
1850 * breakpoint.c (check_tracepoint_command): Remove.
1851 (commands_command_1, create_tracepoint_from_upload): Update.
1853 2018-05-04 Tom Tromey <tom@tromey.com>
1856 * cli/cli-script.h (enum command_control_type) <define_control>:
1858 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1859 (build_command_line, execute_control_command_1)
1860 (process_next_line): Likewise.
1861 (do_define_command): New function, extracted from define_command.
1862 (define_command): Use it.
1864 2018-05-04 Tom Tromey <tom@tromey.com>
1866 * tracepoint.c (actions_command): Update.
1867 * cli/cli-script.h (read_command_lines): Update.
1868 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1869 (MAX_TMPBUF): Remove define.
1870 (define_command): Use string_printf.
1871 (document_command): Likewise.
1872 * breakpoint.c (commands_command_1): Update.
1874 2018-05-04 Tom Tromey <tom@tromey.com>
1876 * top.c (execute_command): Update.
1877 * cli/cli-script.h (print_command_lines): Now varargs.
1878 * cli/cli-script.c (print_command_lines): Now varargs.
1879 (execute_control_command_1) <case while_control, case if_control>:
1882 2018-05-04 Tom Tromey <tom@tromey.com>
1884 * tracepoint.c (all_tracepoint_actions): Rename from
1885 all_tracepoint_actions_and_cleanup. Change return type.
1886 (actions_command, encode_actions_1, encode_actions)
1887 (trace_dump_actions, tdump_command): Update.
1888 * remote.c (remote_download_command_source): Update.
1889 * python/python.c (gdbpy_eval_from_control_command)
1890 (python_command, python_interactive_command): Update.
1891 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1892 * guile/guile.c (guile_command)
1893 (gdbscm_eval_from_control_command, guile_command): Update.
1894 * compile/compile.c (compile_code_command)
1895 (compile_print_command, compile_to_object): Update.
1896 * cli/cli-script.h (struct command_lines_deleter): New.
1897 (counted_command_line): New typedef.
1898 (struct command_line): Add constructor, destructor.
1899 <body_list>: Remove.
1900 <body_list_0, body_list_1>: New members.
1901 (command_line_up): Remove typedef.
1902 (read_command_lines, read_command_lines_1, get_command_line):
1904 (copy_command_lines): Don't declare.
1905 * cli/cli-script.c (build_command_line): Use "new".
1906 (get_command_line): Return counted_command_line.
1907 (print_command_lines, execute_user_command)
1908 (execute_control_command_1, while_command, if_command): Update.
1909 (realloc_body_list): Remove.
1910 (process_next_line, recurse_read_control_structure): Update.
1911 (read_command_lines, read_command_lines_1): Return counted_command_line.
1912 (free_command_lines): Use "delete".
1913 (copy_command_lines): Remove.
1914 (define_command, document_command, show_user_1): Update.
1915 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1916 a counted_command_line.
1917 * breakpoint.h (counted_command_line): Remove typedef.
1918 (breakpoint_set_commands): Update.
1919 * breakpoint.c (check_no_tracepoint_commands)
1920 (validate_commands_for_breakpoint): Update.
1921 (breakpoint_set_commands): Change commands to be a
1922 counted_command_line.
1923 (commands_command_1, update_dprintf_command_list)
1924 (create_tracepoint_from_upload): Update.
1926 2018-05-04 Tom Tromey <tom@tromey.com>
1928 * cli/cli-decode.h (cmd_list_element): New constructor.
1929 (~cmd_list_element): New destructor.
1930 (struct cmd_list_element): Add initializers.
1931 * cli/cli-decode.c (do_add_cmd): Use "new".
1932 (delete_cmd): Use "delete".
1934 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1935 Pedro Alves <palves@redhat.com>
1937 PR breakpoints/19806 and support for PR external/20207.
1938 * NEWS: Mention Aarch64 watchpoint improvements.
1939 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1940 watchpoints and PR external/20207 watchpoints.
1941 * nat/aarch64-linux-hw-point.c
1942 (kernel_supports_any_contiguous_range): New.
1943 (aarch64_watchpoint_offset): New.
1944 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1945 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1946 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1947 (aarch64_align_watchpoint): New parameters aligned_offset_p and
1948 next_addr_orig_p. Support PR external/20207 watchpoints.
1949 (aarch64_downgrade_regs): New.
1950 (aarch64_dr_state_insert_one_point): New parameters offset and
1952 (aarch64_dr_state_remove_one_point): Likewise.
1953 (aarch64_handle_breakpoint): Update caller.
1954 (aarch64_handle_aligned_watchpoint): Likewise.
1955 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1957 (aarch64_linux_set_debug_regs): Remove const from state. Call
1958 aarch64_downgrade_regs.
1959 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1960 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1961 (DR_CONTROL_MASK): ... this.
1962 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1963 (unsigned int aarch64_watchpoint_offset): New prototype.
1964 (aarch64_linux_set_debug_regs): Remove const from state.
1965 * utils.c (align_up, align_down): Move to ...
1966 * common/common-utils.c (align_up, align_down): ... here.
1967 * utils.h (align_up, align_down): Move to ...
1968 * common/common-utils.h (align_up, align_down): ... here.
1970 2018-05-04 Joel Brobecker <brobecker@adacore.com>
1972 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1973 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1974 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1975 Re-implement to match the ABI as summarized in GCC's
1976 gcc/config/sparc/sparc.c. All callers updated.
1977 (sparc32_store_arguments): Remove assertion.
1979 2018-05-04 Tom Tromey <tom@tromey.com>
1981 * printcmd.c: Don't include tui.h.
1982 (decode_format): Use skip_spaces.
1984 2018-05-04 Tom Tromey <tom@tromey.com>
1987 * printcmd.c (last_count): New global.
1988 (x_command): Use saved count when repeating.
1990 2018-05-04 Tom Tromey <tom@tromey.com>
1992 * nto-procfs.c (do_closedir_cleanup): Remove.
1993 (procfs_pidlist): Use gdb_dir_up.
1994 * procfs.c (do_closedir_cleanup): Remove.
1995 (proc_update_threads): Use gdb_dir_up.
1996 * common/filestuff.h (struct gdb_dir_deleter): New.
1997 (gdb_dir_up): New typedef.
1999 2018-05-04 Tom Tromey <tom@tromey.com>
2001 * ada-lang.c (print_mention_exception): Use std::string.
2003 2018-05-04 Tom Tromey <tom@tromey.com>
2005 * ada-lang.c (create_excep_cond_exprs): Update.
2006 (ada_exception_catchpoint_cond_string): Use std::string.
2008 2018-05-04 Tom Tromey <tom@tromey.com>
2010 * ada-lang.c (xget_renaming_scope): Return std::string.
2011 (old_renaming_is_invisible): Update.
2013 2018-05-04 Tom Tromey <tom@tromey.com>
2015 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2016 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2018 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
2020 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2022 2018-05-04 Tom Tromey <tom@tromey.com>
2024 * remote.c (remote_query_supported_append): Change type.
2025 (remote_check_symbols): Update.
2027 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
2030 * configure.ac: Prepend libpython.
2031 * python/python-config.py: Likewise.
2032 * configure: Regenerate.
2034 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
2036 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2038 2018-05-03 Pedro Alves <palves@redhat.com>
2041 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2042 override. Write 'true' instead of '1'.
2043 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2046 2018-05-02 Pedro Alves <palves@redhat.com>
2048 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2049 add_inf_child_target.
2050 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2051 add_inf_child_target.
2052 * aix-thread.c (aix_thread_target_info): New.
2053 (aix_thread_target) <shortname, longname, doc>: Delete.
2055 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2056 add_inf_child_target.
2057 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2058 add_inf_child_target.
2059 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2060 add_inf_child_target.
2061 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2062 add_inf_child_target.
2063 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2064 add_inf_child_target.
2065 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2066 add_inf_child_target.
2067 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2068 add_inf_child_target.
2069 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2070 add_inf_child_target.
2071 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2072 add_inf_child_target.
2073 * bfd-target.c (target_bfd_target_info): New.
2074 (target_bfd) <shortname, longname, doc>: Delete.
2076 * bsd-kvm.c (bsd_kvm_target_info): New.
2077 (bsd_kvm_target) <shortname, longname, doc>: Delete.
2079 (bsd_kvm_target::open): Rename to ...
2080 (bsd_kvm_target_open): ... this. Adjust.
2081 * bsd-uthread.c (bsd_uthread_target_info): New.
2082 (bsd_uthread_target) <shortname, longname, doc>: Delete.
2084 * corefile.c (core_file_command): Adjust.
2085 * corelow.c (core_target_info): New.
2086 (core_target) <shortname, longname, doc>: Delete.
2088 (core_target::open): Rename to ...
2089 (core_target_open): ... this. Adjust.
2090 * ctf.c (ctf_target_info): New.
2091 (ctf_target) <shortname, longname, doc>: Delete.
2093 (ctf_target::open): Rename to ...
2094 (ctf_target_open): ... this.
2095 (_initialize_ctf): Adjust.
2096 * exec.c (exec_target_info): New.
2097 (exec_target) <shortname, longname, doc>: Delete.
2099 (exec_target::open): Rename to ...
2100 (exec_target_open): ... this.
2101 * gdbcore.h (core_target_open): Declare.
2102 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2103 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2104 add_inf_child_target.
2105 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2106 add_inf_child_target.
2107 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2108 add_inf_child_target.
2109 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2110 add_inf_child_target.
2111 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2112 add_inf_child_target.
2113 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2114 add_inf_child_target.
2115 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2116 add_inf_child_target.
2117 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
2118 add_inf_child_target.
2119 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
2120 add_inf_child_target.
2121 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
2122 add_inf_child_target.
2123 * inf-child.c (inf_child_target_info): New.
2124 (inf_child_target::info): New.
2125 (inf_child_open_target): Remove 'target' parameter. Use
2126 get_native_target instead.
2127 (inf_child_target::open): Delete.
2128 (add_inf_child_target): New.
2129 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
2132 (add_inf_child_target): Declare.
2133 (inf_child_open_target): Declare.
2134 * linux-thread-db.c (thread_db_target_info): New.
2135 (thread_db_target) <shortname, longname, doc>: Delete.
2137 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
2138 add_inf_child_target.
2139 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
2140 add_inf_child_target.
2141 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
2142 add_inf_child_target.
2143 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
2144 add_inf_child_target.
2145 * make-target-delegates (print_class): Adjust.
2146 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
2147 add_inf_child_target.
2148 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
2149 add_inf_child_target.
2150 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
2151 add_inf_child_target.
2152 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
2153 add_inf_child_target.
2154 * nto-procfs.c (nto_native_target_info): New.
2155 (nto_procfs_target_native) <shortname, longname, doc>:
2158 (nto_procfs_target_info): New.
2159 (nto_procfs_target_procfs) <shortname, longname, doc>:
2162 (init_procfs_targets): Adjust.
2163 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
2164 add_inf_child_target.
2165 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2166 add_inf_child_target.
2167 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2168 add_inf_child_target.
2169 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2170 add_inf_child_target.
2171 * ravenscar-thread.c (ravenscar_target_info): New.
2172 (ravenscar_thread_target) <shortname, longname, doc>:
2175 * record-btrace.c (record_btrace_target_info):
2176 (record_btrace_target) <shortname, longname, doc>: Delete.
2178 (record_btrace_target::open): Rename to ...
2179 (record_btrace_target_open): ... this. Adjust.
2180 * record-full.c (record_longname, record_doc): New.
2181 (record_full_base_target) <shortname, longname, doc>: Delete.
2183 (record_full_target_info): New.
2184 (record_full_target): <shortname>: Delete.
2186 (record_full_core_open_1, record_full_open_1): Update comments.
2187 (record_full_base_target::open): Rename to ...
2188 (record_full_open): ... this.
2189 (cmd_record_full_restore): Update.
2190 (_initialize_record_full): Update.
2191 * remote-sim.c (remote_sim_target_info): New.
2192 (gdbsim_target) <shortname, longname, doc>: Delete.
2194 (gdbsim_target::open): Rename to ...
2195 (gdbsim_target_open): ... this.
2196 (_initialize_remote_sim): Adjust.
2197 * remote.c (remote_doc): New.
2198 (remote_target_info): New.
2199 (remote_target) <shortname, longname, doc>: Delete.
2201 (extended_remote_target_info): New.
2202 (extended_remote_target) <shortname, longname, doc>: Delete.
2204 (remote_target::open_1): Make static. Adjust.
2205 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2206 * s390-linux-nat.c (_initialize_s390_nat): Use
2207 add_inf_child_target.
2208 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2209 add_inf_child_target.
2210 * sol-thread.c (thread_db_target_info): New.
2211 (sol_thread_target) <shortname, longname, doc>: Delete.
2213 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2214 add_inf_child_target.
2215 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2216 add_inf_child_target.
2217 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2218 add_inf_child_target.
2219 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2220 add_inf_child_target.
2221 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2222 add_inf_child_target.
2223 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2224 add_inf_child_target.
2225 * spu-linux-nat.c (_initialize_spu_nat): Use
2226 add_inf_child_target.
2227 * spu-multiarch.c (spu_multiarch_target_info): New.
2228 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2230 * target-delegates.c: Regenerate.
2231 * target.c: Include <unordered_map>.
2232 (target_ops_p): Delete.
2233 (DEF_VEC_P(target_ops_p)): Delete.
2234 (target_factories): New.
2235 (test_target_info): New.
2236 (test_target_ops::info): New.
2237 (open_target): Adjust to use target_factories.
2238 (add_target_with_completer): Rename to ...
2239 (add_target): ... this. Change prototype. Register target_info
2240 and open callback in target_factories. Register target_info in
2241 command context instead of target_ops.
2242 (add_target): Delete old implementation.
2243 (add_deprecated_target_alias): Change prototype. Adjust.
2244 (the_native_target): New.
2245 (set_native_target, get_native_target): New.
2246 (find_default_run_target): Use the_native_target.
2247 (find_attach_target, find_run_target): Simplify.
2248 (target_ops::open): Delete.
2249 (dummy_target_info): New.
2250 (dummy_target::shortname, dummy_target::longname)
2251 (dummy_target::doc): Delete.
2252 (dummy_target::info): New.
2253 (debug_target::shortname, debug_target::longname)
2254 (debug_target::doc): Delete.
2255 (debug_target::info): New.
2256 * target.h (struct target_info): New.
2257 (target_ops::~target_ops): Add comment.
2258 (target_ops::info): New.
2259 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2260 longer virtual. Implement in terms of target_info.
2261 (set_native_target, get_native_target): Declare.
2262 (target_open_ftype): New.
2263 (add_target, add_target_with_completer)
2264 (add_deprecated_target_alias): Change prototype.
2265 (test_target) <shortname, longname, doc>: Delete.
2267 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2268 add_inf_child_target.
2269 * tracefile-tfile.c (tfile_target_info): New.
2270 (tfile_target) <shortname, longname, doc>: Delete.
2272 (tfile_target::open): Rename to ...
2273 (tfile_target_open): ... this.
2274 (_initialize_tracefile_tfile): Adjust.
2275 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2276 add_inf_child_target.
2277 * windows-nat.c (_initialize_windows_nat): Use
2278 add_inf_child_target.
2279 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2280 add_inf_child_target.
2282 2018-05-02 Pedro Alves <palves@redhat.com>
2284 * linux-nat.h (linux_nat_target) <low_new_thread,
2285 low_delete_thread, low_new_fork, low_forget_process,
2286 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2287 New virtual methods.
2288 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2289 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2290 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2291 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2292 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2294 * linux-fork.c (delete_fork): Adjust to call low method.
2295 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2296 (linux_nat_new_fork, linux_nat_forget_process_hook)
2297 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2298 (linux_nat_status_is_event):
2299 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2300 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2302 (sigtrap_is_event): Rename to ...
2303 (linux_nat_target::low_status_is_event): ... this.
2304 (linux_nat_set_status_is_event): Delete.
2305 (save_stop_reason, linux_nat_wait_1)
2306 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2308 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2309 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2310 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2311 (linux_nat_set_prepare_to_resume): Delete.
2312 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2313 low virtual methods.
2314 * amd64-linux-nat.c: Likewise.
2315 * arm-linux-nat.c: Likewise.
2316 * i386-linux-nat.c: Likewise.
2317 * ia64-linux-nat.c: Likewise.
2318 * mips-linux-nat.c: Likewise.
2319 * ppc-linux-nat.c: Likewise.
2320 * s390-linux-nat.c: Likewise.
2321 * sparc64-linux-nat.c: Likewise.
2322 * x86-linux-nat.c: Likewise.
2323 * x86-linux-nat.h: Include "nat/x86-linux.h".
2324 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2325 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2328 2018-05-02 Pedro Alves <palves@redhat.com>
2330 * target.h (target_ops)
2331 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2332 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2333 stopped_by_watchpoint, have_continuable_watchpoint,
2334 stopped_data_address, watchpoint_addr_within_range,
2335 can_accel_watchpoint_condition, can_run, thread_alive,
2336 has_all_memory, has_memory, has_stack, has_registers,
2337 has_execution, can_async_p, is_async_p, supports_non_stop,
2338 always_non_stop_p, can_execute_reverse, supports_multi_process,
2339 supports_enable_disable_tracepoint,
2340 supports_disable_randomization, supports_string_tracing,
2341 supports_evaluation_of_breakpoint_conditions,
2342 can_run_breakpoint_commands, filesystem_is_local,
2343 can_download_tracepoint, get_trace_state_variable_value,
2344 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2345 record_is_replaying, record_will_replay,
2346 augmented_libraries_svr4_read>: Adjust to return bool.
2347 * aarch64-linux-nat.c: All implementations adjusted.
2348 * aix-thread.c: All implementations adjusted.
2349 * arm-linux-nat.c: All implementations adjusted.
2350 * breakpoint.c: All implementations adjusted.
2351 * bsd-kvm.c: All implementations adjusted.
2352 * bsd-uthread.c: All implementations adjusted.
2353 * corelow.c: All implementations adjusted.
2354 * ctf.c: All implementations adjusted.
2355 * darwin-nat.c: All implementations adjusted.
2356 * darwin-nat.h: All implementations adjusted.
2357 * exec.c: All implementations adjusted.
2358 * fbsd-nat.c: All implementations adjusted.
2359 * fbsd-nat.h: All implementations adjusted.
2360 * gnu-nat.c: All implementations adjusted.
2361 * gnu-nat.h: All implementations adjusted.
2362 * go32-nat.c: All implementations adjusted.
2363 * ia64-linux-nat.c: All implementations adjusted.
2364 * inf-child.c: All implementations adjusted.
2365 * inf-child.h: All implementations adjusted.
2366 * inf-ptrace.c: All implementations adjusted.
2367 * inf-ptrace.h: All implementations adjusted.
2368 * linux-nat.c: All implementations adjusted.
2369 * linux-nat.h: All implementations adjusted.
2370 * mips-linux-nat.c: All implementations adjusted.
2371 * nto-procfs.c: All implementations adjusted.
2372 * ppc-linux-nat.c: All implementations adjusted.
2373 * procfs.c: All implementations adjusted.
2374 * ravenscar-thread.c: All implementations adjusted.
2375 * record-btrace.c: All implementations adjusted.
2376 * record-full.c: All implementations adjusted.
2377 * remote-sim.c: All implementations adjusted.
2378 * remote.c: All implementations adjusted.
2379 * s390-linux-nat.c: All implementations adjusted.
2380 * sol-thread.c: All implementations adjusted.
2381 * spu-multiarch.c: All implementations adjusted.
2382 * target-delegates.c: All implementations adjusted.
2383 * target.c: All implementations adjusted.
2384 * target.h: All implementations adjusted.
2385 * tracefile-tfile.c: All implementations adjusted.
2386 * tracefile.c: All implementations adjusted.
2387 * tracefile.h: All implementations adjusted.
2388 * windows-nat.c: All implementations adjusted.
2389 * x86-linux-nat.h: All implementations adjusted.
2390 * x86-nat.h: All implementations adjusted.
2392 2018-05-02 Pedro Alves <palves@redhat.com>
2394 * make-target-delegates (scan_target_h): Don't trim lines here.
2395 Replace sequences of tabs and/or whitespace with a single
2397 (top level, parsing methods): Trim each line before processing it
2400 2018-05-02 Pedro Alves <palves@redhat.com>
2401 John Baldwin <jhb@freebsd.org>
2403 * target.h (enum strata) <debug_stratum>: New.
2404 (struct target_ops) <all delegation methods>: Replace by C++
2405 virtual methods, and drop "to_" prefix. All references updated
2407 <to_shortname, to_longname, to_doc, to_data,
2408 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2409 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2410 virtual methods. All references updated throughout.
2411 <can_attach, supports_terminal_ours, can_create_inferior,
2412 get_thread_control_capabilities, attach_no_wait>: New
2414 <insert_breakpoint, remove_breakpoint>: Now
2415 TARGET_DEFAULT_NORETURN methods.
2416 <info_proc>: Now returns bool.
2418 (OPS_MAGIC): Delete.
2419 (current_target): Delete. All references replaced by references
2421 (target_stack): ... this. New.
2422 (target_shortname, target_longname): Adjust.
2423 (target_can_run): Now a function declaration.
2424 (default_child_has_all_memory, default_child_has_memory)
2425 (default_child_has_stack, default_child_has_registers)
2426 (default_child_has_execution): Remove target_ops parameter.
2427 (complete_target_initialization): Delete.
2428 (memory_breakpoint_target): New template class.
2429 (test_target_ops): Refactor as a C++ class with virtual methods.
2430 * make-target-delegates (NAME_PART): Tighten.
2431 (POINTER_PART, CP_SYMBOL): New.
2432 (SIMPLE_RETURN_PART): Reimplement.
2433 (VEC_RETURN_PART): Expect less.
2434 (RETURN_PART, VIRTUAL_PART): New.
2435 (METHOD): Adjust to C++ virtual methods.
2436 (scan_target_h): Remove reference to C99.
2437 (dname): Output "target_ops::" prefix.
2438 (write_function_header): Adjust to output a C++ class method.
2439 (write_declaration): New.
2440 (write_delegator): Adjust to output a C++ class method.
2441 (tdname): Output "dummy_target::" prefix.
2442 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2444 (tdefault_names, debug_names): Delete.
2445 (return_types, tdefaults, styles, argtypes_array): New.
2446 (top level): All methods are delegators.
2448 (top level): Print dummy_target and debug_target classes.
2449 * target-delegates.c: Regenerate.
2450 * target-debug.h (target_debug_print_enum_info_proc_what)
2451 (target_debug_print_thread_control_capabilities)
2452 (target_debug_print_thread_info_p): New.
2453 * target.c (dummy_target): Delete.
2454 (the_dummy_target, the_debug_target): New.
2455 (target_stack): Now extern.
2456 (set_targetdebug): Push/unpush debug target.
2457 (default_child_has_all_memory, default_child_has_memory)
2458 (default_child_has_stack, default_child_has_registers)
2459 (default_child_has_execution): Remove target_ops parameter.
2460 (complete_target_initialization): Delete.
2461 (add_target_with_completer): No longer call
2462 complete_target_initialization.
2463 (target_supports_terminal_ours): Use regular delegation.
2464 (update_current_target): Delete.
2465 (push_target): No longer check magic number. Don't call
2466 update_current_target.
2467 (unpush_target): Don't call update_current_target.
2468 (target_is_pushed): No longer check magic number.
2469 (target_require_runnable): Skip for all stratums over
2471 (target_ops::info_proc): New.
2472 (target_info_proc): Use find_target_at and
2473 find_default_run_target.
2474 (target_supports_disable_randomization): Use regular delegation.
2475 (target_get_osdata): Use find_target_at.
2476 (target_ops::open, target_ops::close, target_ops::can_attach)
2477 (target_ops::attach, target_ops::can_create_inferior)
2478 (target_ops::create_inferior, target_ops::can_run)
2479 (target_can_run): New.
2480 (default_fileio_target): Use regular delegation.
2481 (target_ops::fileio_open, target_ops::fileio_pwrite)
2482 (target_ops::fileio_pread, target_ops::fileio_fstat)
2483 (target_ops::fileio_close, target_ops::fileio_unlink)
2484 (target_ops::fileio_readlink): New.
2485 (target_fileio_open_1, target_fileio_unlink)
2486 (target_fileio_readlink): Always call the target method. Handle
2488 (return_zero, return_zero_has_execution): Delete.
2489 (init_dummy_target): Delete.
2490 (dummy_target::dummy_target, dummy_target::shortname)
2491 (dummy_target::longname, dummy_target::doc)
2492 (debug_target::debug_target, debug_target::shortname)
2493 (debug_target::longname, debug_target::doc): New.
2494 (target_supports_delete_record): Use regular delegation.
2495 (setup_target_debug): Delete.
2496 (maintenance_print_target_stack): Skip debug_stratum.
2497 (initialize_targets): Instantiate the_dummy_target and
2499 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2501 (target_auxv_search, fprint_target_auxv): Adjust.
2502 (info_auxv_command): Adjust to use target_stack.
2503 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2504 * exceptions.c (print_flush): Handle a NULL target_stack.
2505 * regcache.c (target_ops_no_register): Refactor as class with
2508 * exec.c (exec_target): New class.
2509 (exec_ops): Now an exec_target.
2510 (exec_open, exec_close_1, exec_get_section_table)
2511 (exec_xfer_partial, exec_files_info, exec_has_memory)
2512 (exec_make_note_section): Refactor as exec_target methods.
2513 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2515 (exec_target::find_memory_regions): New.
2516 (_initialize_exec): Don't call init_exec_ops.
2517 * gdbcore.h (exec_file_clear): Delete.
2519 * corefile.c (core_target): Delete.
2520 (core_file_command): Adjust.
2521 * corelow.c (core_target): New class.
2522 (the_core_target): New.
2523 (core_close): Remove target_ops parameter.
2524 (core_close_cleanup): Adjust.
2525 (core_target::close): New.
2526 (core_open, core_detach, get_core_registers, core_files_info)
2527 (core_xfer_partial, core_thread_alive, core_read_description)
2528 (core_pid_to_str, core_thread_name, core_has_memory)
2529 (core_has_stack, core_has_registers, core_info_proc): Rework as
2530 core_target methods.
2531 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2532 (_initialize_corelow): Initialize the_core_target.
2533 * gdbcore.h (core_target): Delete.
2534 (the_core_target): New.
2536 * ctf.c: (ctf_target): New class.
2537 (ctf_ops): Now a ctf_target.
2538 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2539 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2540 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2542 (init_ctf_ops): Delete.
2543 (_initialize_ctf): Don't call it.
2544 * tracefile-tfile.c (tfile_target): New class.
2545 (tfile_ops): Now a tfile_target.
2546 (tfile_open, tfile_close, tfile_files_info)
2547 (tfile_get_tracepoint_status, tfile_trace_find)
2548 (tfile_fetch_registers, tfile_xfer_partial)
2549 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2550 Refactor as tfile_target methods.
2551 (tfile_xfer_partial_features): Remove target_ops parameter.
2552 (init_tfile_ops): Delete.
2553 (_initialize_tracefile_tfile): Don't call it.
2554 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2555 (tracefile_has_stack, tracefile_has_registers)
2556 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2557 tracefile_target methods.
2558 (init_tracefile_ops): Delete.
2559 (tracefile_target::tracefile_target): New.
2560 * tracefile.h: Include "target.h".
2561 (tracefile_target): New class.
2562 (init_tracefile_ops): Delete.
2564 * spu-multiarch.c (spu_multiarch_target): New class.
2565 (spu_ops): Now a spu_multiarch_target.
2566 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2567 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2568 (spu_search_memory, spu_mourn_inferior): Refactor as
2569 spu_multiarch_target methods.
2570 (init_spu_ops): Delete.
2571 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2572 complete_target_initialization.
2574 * ravenscar-thread.c (ravenscar_thread_target): New class.
2575 (ravenscar_ops): Now a ravenscar_thread_target.
2576 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2577 (ravenscar_thread_alive, ravenscar_pid_to_str)
2578 (ravenscar_fetch_registers, ravenscar_store_registers)
2579 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2580 (ravenscar_stopped_by_hw_breakpoint)
2581 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2582 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2583 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2585 (init_ravenscar_thread_ops): Delete.
2586 (_initialize_ravenscar): Remove references to
2587 init_ravenscar_thread_ops and complete_target_initialization.
2589 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2590 (bsd_uthread_target): New class.
2591 (bsd_uthread_ops): Now a bsd_uthread_target.
2592 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2593 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2594 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2595 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2596 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2597 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2598 (bsd_uthread_target): Delete function.
2599 (_initialize_bsd_uthread): Remove reference to
2600 complete_target_initialization.
2602 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2603 (target_bfd): ... this new class.
2604 (target_bfd_xfer_partial, target_bfd_get_section_table)
2605 (target_bfd_close): Refactor as target_bfd methods.
2606 (target_bfd::~target_bfd): New.
2607 (target_bfd_reopen): Adjust.
2608 (target_bfd::close): New.
2610 * record-btrace.c (record_btrace_target): New class.
2611 (record_btrace_ops): Now a record_btrace_target.
2612 (record_btrace_open, record_btrace_stop_recording)
2613 (record_btrace_disconnect, record_btrace_close)
2614 (record_btrace_async, record_btrace_info)
2615 (record_btrace_insn_history, record_btrace_insn_history_range)
2616 (record_btrace_insn_history_from, record_btrace_call_history)
2617 (record_btrace_call_history_range)
2618 (record_btrace_call_history_from, record_btrace_record_method)
2619 (record_btrace_is_replaying, record_btrace_will_replay)
2620 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2621 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2622 (record_btrace_store_registers, record_btrace_prepare_to_store)
2623 (record_btrace_to_get_unwinder)
2624 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2625 (record_btrace_commit_resume, record_btrace_wait)
2626 (record_btrace_stop, record_btrace_can_execute_reverse)
2627 (record_btrace_stopped_by_sw_breakpoint)
2628 (record_btrace_supports_stopped_by_sw_breakpoint)
2629 (record_btrace_stopped_by_hw_breakpoint)
2630 (record_btrace_supports_stopped_by_hw_breakpoint)
2631 (record_btrace_update_thread_list, record_btrace_thread_alive)
2632 (record_btrace_goto_begin, record_btrace_goto_end)
2633 (record_btrace_goto, record_btrace_stop_replaying_all)
2634 (record_btrace_execution_direction)
2635 (record_btrace_prepare_to_generate_core)
2636 (record_btrace_done_generating_core): Refactor as
2637 record_btrace_target methods.
2638 (init_record_btrace_ops): Delete.
2639 (_initialize_record_btrace): Remove reference to
2640 init_record_btrace_ops.
2641 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2642 the execution_direction global.
2643 (record_full_base_target, record_full_target)
2644 (record_full_core_target): New classes.
2645 (record_full_ops): Now a record_full_target.
2646 (record_full_core_ops): Now a record_full_core_target.
2647 (record_full_target::detach, record_full_target::disconnect)
2648 (record_full_core_target::disconnect)
2649 (record_full_target::mourn_inferior, record_full_target::kill):
2651 (record_full_open, record_full_close, record_full_async): Refactor
2652 as methods of the record_full_base_target class.
2653 (record_full_resume, record_full_commit_resume): Refactor
2654 as methods of the record_full_target class.
2655 (record_full_wait, record_full_stopped_by_watchpoint)
2656 (record_full_stopped_data_address)
2657 (record_full_stopped_by_sw_breakpoint)
2658 (record_full_supports_stopped_by_sw_breakpoint)
2659 (record_full_stopped_by_hw_breakpoint)
2660 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2661 methods of the record_full_base_target class.
2662 (record_full_store_registers, record_full_xfer_partial)
2663 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2664 Refactor as methods of the record_full_target class.
2665 (record_full_can_execute_reverse, record_full_get_bookmark)
2666 (record_full_goto_bookmark, record_full_execution_direction)
2667 (record_full_record_method, record_full_info, record_full_delete)
2668 (record_full_is_replaying, record_full_will_replay)
2669 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2670 (record_full_stop_replaying): Refactor as methods of the
2671 record_full_base_target class.
2672 (record_full_core_resume, record_full_core_kill)
2673 (record_full_core_fetch_registers)
2674 (record_full_core_prepare_to_store)
2675 (record_full_core_store_registers, record_full_core_xfer_partial)
2676 (record_full_core_insert_breakpoint)
2677 (record_full_core_remove_breakpoint)
2678 (record_full_core_has_execution): Refactor
2679 as methods of the record_full_core_target class.
2680 (record_full_base_target::supports_delete_record): New.
2681 (init_record_full_ops): Delete.
2682 (init_record_full_core_ops): Delete.
2683 (record_full_save): Refactor as method of the
2684 record_full_base_target class.
2685 (_initialize_record_full): Remove references to
2686 init_record_full_ops and init_record_full_core_ops.
2688 * remote.c (remote_target, extended_remote_target): New classes.
2689 (remote_ops): Now a remote_target.
2690 (extended_remote_ops): Now an extended_remote_target.
2691 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2692 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2693 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2694 (remote_pass_signals, remote_set_syscall_catchpoint)
2695 (remote_program_signals, )
2696 (remote_thread_always_alive): Remove target_ops parameter.
2697 (remote_thread_alive, remote_thread_name)
2698 (remote_update_thread_list, remote_threads_extra_info)
2699 (remote_static_tracepoint_marker_at)
2700 (remote_static_tracepoint_markers_by_strid)
2701 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2702 (remote_open): Refactor as methods of remote_target.
2703 (extended_remote_open, extended_remote_detach)
2704 (extended_remote_attach, extended_remote_post_attach):
2705 (extended_remote_supports_disable_randomization)
2706 (extended_remote_create_inferior): : Refactor as method of
2707 extended_remote_target.
2708 (remote_set_permissions, remote_open_1, remote_detach)
2709 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2710 (remote_resume, remote_commit_resume, remote_stop)
2711 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2712 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2713 (remote_prepare_to_store, remote_store_registers)
2714 (remote_flash_erase, remote_flash_done, remote_files_info)
2715 (remote_kill, remote_mourn, remote_insert_breakpoint)
2716 (remote_remove_breakpoint, remote_insert_watchpoint)
2717 (remote_watchpoint_addr_within_range)
2718 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2719 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2720 (remote_supports_stopped_by_sw_breakpoint)
2721 (remote_stopped_by_hw_breakpoint)
2722 (remote_supports_stopped_by_hw_breakpoint)
2723 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2724 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2725 (remote_verify_memory): Refactor as methods of remote_target.
2726 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2728 (remote_xfer_partial, remote_get_memory_xfer_limit)
2729 (remote_search_memory, remote_rcmd, remote_memory_map)
2730 (remote_pid_to_str, remote_get_thread_local_address)
2731 (remote_get_tib_address, remote_read_description): Refactor as
2732 methods of remote_target.
2733 (remote_target::fileio_open, remote_target::fileio_pwrite)
2734 (remote_target::fileio_pread, remote_target::fileio_close): New.
2735 (remote_hostio_readlink, remote_hostio_fstat)
2736 (remote_filesystem_is_local, remote_can_execute_reverse)
2737 (remote_supports_non_stop, remote_supports_disable_randomization)
2738 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2739 (remote_supports_enable_disable_tracepoint)
2740 (remote_supports_string_tracing)
2741 (remote_can_run_breakpoint_commands, remote_trace_init)
2742 (remote_download_tracepoint, remote_can_download_tracepoint)
2743 (remote_download_trace_state_variable, remote_enable_tracepoint)
2744 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2745 (remote_trace_start, remote_get_trace_status)
2746 (remote_get_tracepoint_status, remote_trace_stop)
2747 (remote_trace_find, remote_get_trace_state_variable_value)
2748 (remote_save_trace_data, remote_get_raw_trace_data)
2749 (remote_set_disconnected_tracing, remote_core_of_thread)
2750 (remote_set_circular_trace_buffer, remote_traceframe_info)
2751 (remote_get_min_fast_tracepoint_insn_len)
2752 (remote_set_trace_buffer_size, remote_set_trace_notes)
2753 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2754 (remote_disable_btrace, remote_teardown_btrace)
2755 (remote_read_btrace, remote_btrace_conf)
2756 (remote_augmented_libraries_svr4_read, remote_load)
2757 (remote_pid_to_exec_file, remote_can_do_single_step)
2758 (remote_execution_direction, remote_thread_handle_to_thread_info):
2759 Refactor as methods of remote_target.
2760 (init_remote_ops, init_extended_remote_ops): Delete.
2761 (remote_can_async_p, remote_is_async_p, remote_async)
2762 (remote_thread_events, remote_upload_tracepoints)
2763 (remote_upload_trace_state_variables): Refactor as methods of
2765 (_initialize_remote): Remove references to init_remote_ops and
2766 init_extended_remote_ops.
2768 * remote-sim.c (gdbsim_target): New class.
2769 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2770 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2771 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2772 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2773 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2774 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2775 Refactor as methods of gdbsim_target.
2776 (gdbsim_ops): Now a gdbsim_target.
2777 (init_gdbsim_ops): Delete.
2778 (gdbsim_cntrl_c): Adjust.
2779 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2781 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2782 (the_amd64_linux_nat_target): New.
2783 (amd64_linux_fetch_inferior_registers)
2784 (amd64_linux_store_inferior_registers): Refactor as methods of
2785 amd64_linux_nat_target.
2786 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2787 * i386-linux-nat.c: Don't include "linux-nat.h".
2788 (i386_linux_nat_target): New class.
2789 (the_i386_linux_nat_target): New.
2790 (i386_linux_fetch_inferior_registers)
2791 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2792 as methods of i386_linux_nat_target.
2793 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2794 * inf-child.c (inf_child_ops): Delete.
2795 (inf_child_fetch_inferior_registers)
2796 (inf_child_store_inferior_registers): Delete.
2797 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2798 methods of inf_child_target.
2799 (inf_child_target::supports_terminal_ours)
2800 (inf_child_target::terminal_init)
2801 (inf_child_target::terminal_inferior)
2802 (inf_child_target::terminal_ours_for_output)
2803 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2804 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2806 (inf_child_open, inf_child_disconnect, inf_child_close)
2807 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2808 (inf_child_post_startup_inferior, inf_child_can_run)
2809 (inf_child_pid_to_exec_file): Refactor as methods of
2811 (inf_child_follow_fork): Delete.
2812 (inf_child_target::can_create_inferior)
2813 (inf_child_target::can_attach): New.
2814 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2815 (inf_child_target::has_stack, inf_child_target::has_registers)
2816 (inf_child_target::has_execution): New.
2817 (inf_child_fileio_open, inf_child_fileio_pwrite)
2818 (inf_child_fileio_pread, inf_child_fileio_fstat)
2819 (inf_child_fileio_close, inf_child_fileio_unlink)
2820 (inf_child_fileio_readlink, inf_child_use_agent)
2821 (inf_child_can_use_agent): Refactor as methods of
2823 (return_zero, inf_child_target): Delete.
2824 (inf_child_target::inf_child_target): New.
2825 * inf-child.h: Include "target.h".
2826 (inf_child_target): Delete function prototype.
2827 (inf_child_target): New class.
2828 (inf_child_open_target, inf_child_mourn_inferior)
2829 (inf_child_maybe_unpush_target): Delete.
2830 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2831 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2832 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2833 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2834 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2835 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2836 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2837 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2838 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2839 methods of inf_ptrace_target.
2840 (inf_ptrace_target): Delete function.
2841 * inf-ptrace.h: Include "inf-child.h".
2842 (inf_ptrace_target): Delete function declaration.
2843 (inf_ptrace_target): New class.
2844 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2845 * linux-nat.c (linux_target): New.
2846 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2847 (linux_nat_target::~linux_nat_target): New.
2848 (linux_child_post_attach, linux_child_post_startup_inferior)
2849 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2850 (linux_child_remove_fork_catchpoint)
2851 (linux_child_insert_vfork_catchpoint)
2852 (linux_child_remove_vfork_catchpoint)
2853 (linux_child_insert_exec_catchpoint)
2854 (linux_child_remove_exec_catchpoint)
2855 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2856 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2857 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2858 (linux_nat_stopped_data_address)
2859 (linux_nat_stopped_by_sw_breakpoint)
2860 (linux_nat_supports_stopped_by_sw_breakpoint)
2861 (linux_nat_stopped_by_hw_breakpoint)
2862 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2863 (linux_nat_kill, linux_nat_mourn_inferior)
2864 (linux_nat_xfer_partial, linux_nat_thread_alive)
2865 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2866 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2867 (linux_child_static_tracepoint_markers_by_strid)
2868 (linux_nat_is_async_p, linux_nat_can_async_p)
2869 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2870 (linux_nat_supports_multi_process)
2871 (linux_nat_supports_disable_randomization, linux_nat_async)
2872 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2873 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2874 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2875 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2876 methods of linux_nat_target.
2877 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2878 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2880 (check_stopped_by_watchpoint): Adjust.
2881 (linux_xfer_partial): Delete.
2882 (linux_target_install_ops, linux_target, linux_nat_add_target):
2884 (linux_nat_target::linux_nat_target): New.
2885 * linux-nat.h: Include "inf-ptrace.h".
2886 (linux_nat_target): New.
2887 (linux_target, linux_target_install_ops, linux_nat_add_target):
2888 Delete function declarations.
2889 (linux_target): Declare global.
2890 * linux-thread-db.c (thread_db_target): New.
2891 (thread_db_target::thread_db_target): New.
2892 (thread_db_ops): Delete.
2893 (the_thread_db_target): New.
2894 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2895 (thread_db_update_thread_list, thread_db_pid_to_str)
2896 (thread_db_extra_thread_info)
2897 (thread_db_thread_handle_to_thread_info)
2898 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2899 (thread_db_resume): Refactor as methods of thread_db_target.
2900 (init_thread_db_ops): Delete.
2901 (_initialize_thread_db): Remove reference to init_thread_db_ops.
2902 * x86-linux-nat.c: Don't include "linux-nat.h".
2903 (super_post_startup_inferior): Delete.
2904 (x86_linux_nat_target::~x86_linux_nat_target): New.
2905 (x86_linux_child_post_startup_inferior)
2906 (x86_linux_read_description, x86_linux_enable_btrace)
2907 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2908 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2909 methods of x86_linux_nat_target.
2910 (x86_linux_create_target): Delete. Bits folded ...
2911 (x86_linux_add_target): ... here. Now takes a linux_nat_target
2913 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2914 (x86_linux_nat_target): New class.
2915 (x86_linux_create_target): Delete.
2916 (x86_linux_add_target): Now takes a linux_nat_target pointer.
2917 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2918 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2919 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2920 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2921 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2923 (x86_use_watchpoints): Delete.
2924 * x86-nat.h: Include "breakpoint.h" and "target.h".
2925 (x86_use_watchpoints): Delete.
2926 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2927 (x86_stopped_by_watchpoint, x86_stopped_data_address)
2928 (x86_insert_watchpoint, x86_remove_watchpoint)
2929 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2930 (x86_stopped_by_hw_breakpoint): New declarations.
2931 (x86_nat_target): New template class.
2933 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2934 (the_ppc_linux_nat_target): New.
2935 (ppc_linux_fetch_inferior_registers)
2936 (ppc_linux_can_use_hw_breakpoint)
2937 (ppc_linux_region_ok_for_hw_watchpoint)
2938 (ppc_linux_ranged_break_num_registers)
2939 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2940 (ppc_linux_insert_mask_watchpoint)
2941 (ppc_linux_remove_mask_watchpoint)
2942 (ppc_linux_can_accel_watchpoint_condition)
2943 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2944 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2945 (ppc_linux_watchpoint_addr_within_range)
2946 (ppc_linux_masked_watch_num_registers)
2947 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2948 (ppc_linux_read_description): Refactor as methods of
2949 ppc_linux_nat_target.
2950 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
2952 * procfs.c (procfs_xfer_partial): Delete forward declaration.
2953 (procfs_target): New class.
2954 (the_procfs_target): New.
2955 (procfs_target): Delete function.
2956 (procfs_auxv_parse, procfs_attach, procfs_detach)
2957 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2958 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2959 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2960 (procfs_create_inferior, procfs_update_thread_list)
2961 (procfs_thread_alive, procfs_pid_to_str)
2962 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2963 (procfs_stopped_data_address, procfs_insert_watchpoint)
2964 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2965 (proc_find_memory_regions, procfs_info_proc)
2966 (procfs_make_note_section): Refactor as methods of procfs_target.
2967 (_initialize_procfs): Adjust.
2968 * sol-thread.c (sol_thread_target): New class.
2969 (sol_thread_ops): Now a sol_thread_target.
2970 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2971 (sol_thread_fetch_registers, sol_thread_store_registers)
2972 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2973 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2974 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2975 (init_sol_thread_ops): Delete.
2976 (_initialize_sol_thread): Adjust. Remove references to
2977 init_sol_thread_ops and complete_target_initialization.
2979 * windows-nat.c (windows_nat_target): New class.
2980 (windows_fetch_inferior_registers)
2981 (windows_store_inferior_registers, windows_resume, windows_wait)
2982 (windows_attach, windows_detach, windows_pid_to_exec_file)
2983 (windows_files_info, windows_create_inferior)
2984 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2985 (windows_close, windows_pid_to_str, windows_xfer_partial)
2986 (windows_get_tib_address, windows_get_ada_task_ptid)
2987 (windows_thread_name, windows_thread_alive): Refactor as
2988 windows_nat_target methods.
2989 (do_initial_windows_stuff): Adjust.
2990 (windows_target): Delete function.
2991 (_initialize_windows_nat): Adjust.
2993 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2994 (darwin_mourn_inferior, darwin_kill_inferior)
2995 (darwin_create_inferior, darwin_attach, darwin_detach)
2996 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2997 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2998 (darwin_supports_multi_process): Refactor as darwin_nat_target
3000 (darwin_resume_to, darwin_files_info): Delete.
3001 (_initialize_darwin_inferior): Rename to ...
3002 (_initialize_darwin_nat): ... this. Adjust to C++ification.
3003 * darwin-nat.h: Include "inf-child.h".
3004 (darwin_nat_target): New class.
3005 (darwin_complete_target): Delete.
3006 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3007 (darwin_target): New.
3008 (i386_darwin_fetch_inferior_registers)
3009 (i386_darwin_store_inferior_registers): Refactor as methods of
3011 (darwin_complete_target): Delete, with ...
3012 (_initialize_i386_darwin_nat): ... bits factored out here.
3014 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3015 (the_alpha_linux_nat_target): New.
3016 (alpha_linux_register_u_offset): Refactor as
3017 alpha_linux_nat_target method.
3018 (_initialize_alpha_linux_nat): Adjust.
3019 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3020 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3021 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3022 methods of linux_nat_trad_target.
3023 (linux_trad_target): Delete.
3024 * linux-nat-trad.h (linux_trad_target): Delete function.
3025 (linux_nat_trad_target): New class.
3026 * mips-linux-nat.c (mips_linux_nat_target): New class.
3027 (super_fetch_registers, super_store_registers, super_close):
3029 (the_mips_linux_nat_target): New.
3030 (mips64_linux_regsets_fetch_registers)
3031 (mips64_linux_regsets_store_registers)
3032 (mips64_linux_fetch_registers, mips64_linux_store_registers)
3033 (mips_linux_register_u_offset, mips_linux_read_description)
3034 (mips_linux_can_use_hw_breakpoint)
3035 (mips_linux_stopped_by_watchpoint)
3036 (mips_linux_stopped_data_address)
3037 (mips_linux_region_ok_for_hw_watchpoint)
3038 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3039 (mips_linux_close): Refactor as methods of mips_linux_nat.
3040 (_initialize_mips_linux_nat): Adjust to C++ification.
3042 * aix-thread.c (aix_thread_target): New class.
3043 (aix_thread_ops): Now an aix_thread_target.
3044 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3045 (aix_thread_fetch_registers, aix_thread_store_registers)
3046 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3047 (aix_thread_thread_alive, aix_thread_pid_to_str)
3048 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3049 Refactor as methods of aix_thread_target.
3050 (init_aix_thread_ops): Delete.
3051 (_initialize_aix_thread): Remove references to init_aix_thread_ops
3052 and complete_target_initialization.
3053 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3054 (rs6000_nat_target): New class.
3055 (the_rs6000_nat_target): New.
3056 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3057 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3058 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3059 (super_create_inferior): Delete.
3060 (_initialize_rs6000_nat): Adjust to C++ification.
3062 * arm-linux-nat.c (arm_linux_nat_target): New class.
3063 (the_arm_linux_nat_target): New.
3064 (arm_linux_fetch_inferior_registers)
3065 (arm_linux_store_inferior_registers, arm_linux_read_description)
3066 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3067 (arm_linux_remove_hw_breakpoint)
3068 (arm_linux_region_ok_for_hw_watchpoint)
3069 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3070 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3071 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3072 arm_linux_nat_target.
3073 (_initialize_arm_linux_nat): Adjust to C++ification.
3075 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3076 (the_aarch64_linux_nat_target): New.
3077 (aarch64_linux_fetch_inferior_registers)
3078 (aarch64_linux_store_inferior_registers)
3079 (aarch64_linux_child_post_startup_inferior)
3080 (aarch64_linux_read_description)
3081 (aarch64_linux_can_use_hw_breakpoint)
3082 (aarch64_linux_insert_hw_breakpoint)
3083 (aarch64_linux_remove_hw_breakpoint)
3084 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3085 (aarch64_linux_region_ok_for_hw_watchpoint)
3086 (aarch64_linux_stopped_data_address)
3087 (aarch64_linux_stopped_by_watchpoint)
3088 (aarch64_linux_watchpoint_addr_within_range)
3089 (aarch64_linux_can_do_single_step): Refactor as methods of
3090 aarch64_linux_nat_target.
3091 (super_post_startup_inferior): Delete.
3092 (_initialize_aarch64_linux_nat): Adjust to C++ification.
3094 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
3095 (the_hppa_linux_nat_target): New.
3096 (hppa_linux_fetch_inferior_registers)
3097 (hppa_linux_store_inferior_registers): Refactor as methods of
3098 hppa_linux_nat_target.
3099 (_initialize_hppa_linux_nat): Adjust to C++ification.
3101 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3102 (the_ia64_linux_nat_target): New.
3103 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3104 (ia64_linux_stopped_data_address)
3105 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3106 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3107 ia64_linux_nat_target methods.
3108 (super_xfer_partial): Delete.
3109 (_initialize_ia64_linux_nat): Adjust to C++ification.
3111 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3112 (the_m32r_linux_nat_target): New.
3113 (m32r_linux_fetch_inferior_registers)
3114 (m32r_linux_store_inferior_registers): Refactor as
3115 m32r_linux_nat_target methods.
3116 (_initialize_m32r_linux_nat): Adjust to C++ification.
3118 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
3119 (the_m68k_linux_nat_target): New.
3120 (m68k_linux_fetch_inferior_registers)
3121 (m68k_linux_store_inferior_registers): Refactor as
3122 m68k_linux_nat_target methods.
3123 (_initialize_m68k_linux_nat): Adjust to C++ification.
3125 * s390-linux-nat.c (s390_linux_nat_target): New class.
3126 (the_s390_linux_nat_target): New.
3127 (s390_linux_fetch_inferior_registers)
3128 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
3129 (s390_insert_watchpoint, s390_remove_watchpoint)
3130 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
3131 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
3132 (s390_auxv_parse, s390_read_description): Refactor as methods of
3133 s390_linux_nat_target.
3134 (_initialize_s390_nat): Adjust to C++ification.
3136 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
3137 (the_sparc_linux_nat_target): New.
3138 (_initialize_sparc_linux_nat): Adjust to C++ification.
3139 * sparc-nat.c (sparc_fetch_inferior_registers)
3140 (sparc_store_inferior_registers): Remove target_ops parameter.
3141 * sparc-nat.h (sparc_fetch_inferior_registers)
3142 (sparc_store_inferior_registers): Remove target_ops parameter.
3143 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
3144 (the_sparc64_linux_nat_target): New.
3145 (_initialize_sparc64_linux_nat): Adjust to C++ification.
3147 * spu-linux-nat.c (spu_linux_nat_target): New class.
3148 (the_spu_linux_nat_target): New.
3149 (spu_child_post_startup_inferior, spu_child_post_attach)
3150 (spu_child_wait, spu_fetch_inferior_registers)
3151 (spu_store_inferior_registers, spu_xfer_partial)
3152 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
3154 (_initialize_spu_nat): Adjust to C++ification.
3156 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
3157 (the_tilegx_linux_nat_target): New.
3158 (fetch_inferior_registers, store_inferior_registers):
3159 Refactor as methods.
3160 (_initialize_tile_linux_nat): Adjust to C++ification.
3162 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
3163 (the_xtensa_linux_nat_target): New.
3164 (xtensa_linux_fetch_inferior_registers)
3165 (xtensa_linux_store_inferior_registers): Refactor as
3166 xtensa_linux_nat_target methods.
3167 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3169 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3170 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3171 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3172 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3173 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3174 (fbsd_stopped_by_sw_breakpoint)
3175 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3176 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3177 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3178 (fbsd_post_startup_inferior, fbsd_post_attach)
3179 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3180 (fbsd_set_syscall_catchpoint)
3181 (super_xfer_partial, super_resume, super_wait)
3182 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3183 (fbsd_handle_debug_trap): Remove target_ops parameter.
3184 (fbsd_nat_add_target): Delete.
3185 * fbsd-nat.h: Include "inf-ptrace.h".
3186 (fbsd_nat_add_target): Delete.
3187 (USE_SIGTRAP_SIGINFO): Define.
3188 (fbsd_nat_target): New class.
3190 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3191 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3192 (amd64bsd_target): Delete.
3193 * amd64-bsd-nat.h: New file.
3194 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3196 (amd64_fbsd_nat_target): New class.
3197 (the_amd64_fbsd_nat_target): New.
3198 (amd64fbsd_read_description): Refactor as method of
3199 amd64_fbsd_nat_target.
3200 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3201 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3202 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3203 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3204 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3205 (i386bsd_target): Delete.
3206 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3207 (i386bsd_fetch_inferior_registers)
3208 (i386bsd_store_inferior_registers): Declare.
3209 (i386_bsd_nat_target): New class.
3210 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3211 (the_i386_fbsd_nat_target): New.
3212 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3213 i386_fbsd_nat_target methods.
3214 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3215 (_initialize_i386fbsd_nat): Adjust to C++ification.
3216 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3217 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3218 (_initialize_x86_bsd_nat): Adjust to C++ification.
3219 * x86-bsd-nat.h: Include "x86-nat.h".
3220 (x86bsd_target): Delete declaration.
3221 (x86bsd_nat_target): New class.
3223 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3224 (the_aarch64_fbsd_nat_target): New.
3225 (aarch64_fbsd_fetch_inferior_registers)
3226 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3227 aarch64_fbsd_nat_target.
3228 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3229 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3230 (the_alpha_bsd_nat_target): New.
3231 (alphabsd_fetch_inferior_registers)
3232 (alphabsd_store_inferior_registers): Refactor as
3233 alpha_bsd_nat_target methods.
3234 (_initialize_alphabsd_nat): Refactor as methods of
3235 alpha_bsd_nat_target.
3236 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3237 (the_amd64_nbsd_nat_target): New.
3238 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3239 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3240 (the_amd64_obsd_nat_target): New.
3241 (_initialize_amd64obsd_nat): Adjust to C++ification.
3242 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3243 (the_arm_fbsd_nat_target): New.
3244 (arm_fbsd_fetch_inferior_registers)
3245 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3246 (_initialize_arm_fbsd_nat): Refactor as methods of
3247 arm_fbsd_nat_target.
3248 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3249 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3250 (the_arm_netbsd_nat_target): New.
3251 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3252 arm_netbsd_nat_target.
3253 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3254 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3255 (the_hppa_nbsd_nat_target): New.
3256 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3257 hppa_nbsd_nat_target methods.
3258 (_initialize_hppanbsd_nat): Adjust to C++ification.
3259 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3260 (the_hppa_obsd_nat_target): New.
3261 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3262 methods of hppa_obsd_nat_target.
3263 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3265 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3266 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3268 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3269 (_initialize_i386obsd_nat): Use add_target.
3270 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3271 (the_m68k_bsd_nat_target): New.
3272 (m68kbsd_fetch_inferior_registers)
3273 (m68kbsd_store_inferior_registers): Refactor as methods of
3274 m68k_bsd_nat_target.
3275 (_initialize_m68kbsd_nat): Adjust to C++ification.
3276 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3277 (the_mips_fbsd_nat_target): New.
3278 (mips_fbsd_fetch_inferior_registers)
3279 (mips_fbsd_store_inferior_registers): Refactor as methods of
3280 mips_fbsd_nat_target.
3281 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3283 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3284 (the_mips_nbsd_nat_target): New.
3285 (mipsnbsd_fetch_inferior_registers)
3286 (mipsnbsd_store_inferior_registers): Refactor as methods of
3287 mips_nbsd_nat_target.
3288 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3289 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3290 (the_mips64_obsd_nat_target): New.
3291 (mips64obsd_fetch_inferior_registers)
3292 (mips64obsd_store_inferior_registers): Refactor as methods of
3293 mips64_obsd_nat_target.
3294 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3296 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3298 * nbsd-nat.h: Include "inf-ptrace.h".
3299 (nbsd_nat_target): New class.
3300 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3301 (obsd_wait): Refactor as methods of obsd_nat_target.
3302 (obsd_add_target): Delete.
3303 * obsd-nat.h: Include "inf-ptrace.h".
3304 (obsd_nat_target): New class.
3305 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3306 (the_ppc_fbsd_nat_target): New.
3307 (ppcfbsd_fetch_inferior_registers)
3308 (ppcfbsd_store_inferior_registers): Refactor as methods of
3309 ppc_fbsd_nat_target.
3310 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3312 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3313 (the_ppc_nbsd_nat_target): New.
3314 (ppcnbsd_fetch_inferior_registers)
3315 (ppcnbsd_store_inferior_registers): Refactor as methods of
3316 ppc_nbsd_nat_target.
3317 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3318 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3319 (the_ppc_obsd_nat_target): New.
3320 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3321 methods of ppc_obsd_nat_target.
3322 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3324 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3325 (the_sh_nbsd_nat_target): New.
3326 (shnbsd_fetch_inferior_registers)
3327 (shnbsd_store_inferior_registers): Refactor as methods of
3329 (_initialize_shnbsd_nat): Adjust to C++ification.
3330 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3331 (inf_ptrace_xfer_partial): Delete.
3332 (sparc_xfer_partial, sparc_target): Delete.
3333 * sparc-nat.h (sparc_fetch_inferior_registers)
3334 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3335 (sparc_target): Delete function declaration.
3336 (sparc_target): New template class.
3337 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3338 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3339 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3340 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3342 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3343 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3344 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3345 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3347 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3348 (the_vax_bsd_nat_target): New.
3349 (vaxbsd_fetch_inferior_registers)
3350 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3352 (_initialize_vaxbsd_nat): Adjust to C++ification.
3354 * bsd-kvm.c (bsd_kvm_target): New class.
3355 (bsd_kvm_ops): Now a bsd_kvm_target.
3356 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3357 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3358 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3360 (bsd_kvm_return_one): Delete.
3361 (bsd_kvm_add_target): Adjust to C++ification.
3363 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3364 (nto_procfs_target_procfs): New classes.
3365 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3366 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3367 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3368 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3369 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3370 (procfs_remove_hw_breakpoint, procfs_resume)
3371 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3372 (procfs_kill_inferior, procfs_store_registers)
3373 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3374 as methods of nto_procfs_target.
3375 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3376 (nto_native_ops): Delete.
3377 (procfs_open, procfs_native_open): Delete.
3378 (nto_native_ops): Now an nto_procfs_target_native.
3379 (init_procfs_targets): Adjust to C++ification.
3380 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3381 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3382 Refactor as methods of nto_procfs_target.
3384 * go32-nat.c (go32_nat_target): New class.
3385 (the_go32_nat_target): New.
3386 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3387 (go32_store_registers, go32_xfer_partial, go32_files_info)
3388 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3389 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3390 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3391 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3392 (go32_target): Delete.
3393 (_initialize_go32_nat): Adjust to C++ification.
3395 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3396 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3397 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3398 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3400 (gnu_target): Delete.
3401 * gnu-nat.h (gnu_target): Delete.
3402 (gnu_nat_target): New class.
3403 * i386-gnu-nat.c (gnu_base_target): New.
3404 (i386_gnu_nat_target): New class.
3405 (the_i386_gnu_nat_target): New.
3406 (_initialize_i386gnu_nat): Adjust to C++ification.
3408 2018-05-02 Pedro Alves <palves@redhat.com>
3410 * bfd-target.c (target_bfd_xclose): Rename to ...
3411 (target_bfd_close): ... this.
3412 (target_bfd_reopen): Adjust.
3413 * target.c (target_close): Remove references to to_xclose.
3414 * target.h (target_ops::to_xclose): Delete.
3415 (target_ops::to_close): Update comments.
3417 2018-05-02 Pedro Alves <palves@redhat.com>
3419 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3421 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3422 * inf-ptrace.c (inf_ptrace_register_u_offset)
3423 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3424 (inf_ptrace_store_register, inf_ptrace_store_registers)
3425 (inf_ptrace_trad_target): Move to ...
3426 * linux-nat-trad.c: ... this new file.
3427 * linux-nat-trad.h: New file.
3428 * linux-nat.c (linux_target_install_ops): Make extern.
3429 (linux_trad_target): Delete.
3430 * linux-nat.h (linux_trad_target): Delete declaration.
3431 (linux_target_install_ops): Declare.
3432 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3435 2018-05-02 Pedro Alves <palves@redhat.com>
3437 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3438 procfs_target/add_target here.
3439 * procfs.c (procfs_target): Make static.
3440 (_initialize_procfs): Call add_target here.
3441 * procfs.h (struct target_ops): Remove forward declaration.
3442 (procfs_target): Remove declaration.
3443 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3445 2018-05-02 Pedro Alves <palves@redhat.com>
3447 * procfs.c (procfs_stopped_by_watchpoint)
3448 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3449 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3451 (procfs_use_watchpoints): Delete, move contents...
3452 (procfs_target): ... here.
3453 * procfs.h (procfs_use_watchpoints): Delete declaration.
3454 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3455 procfs_use_watchpoints.
3456 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3457 procfs_use_watchpoints.
3459 2018-05-02 Tom Tromey <tom@tromey.com>
3462 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3463 and var_zuinteger_unlimited.
3464 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3465 and PARAM_ZUINTEGER_UNLIMITED.
3466 (set_parameter_value): Handle var_zuinteger and
3467 var_zuinteger_unlimited.
3468 (add_setshow_generic): Likewise.
3469 (parmpy_init): Likewise.
3471 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3474 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3475 pointer is not null before dereferencing it.
3477 2018-04-30 Tom Tromey <tom@tromey.com>
3479 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3482 2018-04-30 Tom Tromey <tom@tromey.com>
3484 * breakpoint.c (mention): Remove use of is_mi_like_p.
3485 (print_mention_ranged_breakpoint): Likewise.
3486 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3489 2018-04-30 Tom Tromey <tom@tromey.com>
3491 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3493 2018-04-30 Tom Tromey <tom@tromey.com>
3495 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3496 (info_spu_event_command): Remove some uses of is_mi_like_p.
3498 2018-04-30 Tom Tromey <tom@tromey.com>
3500 * python/py-framefilter.c (py_print_single_arg)
3501 (enumerate_locals, py_print_args, py_print_frame): Remove some
3502 uses of is_mi_like_p.
3504 2018-04-30 Tom Tromey <tom@tromey.com>
3507 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3508 * ui-out.h (ui_out::is_mi_like_p): Now const.
3509 (ui_out::do_is_mi_like_p): Now const.
3510 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3512 2018-04-30 Tom Tromey <tom@tromey.com>
3514 * varobj.c (varobj_set_visualizer): Use new_reference.
3515 * python/python.c (gdbpy_decode_line): Use new_reference.
3516 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3519 2018-04-30 Tom Tromey <tom@tromey.com>
3521 * varobj.c (install_new_value): Use new_reference.
3522 * value.h (value_incref): Return void. Swap intro comment with
3524 * value.c (set_value_parent): Use new_reference.
3525 (value_incref): Return void. Update intro comment.
3526 (release_value): Use new_reference.
3527 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3529 2018-04-30 Tom Tromey <tom@tromey.com>
3531 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3532 * gdb_bfd.h (new_bfd_ref): Remove.
3533 (gdb_bfd_open): Update comment.
3534 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3535 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3536 (gdb_bfd_fdopenr): Use new_reference.
3537 * exec.c (exec_file_attach): Use new_reference.
3539 2018-04-30 Tom Tromey <tom@tromey.com>
3541 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3544 2018-04-30 Tom Tromey <tom@tromey.com>
3546 * jit.c (jit_read_code_entry): Use type_align.
3547 * i386-tdep.c (i386_gdbarch_init): Don't call
3548 set_gdbarch_long_long_align_bit.
3549 * gdbarch.sh: Remove long_long_align_bit.
3550 * gdbarch.c, gdbarch.h: Rebuild.
3551 * arc-tdep.c (arc_type_align): New function.
3552 (arc_gdbarch_init): Use arc_type_align. Don't call
3553 set_gdbarch_long_long_align_bit.
3555 2018-04-30 Tom Tromey <tom@tromey.com>
3557 * rust-lang.c (rust_type_alignment): Remove.
3558 (rust_composite_type): Use type_align.
3560 2018-04-30 Tom Tromey <tom@tromey.com>
3562 * NEWS: Mention Type.align.
3563 * python/py-type.c (typy_get_alignof): New function.
3564 (type_object_getset): Add "alignof".
3566 2018-04-30 Tom Tromey <tom@tromey.com>
3570 * std-operator.def (UNOP_ALIGNOF): New operator.
3571 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3573 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3574 * c-lang.c (c_op_print_tab): Add alignof.
3575 * c-exp.y (ALIGNOF): New token.
3576 (exp): Add "ALIGNOF" production.
3577 (ident_tokens): Add _Alignof and alignof.
3579 2018-04-30 Tom Tromey <tom@tromey.com>
3581 * i386-tdep.c (i386_type_align): New function.
3582 (i386_gdbarch_init): Update.
3583 * gdbarch.sh (type_align): New method.
3584 * gdbarch.c, gdbarch.h: Rebuild.
3585 * arch-utils.h (default_type_align): Declare.
3586 * arch-utils.c (default_type_align): New function.
3587 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3588 (struct type) <align_log2>: New field.
3589 <instance_flags>: Now a bitfield.
3590 (TYPE_RAW_ALIGN): New macro.
3591 (type_align, type_raw_align, set_type_align): Declare.
3592 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3594 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3595 (get_alignment, maybe_set_alignment): New functions.
3596 (read_structure_type, read_enumeration_type, read_array_type)
3597 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3598 (read_subrange_type, read_base_type): Set type alignment.
3600 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3602 * dwarf2read.c (read_index_from_section): Use bool.
3604 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3607 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3610 2018-04-29 John Reiser <jreiser@BitWagon.com>
3613 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3614 last step, and do it atomically.
3616 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3618 * compile/compile-c-types.c (convert_int, convert_float):
3621 2018-04-27 Tom Tromey <tom@tromey.com>
3624 * rust-lang.c (rust_inclusive_range_type_p): New function.
3625 (rust_range): Handle inclusive ranges.
3626 (rust_compute_range): Likewise.
3627 * rust-exp.y (struct rust_op) <inclusive>: New field.
3628 (DOTDOTEQ): New constant.
3629 (range_expr): Add "..=" productions.
3630 (operator_tokens): Add "..=" token.
3631 (ast_range): Add "inclusive" parameter.
3632 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3634 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3636 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3637 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3639 * expprint.c (print_subexp_standard): Handle new bounds values.
3640 (dump_subexp_body_standard): Likewise.
3642 2018-04-27 Tom Tromey <tom@tromey.com>
3644 * configure: Rebuild.
3645 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3646 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3648 (class symbol_needs_eval_context): Likewise.
3649 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3650 (mock_mapped_index::symbol_name_at): Use "override". Remove
3652 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3654 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3655 * aarch64-tdep.c (instruction_reader::read): Use "override".
3656 (instruction_reader_test::read): Likewise.
3657 * arm-tdep.c (instruction_reader::read): Use "override".
3658 (instruction_reader_thumb::read): Likewise.
3660 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3663 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3664 instead of remote_send.
3665 (remote_send): Remove.
3667 2018-04-26 Pedro Alves <palves@redhat.com>
3669 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3670 find_function_start_sal instead of find_pc_line.
3672 2018-04-26 Pedro Alves <palves@redhat.com>
3674 * breakpoint.c (set_breakpoint_location_function): Handle
3676 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3677 * elfread.c (elf_symtab_read): Give data symbols with
3678 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3679 (elf_rel_plt_read): Update comment.
3680 * linespec.c (convert_linespec_to_sals): Handle
3682 (minsym_found): Handle mst_data_gnu_ifunc.
3683 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3684 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3685 * parse.c (find_minsym_type_and_address): Handle
3687 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3688 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3689 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3691 <mst_data_gnu_ifunc>: New enumerator.
3693 2018-04-26 Pedro Alves <palves@redhat.com>
3695 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3696 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3697 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3699 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3700 (lookup_minimal_symbol_by_pc): Adjust.
3701 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3702 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3703 * minsyms.h (lookup_msym_prefer): New enum.
3704 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3705 parameter by a lookup_msym_prefer parameter.
3707 2018-04-26 Pedro Alves <palves@redhat.com>
3709 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3710 ends in "@plt" instead of looking at the symbol's section.
3712 2018-04-26 Pedro Alves <palves@redhat.com>
3714 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3716 (find_pc_partial_function_gnu_ifunc): Rename to ...
3717 (find_pc_partial_function): ... this, and remove references to
3719 (find_pc_partial_function): Delete old implementation.
3720 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3722 2018-04-26 Pedro Alves <palves@redhat.com>
3724 * linespec.c (struct bound_minimal_symbol_search_key): New.
3725 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3726 skip first line if we found a GNU ifunc minimal symbol by name.
3727 (compare_msymbols): Change parameters to work with a destructured
3729 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3732 2018-04-26 Pedro Alves <palves@redhat.com>
3734 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3735 ifunc targets here. Instead, if we have an ifunc minsym, use its
3737 (add_location_to_breakpoint): Store the minsym and the objfile in
3738 the breakpoint location.
3739 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3740 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3741 Record the minsym in the sal.
3742 * symtab.h (symtab_and_line) <msymbol>: New field.
3744 2018-04-26 Pedro Alves <palves@redhat.com>
3746 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3747 unless we actually resolved the ifunc.
3749 2018-04-26 Pedro Alves <palves@redhat.com>
3751 * c-exp.y (variable production): Prefer ifunc minsyms over
3752 regular function symbols.
3753 * symtab.c (find_gnu_ifunc): New function.
3754 * minsyms.h (lookup_msym_prefer): New enum.
3755 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3756 parameter by a lookup_msym_prefer parameter.
3757 * symtab.h (find_gnu_ifunc): New declaration.
3759 2018-04-26 Pedro Alves <palves@redhat.com>
3761 * blockframe.c (find_gnu_ifunc_target_type): New function.
3762 (find_function_type): New.
3763 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3764 return a value with a memory address.
3765 (eval_call): For calls to GNU ifunc functions, try to find the
3766 type of the target function from the type that the resolver
3768 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3770 * infcall.c (find_function_return_type): Delete.
3771 (find_function_addr): Add 'function_type' parameter. For calls to
3772 GNU ifunc functions, try to find the type of the target function
3773 from the type that the resolver returns, and return it via
3775 (call_function_by_hand_dummy): Adjust to use the function type
3776 returned by find_function_addr.
3777 (find_function_addr): Add 'function_type' parameter and move
3779 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3782 2018-04-26 Pedro Alves <palves@redhat.com>
3784 * c-exp.y (variable production): Skip finding an alias for ifunc
3787 2018-04-26 Pedro Alves <palves@redhat.com>
3789 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3791 2018-04-25 Pedro Alves <palves@redhat.com>
3793 * infcmd.c (kill_command): Print the pid as string, not the whole
3794 thread's ptid. Add comment. s/has been killed/killed/ in output
3796 * remote.c (remote_detach_1): Print the pid as string, not the
3797 whole thread's ptid.
3799 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3800 Sergio Durigan Junior <sergiodj@redhat.com>
3801 Pedro Alves <palves@redhat.com>
3803 * infcmd.c (kill_command): Print message when inferior has
3805 * inferior.c (print_inferior_events): Remove 'static'. Set as
3807 (add_inferior): Improve message printed when
3808 'print_inferior_events' is on.
3809 (exit_inferior): Remove message printed when
3810 'print_inferior_events' is on.
3811 (detach_inferior): Improve message printed when
3812 'print_inferior_events' is on.
3813 (initialize_inferiors): Use 'add_inferior_silent' to set
3814 'current_inferior_'.
3815 * inferior.h (print_inferior_events): Declare here as
3817 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3818 '[Detaching...]' messages when 'print_inferior_events' is on.
3819 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3820 as prefix/suffix for messages. Remove periods. Fix erroneous
3821 'Detaching after fork from child...', replace it by '... from
3823 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3824 prefix/suffix when printing 'Detaching...' messages. Print
3825 them when 'print_inferior_events' is on.
3826 * remote.c (remote_detach_1): Print message when detaching
3827 from inferior and '!is_fork_parent'.
3829 2018-04-24 Tom Tromey <tom@tromey.com>
3831 * cli-out.h: Reindent.
3833 2018-04-24 Tom Tromey <tom@tromey.com>
3835 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3836 (cli_ui_out::do_field_string): Use fputs_filtered.
3837 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3839 2018-04-23 Tom Tromey <tom@tromey.com>
3841 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3842 gdb::unique_xmalloc_ptr.
3844 2018-04-23 Tom Tromey <tom@tromey.com>
3846 * configure: Rebuild.
3848 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3851 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3852 prepare_for_testing. Set normal_bp to r_debug_state if target
3855 2018-04-21 Pedro Alves <palves@redhat.com>
3856 Rajendra SY <rajendra.sy@gmail.com>
3858 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3859 * remote.c (extended_remote_attach): In all-stop mode, mark the
3860 thread as executing.
3862 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3864 * thread.c (thread_apply_all_command): Fix comment.
3865 (thread_command): Fix comment.
3867 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3869 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3871 * features/aarch64-core.c (create_feature_aarch64_core):
3873 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3875 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3877 * features/i386/32bit-avx512.c
3878 (create_feature_i386_32bit_avx512): Likewise.
3879 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3881 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3883 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3885 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3887 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3889 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3891 * features/i386/64bit-avx512.c
3892 (create_feature_i386_64bit_avx512): Likewise.
3893 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3895 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3897 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3899 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3901 * features/i386/64bit-segments.c
3902 (create_feature_i386_64bit_segments): Likewise.
3903 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3905 * features/i386/x32-core.c
3906 (create_feature_i386_x32_core): Likewise.
3907 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3908 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3909 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3910 * target-descriptions.c: In generated code, don't pass xml
3913 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3915 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3916 (print_xml_feature::visit_post): Likewise.
3917 (print_xml_feature::visit): Likewise.
3918 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3919 (print_xml_feature): Add new class.
3920 * regformats/regdat.sh: Null xmltarget on feature targets.
3921 * target-descriptions.c (struct target_desc): Add xmltarget.
3922 (maintenance_check_tdesc_xml_convert): Add unittest function.
3923 (tdesc_get_features_xml): Add function to get xml.
3924 (maintenance_check_xml_descriptions): Test xml generation.
3925 * xml-tdesc.c (string_read_description_xml): Add function.
3926 * xml-tdesc.h (string_read_description_xml): Add declaration.
3928 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3930 * features/Makefile: Add feature marker to targets with new style
3931 target descriptions.
3932 * regformats/aarch64.dat: Regenerate.
3933 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3934 * regformats/i386/amd64-avx-linux.dat: Likewise.
3935 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3936 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3937 * regformats/i386/amd64-linux.dat: Likewise.
3938 * regformats/i386/amd64-mpx-linux.dat: Likewise.
3939 * regformats/i386/amd64.dat: Likewise.
3940 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3941 * regformats/i386/i386-avx-linux.dat: Likewise.
3942 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3943 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3944 * regformats/i386/i386-linux.dat: Likewise.
3945 * regformats/i386/i386-mmx-linux.dat: Likewise.
3946 * regformats/i386/i386-mpx-linux.dat: Likewise.
3947 * regformats/i386/i386.dat: Likewise.
3948 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3949 * regformats/i386/x32-avx-linux.dat: Likewise.
3950 * regformats/i386/x32-linux.dat: Likewise.
3951 * regformats/tic6x-c62x-linux.dat: Likewise.
3952 * regformats/tic6x-c64x-linux.dat: Likewise.
3953 * regformats/tic6x-c64xp-linux.dat: Likewise.
3954 * regformats/regdat.sh: Parse feature marker.
3956 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3958 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3959 (tdesc_osabi_name): Likewise.
3960 * target-descriptions.c (tdesc_architecture_name): Add new
3962 (tdesc_osabi_name): Likewise.
3964 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3966 * common/tdesc.c (tdesc_predefined_type): Move to here.
3967 (tdesc_named_type): Likewise.
3968 (tdesc_create_vector): Likewise.
3969 (tdesc_create_struct): Likewise.
3970 (tdesc_set_struct_size): Likewise.
3971 (tdesc_create_union): Likewise.
3972 (tdesc_create_flags): Likewise.
3973 (tdesc_create_enum): Likewise.
3974 (tdesc_add_field): Likewise.
3975 (tdesc_add_typed_bitfield): Likewise.
3976 (tdesc_add_bitfield): Likewise.
3977 (tdesc_add_flag): Likewise.
3978 (tdesc_add_enum_value): Likewise.
3979 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3980 (struct tdesc_type_vector): Likewise.
3981 (struct tdesc_type_field): Likewise.
3982 (struct tdesc_type_with_fields): Likewise.
3983 (tdesc_create_enum): Add declaration.
3984 (tdesc_add_typed_bitfield): Likewise.
3985 (tdesc_add_enum_value): Likewise.
3986 * target-descriptions.c (tdesc_type_field): Move from here.
3987 (tdesc_type_builtin): Likewise.
3988 (tdesc_type_vector): Likewise.
3989 (tdesc_type_with_fields): Likewise.
3990 (tdesc_predefined_types): Likewise.
3991 (tdesc_named_type): Likewise.
3992 (tdesc_create_vector): Likewise.
3993 (tdesc_create_struct): Likewise.
3994 (tdesc_set_struct_size): Likewise.
3995 (tdesc_create_union): Likewise.
3996 (tdesc_create_flags): Likewise.
3997 (tdesc_create_enum): Likewise.
3998 (tdesc_add_field): Likewise.
3999 (tdesc_add_typed_bitfield): Likewise.
4000 (tdesc_add_bitfield): Likewise.
4001 (tdesc_add_flag): Likewise.
4002 (tdesc_add_enum_value): Likewise.
4003 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4004 (tdesc_add_typed_bitfield): Likewise.
4005 (tdesc_add_enum_value): Likewise.
4007 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4009 * common/tdesc.c (tdesc_feature::accept): Move to here.
4010 (tdesc_feature::operator==): Likewise.
4011 (tdesc_create_reg): Likewise.
4012 * common/tdesc.h (tdesc_type_kind): Likewise.
4013 (struct tdesc_type): Likewise.
4014 (struct tdesc_feature): Likewise.
4015 * regformats/regdat.sh: Create a feature.
4016 * target-descriptions.c (tdesc_type_kind): Move from here.
4017 (tdesc_type): Likewise.
4018 (tdesc_type_up): Likewise.
4019 (tdesc_feature): Likewise.
4020 (tdesc_create_reg): Likewise.
4022 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4024 * Makefile.in: Add arch/tdesc.c
4025 * common/tdesc.c: New file.
4026 * common/tdesc.h (tdesc_element_visitor): Move to here.
4027 (tdesc_element): Likewise.
4028 (tdesc_reg): Likewise.
4029 (tdesc_reg_up): Likewise.
4030 * regformats/regdef.h (reg): Add offset to constructors.
4031 * target-descriptions.c (tdesc_element_visitor): Move from here.
4032 (tdesc_element): Likewise.
4033 (tdesc_reg): Likewise.
4034 (tdesc_reg_up): Likewise.
4036 2018-04-17 Tom Tromey <tom@tromey.com>
4038 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4041 2018-04-17 Tom Tromey <tom@tromey.com>
4043 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4045 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
4047 * symtab.c (print_symbol_info): Skip printing filename and line
4048 number when `last' is NULL.
4049 (symtab_symbol_info): Use empty string instead of NULL for first
4050 invocation of print_symbol_info.
4051 (rbreak_command): Pass NULL to `last' parameter of
4054 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
4056 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4059 2018-04-16 Pedro Alves <palves@redhat.com>
4061 * MAINTAINERS (sh): Remove.
4062 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4063 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4064 (ALLDEPFILES): Remove sh64-tdep.c.
4065 * NEWS: Mentions that support for SH-5/SH64 is removed.
4066 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4067 (sh*-*-openbsd*): Ditto.
4068 (sh64-*-elf*): Remove.
4070 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4071 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4072 * sh-tdep.c: No longer include "sh64-tdep.h".
4073 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4074 * sh64-tdep.c, sh64-tdep.h: Remove files.
4076 2018-04-16 Pedro Alves <palves@redhat.com>
4078 * MAINTAINERS: Remove m88k.
4079 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4080 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4081 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4082 * NEWS: Mention that support for m88k was removed.
4083 * configure.host (m88*-*-*): Remove support.
4084 * configure.nat (m88k-*-*): Remove support.
4085 * configure.tgt (m88*-*-openbsd*): Remove.
4086 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
4088 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
4090 * configure.tgt (x86_tobjs): New variable.
4091 (amd64_tobjs, i386_tobjs): Use it.
4093 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4095 * symtab.c (print_symbol_info): Precede the symbol definition by
4096 the line number when available.
4097 * NEWS: Advertise this enhancement.
4099 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4101 * NEWS (New options): announce set/show record btrace cpu.
4102 * btrace.c: Include record-btrace.h.
4103 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4104 the vendor is unknown.
4105 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
4106 Maybe overwrite the btrace configuration's cpu.
4107 (btrace_compute_ftrace): Add cpu parameter. Update callers.
4108 (btrace_fetch): Add cpu parameter. Update callers.
4109 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4110 Maybe overwrite the btrace configuration's cpu. Skip enabling
4111 errata workarounds if the vendor is unknown.
4112 * python/py-record-btrace.c: Include record-btrace.h.
4113 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4114 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4115 * record-btrace.c (record_btrace_cpu_state_kind): New.
4116 (record_btrace_cpu): New.
4117 (set_record_btrace_cpu_cmdlist): New.
4118 (record_btrace_get_cpu): New.
4119 (require_btrace_thread, record_btrace_info)
4120 (record_btrace_resume_thread): Call record_btrace_get_cpu.
4121 (cmd_set_record_btrace_cpu_none): New.
4122 (cmd_set_record_btrace_cpu_auto): New.
4123 (cmd_set_record_btrace_cpu): New.
4124 (cmd_show_record_btrace_cpu): New.
4125 (_initialize_record_btrace): Initialize set/show record btrace cpu
4127 * record-btrace.h (record_btrace_get_cpu): New.
4129 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4131 * record.c (set_record_command): Fix typo in message.
4133 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4135 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4137 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4139 * infrun.c (process_event_stop_test): Call
4140 gdbarch_in_indirect_branch_thunk.
4141 * gdbarch.sh (in_indirect_branch_thunk): New.
4142 * gdbarch.c: Regenerated.
4143 * gdbarch.h: Regenerated.
4146 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
4147 (HFILES_NO_SRCDIR): Add x86-tdep.h.
4148 (ALLDEPFILES): Add x86-tdep.c.
4149 * arch-utils.h (default_in_indirect_branch_thunk): New.
4150 * arch-utils.c (default_in_indirect_branch_thunk): New.
4151 * i386-tdep: Include x86-tdep.h.
4152 (i386_in_indirect_branch_thunk): New.
4153 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
4155 * amd64-tdep: Include x86-tdep.h.
4156 (amd64_in_indirect_branch_thunk): New.
4157 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
4159 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4162 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
4163 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
4164 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4167 2018-04-12 Tom Tromey <tom@tromey.com>
4169 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4170 (rust_evaluate_subexp): Likewise.
4172 2018-04-12 Pedro Alves <palves@redhat.com>
4174 * procfs.c (procfs_detach): Make forward declaration's prototype
4175 match definition's protototype.
4176 (proc_get_LDT_entry): Remove stale do_cleanups call.
4178 2018-04-12 Pedro Alves <palves@redhat.com>
4180 * target.h (target_ops::to_has_exited): Delete.
4181 (target_has_exited): Delete.
4182 * target-delegates.c: Regenerate.
4184 2018-04-11 Pedro Alves <palves@redhat.com>
4186 * target.c (fileio_fh_t::t): Add comment.
4187 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4188 (target_fileio_close): Handle a NULL target.
4189 (invalidate_fileio_fh): New.
4190 (target_close): Call it.
4191 * remote.c (remote_hostio_send_command): No longer check whether
4192 remote_desc is open.
4194 2018-04-11 Pedro Alves <palves@redhat.com>
4196 * target.c (fileio_fh_t): Make it a named struct instead of a
4198 (fileio_fh_t::is_closed): New method.
4199 (DEF_VEC_O (fileio_fh_t)): Remove.
4200 (fileio_fhandles): Now a std::vector.
4201 (is_closed_fileio_fh): Delete.
4202 (acquire_fileio_fd): Adjust. Rename parameters.
4203 (release_fileio_fd): Adjust.
4204 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4205 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4206 (target_fileio_close): Adjust.
4208 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4210 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4213 2018-04-10 Pedro Alves <palves@redhat.com>
4215 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4216 (scoped_finish_thread_state): New class.
4217 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4219 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4220 (fetch_inferior_event, normal_stop): Likewise.
4221 * thread.c (finish_thread_state_cleanup): Delete.
4223 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4224 Pedro Alves <palves@redhat.com>
4226 * value.c: Include "selftest.h" and "common/array-view.h".
4227 (struct range) <operator ==>: New.
4228 (test_ranges_contain): New.
4229 (check_ranges_vector): New.
4230 (test_insert_into_bit_range_vector): New.
4231 (_initialize_values): Register selftests.
4232 * common/array-view.h (operator==, operator!=): New.
4234 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4236 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4238 * inline-frame.c: Include <algorithm>.
4239 (struct inline_state): Add constructor.
4240 (inline_state_s): Remove.
4241 (DEF_VEC_O(inline_state_s)): Remove.
4242 (inline_states): Change type to std::vector.
4243 (find_inline_frame_state): Adjust to std::vector.
4244 (allocate_inline_frame_state): Remove.
4245 (clear_inline_frame_state): Adjust to std::vector.
4246 (skip_inline_frames): Adjust to std::vector.
4248 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4250 * tracepoint.h (struct trace_state_variable): Add constructor.
4251 <name>: Change type to std::string.
4252 * tracepoint.c (tsv_s): Remove.
4253 (DEF_VEC_O(tsv_s)): Remove.
4254 (tvariables): Change to std::vector.
4255 (create_trace_state_variable): Adjust to std::vector.
4256 (find_trace_state_variable): Likewise.
4257 (find_trace_state_variable_by_number): Likewise.
4258 (delete_trace_state_variable): Likewise.
4259 (trace_variable_command): Adjust to std::string.
4260 (delete_trace_variable_command): Likewise.
4261 (tvariables_info_1): Adjust to std::vector.
4262 (save_trace_state_variables): Likewise.
4263 (start_tracing): Likewise.
4264 (merge_uploaded_trace_state_variables): Adjust to std::vector
4266 * target.h (struct target_ops)
4267 <to_download_trace_state_variable>: Pass reference to
4268 trace_state_variable.
4269 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4270 * target-delegates.c: Re-generate.
4271 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4272 (mi_tsv_deleted): Likewise.
4273 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4274 * remote.c (remote_download_trace_state_variable): Change
4275 pointer to reference and adjust.
4276 * make-target-delegates (parse_argtypes): Handle references.
4277 (write_function_header): Likewise.
4278 (munge_type): Likewise.
4280 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4282 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4283 string_view-selftests.c.
4284 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4286 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4287 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4288 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4289 * unittests/basic_string_view/element_access/char/1.cc:
4291 * unittests/basic_string_view/element_access/char/empty.cc:
4293 * unittests/basic_string_view/element_access/char/front_back.cc:
4295 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4296 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4298 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4300 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4302 * unittests/basic_string_view/operations/compare/char/1.cc:
4304 * unittests/basic_string_view/operations/compare/char/13650.cc:
4306 * unittests/basic_string_view/operations/copy/char/1.cc:
4308 * unittests/basic_string_view/operations/data/char/1.cc:
4310 * unittests/basic_string_view/operations/find/char/1.cc:
4312 * unittests/basic_string_view/operations/find/char/2.cc:
4314 * unittests/basic_string_view/operations/find/char/3.cc:
4316 * unittests/basic_string_view/operations/find/char/4.cc:
4318 * unittests/basic_string_view/operations/rfind/char/1.cc:
4320 * unittests/basic_string_view/operations/rfind/char/2.cc:
4322 * unittests/basic_string_view/operations/rfind/char/3.cc:
4324 * unittests/basic_string_view/operations/substr/char/1.cc:
4326 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4327 * unittests/string_view-selftests.c: New file.
4329 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4331 * unittests/basic_string_view/capacity/1.cc: New file.
4332 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4333 * unittests/basic_string_view/cons/char/1.cc: New file.
4334 * unittests/basic_string_view/cons/char/2.cc: New file.
4335 * unittests/basic_string_view/cons/char/3.cc: New file.
4336 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4337 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4338 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4339 * unittests/basic_string_view/element_access/char/1.cc: New file.
4340 * unittests/basic_string_view/element_access/char/2.cc: New file.
4341 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4342 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4343 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4344 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4345 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4346 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4347 * unittests/basic_string_view/include.cc: New file.
4348 * unittests/basic_string_view/inserters/char/1.cc: New file.
4349 * unittests/basic_string_view/inserters/char/2.cc: New file.
4350 * unittests/basic_string_view/inserters/char/3.cc: New file.
4351 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4352 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4353 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4354 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4355 * unittests/basic_string_view/literals/types.cc: New file.
4356 * unittests/basic_string_view/literals/values.cc: New file.
4357 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4358 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4359 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4360 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4361 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4362 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4363 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4364 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4365 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4366 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4367 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4368 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4369 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4370 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4371 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4372 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4373 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4374 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4375 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4376 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4377 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4378 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4379 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4380 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4381 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4382 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4383 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4384 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4385 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4386 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4387 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4388 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4389 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4390 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4391 * unittests/basic_string_view/operators/char/2.cc: New file.
4392 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4393 * unittests/basic_string_view/range_access/char/1.cc: New file.
4394 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4395 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4396 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4397 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4398 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4399 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4400 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4401 * unittests/basic_string_view/typedefs.cc: New file.
4402 * unittests/basic_string_view/types/1.cc: New file.
4404 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4406 * common/gdb_string_view.h: Remove libstdc++ implementation
4407 details, adjust to gdb reality.
4408 * common/gdb_string_view.tcc: Likewise.
4409 * cli/cli-script.c (struct string_view): Remove.
4410 (user_args) <m_args>: Change element type to gdb::string_view.
4411 (user_args::insert_args): Adjust.
4413 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4415 * common/gdb_string_view.h: New file.
4416 * common/gdb_string_view.tcc: New file.
4418 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4420 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4421 * configure: Re-generate.
4423 2018-04-09 Pedro Alves <palves@redhat.com>
4425 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4426 (set_target_gdbarch): Call
4427 gdb::observers::architecture_changed.notify instead of
4428 observer_notify_architecture_changed.
4430 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4432 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4433 (do_restore_current_traceframe_cleanup): Remove.
4434 (restore_current_traceframe_cleanup_dtor): Remove.
4435 (make_cleanup_restore_current_traceframe): Remove.
4436 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4438 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4439 * infrun.c (fetch_inferior_event): Use
4440 scoped_restore_current_traceframe.
4442 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4444 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4446 <n_allocated_type_units>: Remove.
4447 <all_type_units>: Change to std::vector.
4448 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4449 to std::vector change.
4450 (dwarf2_per_objfile::get_cutu): Likewise.
4451 (dwarf2_per_objfile::get_tu): Likewise.
4452 (create_signatured_type_table_from_index): Likewise.
4453 (create_signatured_type_table_from_debug_names): Likewise.
4454 (dw2_symtab_iter_next): Likewise.
4455 (dw2_print_stats): Likewise.
4456 (dw2_expand_all_symtabs): Likewise.
4457 (dw2_expand_marked_cus): Likewise.
4458 (dw2_debug_names_iterator::next): Likewise.
4459 (dwarf2_initialize_objfile): Likewise.
4460 (add_signatured_type_cu_to_table): Likewise.
4461 (create_all_type_units): Likewise.
4462 (add_type_unit): Likewise.
4463 (struct tu_abbrev_offset): Add constructor.
4464 (build_type_psymtabs_1): Adjust to std::vector change.
4465 (print_tu_stats): Likewise.
4466 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4467 (write_debug_names): Likewise.
4469 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4471 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4472 Make an std::vector.
4473 <n_comp_units>: Remove.
4474 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4475 to std::vector change.
4476 (dwarf2_per_objfile::get_cutu): Likewise.
4477 (dwarf2_per_objfile::get_cu): Likewise.
4478 (create_cus_from_index): Likewise.
4479 (create_addrmap_from_index): Likewise.
4480 (create_addrmap_from_aranges): Likewise.
4481 (dwarf2_read_index): Likewise.
4482 (dw2_find_last_source_symtab): Likewise.
4483 (dw2_map_symtabs_matching_filename): Likewise.
4484 (dw2_symtab_iter_next): Likewise.
4485 (dw2_print_stats): Likewise.
4486 (dw2_expand_all_symtabs): Likewise.
4487 (dw2_expand_symtabs_with_fullname): Likewise.
4488 (dw2_expand_marked_cus): Likewise.
4489 (dw2_map_symbol_filenames): Likewise.
4490 (create_cus_from_debug_names): Likewise.
4491 (dwarf2_read_debug_names): Likewise.
4492 (dw2_debug_names_iterator::next): Likewise.
4493 (dwarf2_initialize_objfile): Likewise.
4494 (set_partial_user): Likewise.
4495 (dwarf2_build_psymtabs_hard): Likewise.
4496 (read_comp_units_from_section): Remove arguments, adjust to
4498 (create_all_comp_units): Adjust to std::vector and
4499 read_comp_units_from_section changes.
4500 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4502 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4503 (psyms_seen_size): Likewise.
4504 (write_gdbindex): Likewise.
4505 (write_debug_names): Likewise.
4507 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4509 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4510 with dwarf2_per_objfile.
4511 (create_cus_from_index): Likewise.
4512 (create_signatured_type_table_from_index): Likewise.
4513 (dwarf2_read_index): Likewise.
4514 (dwarf2_initialize_objfile): Likewise.
4515 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4516 per_cu rather than get_dwarf2_per_objfile.
4518 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4520 * dwarf2read.h (struct signatured_type): Forward declare.
4521 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4523 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4524 (dw2_get_cutu): ...this.
4525 (dwarf2_per_objfile::get_cu): Rename from...
4526 (dw2_get_cu): ...this.
4527 (dwarf2_per_objfile::get_tu): New.
4528 (create_addrmap_from_index): Adjust.
4529 (create_addrmap_from_aranges): Adjust.
4530 (dw2_find_last_source_symtab): Adjust.
4531 (dw2_map_symtabs_matching_filename): Adjust.
4532 (dw2_symtab_iter_next): Adjust.
4533 (dw2_print_stats): Adjust.
4534 (dw2_expand_all_symtabs): Adjust.
4535 (dw2_expand_symtabs_with_fullname): Adjust.
4536 (dw2_expand_marked_cus): Adjust.
4537 (dw_expand_symtabs_matching_file_matcher): Adjust.
4538 (dw2_map_symbol_filenames): Adjust.
4539 (dw2_debug_names_iterator::next): Adjust.
4540 (dwarf2_initialize_objfile): Adjust.
4541 (set_partial_user): Adjust.
4542 (dwarf2_build_psymtabs_hard): Adjust.
4544 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4546 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4547 Remove unused variables.
4548 (dw2_map_symtabs_matching_filename): Likewise.
4549 (dwarf2_record_block_ranges): Likewise.
4550 (dwarf2_read_addr_index): Likewise.
4551 (follow_die_offset): Likewise.
4553 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4555 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4556 to symbol_file_add_main.
4558 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4561 * mi/mi-console.c (do_fputc_async_safe): New.
4562 (mi_console_file::write_async_safe): New.
4563 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4564 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4566 * ui-file.c (ui_file::putstrn): Adjust call to
4567 fputstrn_unfiltered.
4568 * utils.c (printchar): Replace do_fputs and do_fprintf
4569 parameters by do_fputc.
4570 (fputstr_filtered): Adjust call to printchar.
4571 (fputstr_unfiltered): Likewise.
4572 (fputstrn_filtered): Likewise.
4573 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4575 * utils.h (do_fputc_ftype): New typedef.
4576 (fputstrn_unfiltered): Add do_fputc parameter.
4578 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4580 * regformats/i386/i386-avx.dat: Remove.
4582 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4585 * amd64-tdep.c (amd64_none_init_abi): New function.
4586 (amd64_x32_none_init_abi): New function.
4587 (_initialize_amd64_tdep): Register handlers for x86-64 and
4588 x64_32 with GDB_OSABI_NONE.
4589 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4590 GDB_OSABI_NONE osabi.
4592 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4595 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4597 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4598 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4600 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4602 * common/byte-vector.h (char_vector): New type.
4603 * target.h (target_read_alloc): Return
4604 gdb::optional<byte_vector>.
4605 (target_read_stralloc): Return gdb::optional<char_vector>.
4606 (target_get_osdata): Return gdb::optional<char_vector>.
4607 * target.c (target_read_alloc_1): Templatize. Replacement
4608 manual memory management with vector.
4609 (target_read_alloc): Change return type, adjust.
4610 (target_read_stralloc): Change return type, adjust.
4611 (target_get_osdata): Change return type, adjust.
4612 * auxv.c (struct auxv_info) <length>: Remove.
4613 <data>: Change type to gdb::optional<byte_vector>.
4614 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4615 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4616 (target_auxv_search): Adjust.
4617 (fprint_target_auxv): Adjust.
4618 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4619 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4620 (linux_make_corefile_notes): Adjust.
4621 * osdata.c (get_osdata): Adjust.
4622 * remote.c (remote_get_threads_with_qxfer): Adjust.
4623 (remote_memory_map): Adjust.
4624 (remote_traceframe_info): Adjust.
4625 (btrace_read_config): Adjust.
4626 (remote_read_btrace): Adjust.
4627 (remote_pid_to_exec_file): Adjust.
4628 * solib-aix.c (solib_aix_get_library_list): Adjust.
4629 * solib-dsbt.c (decode_loadmap): Don't free buf.
4630 (dsbt_get_initial_loadmaps): Adjust.
4631 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4632 * solib-target.c (solib_target_current_sos): Adjust.
4633 * tracepoint.c (sdata_make_value): Adjust.
4634 * xml-support.c (xinclude_start_include): Adjust.
4635 (xml_fetch_content_from_file): Adjust.
4636 * xml-support.h (xml_fetch_another): Change return type.
4637 (xml_fetch_content_from_file): Change return type.
4638 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4639 * xml-tdesc.c (file_read_description_xml): Adjust.
4640 (fetch_available_features_from_target): Change return type.
4641 (target_fetch_description_xml): Adjust.
4642 (target_read_description_xml): Adjust.
4644 2018-04-06 Tom Tromey <tom@tromey.com>
4646 * value.c (~value): Update.
4647 (struct value) <contents>: Now unique_xmalloc_ptr.
4648 (value_contents_bits_eq, allocate_value_contents)
4649 (value_contents_raw, value_contents_all_raw)
4650 (value_contents_for_printing, value_contents_for_printing_const)
4651 (set_value_enclosing_type): Update.
4653 2018-04-06 Tom Tromey <tom@tromey.com>
4655 * value.c (range_s): Remove typedef, VEC.
4656 (struct range): Add operator<.
4657 (range_lessthan): Remove.
4658 (ranges_contain): Change type.
4660 (struct value) <unavailable, optimized_out>: Now std::vector.
4661 (value_entirely_available)
4662 (value_entirely_covered_by_range_vector)
4663 (value_entirely_unavailable, value_entirely_optimized_out):
4665 (insert_into_bit_range_vector): Change argument type.
4666 (find_first_range_overlap): Likewise.
4667 (struct ranges_and_idx, value_contents_bits_eq)
4668 (require_not_optimized_out, require_available): Update.
4669 (ranges_copy_adjusted): Change argument types.
4670 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4672 2018-04-06 Tom Tromey <tom@tromey.com>
4674 * value.c (~value): Update.
4675 (struct value) <parent>: Now a value_ref_ptr.
4676 (value_parent, set_value_parent, value_address, value_copy):
4679 2018-04-06 Tom Tromey <tom@tromey.com>
4681 * value.c (struct value): Add constructor, destructor, and member
4683 (allocate_value_lazy, value_decref): Update.
4685 2018-04-06 Tom Tromey <tom@tromey.com>
4687 * value.c (struct value) <released, next>: Remove.
4688 (all_values): Now a std::vector.
4689 (allocate_value_lazy): Update.
4690 (value_next): Remove.
4691 (value_mark, value_free_to_mark, release_value)
4692 (value_release_to_mark): Update.
4694 2018-04-06 Tom Tromey <tom@tromey.com>
4696 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4697 (free_value_chain): Remove.
4698 * value.c (free_value_chain): Remove.
4699 (value_release_to_mark): Return a std::vector.
4700 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4702 (check_condition): Update.
4703 * eval.c (fetch_subexp_value): Change "val_chain" to a
4705 * breakpoint.c (update_watchpoint): Update.
4706 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4708 2018-04-06 Tom Tromey <tom@tromey.com>
4710 * value.h (free_all_values): Remove.
4711 * value.c (free_all_values): Remove.
4713 2018-04-06 Tom Tromey <tom@tromey.com>
4715 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4716 (value_history_chain, value_history_count): Remove.
4717 (value_history): New global.
4718 (record_latest_value, access_value_history, show_values)
4719 (preserve_values): Update.
4721 2018-04-06 Tom Tromey <tom@tromey.com>
4723 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4724 * varobj.c (varobj_set_display_format, varobj_set_value)
4725 (install_default_visualizer, construct_visualizer)
4726 (install_new_value, ~varobj, varobj_get_value_type)
4727 (my_value_of_variable, varobj_editable_p): Update.
4728 * c-varobj.c (c_describe_child, c_value_of_variable)
4729 (cplus_number_of_children, cplus_describe_child): Update.
4730 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4731 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4732 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4734 2018-04-06 Tom Tromey <tom@tromey.com>
4736 * printcmd.c (last_examine_address): Change type to
4738 (do_examine, x_command): Update.
4740 2018-04-06 Tom Tromey <tom@tromey.com>
4742 * value.c (release_value): Update.
4743 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4744 (struct bpstats) <val>: Now a value_ref_ptr.
4745 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4746 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4747 (~watchpoint, print_it_watchpoint, watch_command_1)
4748 (invalidate_bp_value_on_memory_change): Update.
4750 2018-04-06 Tom Tromey <tom@tromey.com>
4752 * varobj.c (varobj_clear_saved_item)
4753 (update_dynamic_varobj_children, install_new_value, ~varobj):
4755 * value.h (value_incref): Move declaration earlier.
4756 (value_decref): Rename from value_free.
4757 (struct value_ref_policy): New.
4758 (value_ref_ptr): New typedef.
4759 (struct value_deleter): Remove.
4760 (gdb_value_up): Remove typedef.
4761 (release_value): Change return type.
4762 (release_value_or_incref): Remove.
4763 * value.c (set_value_parent): Update.
4764 (value_incref): Change return type.
4765 (value_decref): Rename from value_free.
4766 (value_free_to_mark, free_all_values, free_value_chain): Update.
4767 (release_value): Return value_ref_ptr.
4768 (release_value_or_incref): Remove.
4769 (record_latest_value, set_internalvar, clear_internalvar):
4771 * stack.c (info_frame_command): Don't call value_free.
4772 * python/py-value.c (valpy_dealloc, valpy_new)
4773 (value_to_value_object): Update.
4774 * printcmd.c (do_examine): Update.
4775 * opencl-lang.c (lval_func_free_closure): Update.
4776 * mi/mi-main.c (register_changed_p): Don't call value_free.
4777 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4778 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4779 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4781 * guile/scm-value.c (vlscm_free_value_smob)
4782 (vlscm_scm_from_value): Update.
4783 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4784 (frame_unwind_register_unsigned, get_frame_register_bytes)
4785 (put_frame_register_bytes): Don't call value_free.
4786 * findvar.c (address_from_register): Don't call value_free.
4787 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4788 * dwarf2loc.c (entry_data_value_free_closure)
4789 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4790 (dwarf2_evaluate_loc_desc_full): Update.
4791 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4792 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4793 (~watchpoint, watch_command_1)
4794 (invalidate_bp_value_on_memory_change): Update.
4795 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4797 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4800 * warning.m4: Add -Wno-error=deprecated-register.
4801 * configure: Re-generate.
4803 2018-04-05 Tom Tromey <tom@tromey.com>
4805 * linespec.h: Remove include of "vec.h".
4807 2018-04-05 Tom Tromey <tom@tromey.com>
4809 * linespec.c (typep): Remove typedef.
4810 (find_methods, find_superclass_methods): Take a std::vector.
4811 (find_method): Use std::vector.
4813 2018-04-05 Tom Tromey <tom@tromey.com>
4815 * utils.c (compare_strings): Remove.
4816 * utils.h (compare_strings): Remove.
4817 * objc-lang.h (find_imps): Update.
4818 * objc-lang.c (find_methods): Take a std::vector.
4819 (uniquify_strings, find_imps): Likewise.
4820 * linespec.c (find_methods): Take a std::vector.
4821 (decode_objc): Use std::vector.
4822 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4824 (find_method, find_function_symbols): Use std::vector.
4826 2018-04-05 Tom Tromey <tom@tromey.com>
4828 * completer.c (completion_tracker::completion_tracker): Remove
4830 (completion_tracker::discard_completions): Likewise.
4831 * breakpoint.c (ambiguous_names_p): Remove cast.
4832 * ada-lang.c (_initialize_ada_language): Remove cast.
4833 * utils.h (streq): Update.
4834 (streq_hash): Add new declaration.
4835 * utils.c (streq): Return bool.
4836 (streq_hash): New function.
4838 2018-04-05 Tom Tromey <tom@tromey.com>
4840 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4841 Remove a string copy.
4843 2018-04-05 Tom Tromey <tom@tromey.com>
4845 * linespec.c (filter_results): Use std::vector.
4846 (decode_line_2, decode_line_full): Update.
4848 2018-04-05 Tom Tromey <tom@tromey.com>
4850 * linespec.c (canonical_to_fullform): Return std::string.
4851 (filter_results): Update.
4852 (struct decode_line_2_item): Add constructor.
4853 <fullform, displayform>: Now std::string.
4854 (decode_line_2_compare_items): Now a std::sort comparator.
4855 (decode_line_2): Update.
4857 2018-04-05 Tom Tromey <tom@tromey.com>
4859 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4860 (unexpected_linespec_error): Update.
4861 (linespec_parse_basic, parse_linespec): Update.
4863 2018-04-05 Tom Tromey <tom@tromey.com>
4865 * linespec.c (linespec_parse_basic): Reindent.
4867 2018-04-05 Tom Tromey <tom@tromey.com>
4869 * minsyms.h (iterate_over_minimal_symbols): Update.
4870 * minsyms.c (iterate_over_minimal_symbols): Take a
4872 * linespec.c (struct collect_minsyms): Remove.
4873 (compare_msyms): Now a std::sort comparator.
4874 (add_minsym): Add parameters.
4875 (search_minsyms_for_name): Update. Use std::vector.
4877 2018-04-03 Tom Tromey <tom@tromey.com>
4879 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4882 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4884 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4886 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4889 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
4890 printing static type.
4892 2018-04-01 Tom Tromey <tom@tromey.com>
4894 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4895 (rs6000_xfer_shared_libraries): Update.
4897 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
4899 * common/gdb_vecs.h (char_ptr): Remove.
4900 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4902 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4904 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4906 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4908 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4910 * tracepoint.h (struct uploaded_tp): Initialize fields.
4911 <actions, step_actions, cmd_strings>: Change type to
4912 std::vector<char *>.
4913 * tracepoint.c (get_uploaded_tp): Allocate with new.
4914 (free_uploaded_tps): Free with delete.
4915 (parse_tracepoint_definition): Adjust to std::vector change.
4916 * breakpoint.c (read_uploaded_action): Likewise.
4917 (create_tracepoint_from_upload): Likewise.
4918 * ctf.c (ctf_write_uploaded_tp): Likewise.
4919 (SET_ARRAY_FIELD): Likewise.
4920 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4922 2018-03-30 Tom Tromey <tom@tromey.com>
4924 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
4926 (svr4_keep_data_in_core): Update.
4927 (svr4_read_so_list): Update.
4929 2018-03-30 Tom Tromey <tom@tromey.com>
4931 * windows-nat.c (handle_output_debug_string, handle_exception):
4933 * target.h (target_read_string): Update.
4934 * target.c (target_read_string): Change "string" to
4936 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4938 * solib-frv.c (frv_current_sos): Update.
4939 * solib-dsbt.c (dsbt_current_sos): Update.
4940 * solib-darwin.c (darwin_current_sos): Update.
4941 * linux-thread-db.c (inferior_has_bug): Update.
4942 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4943 Update. Remove alloca.
4944 * ada-lang.c (ada_main_name): Update.
4946 2018-03-30 Tom Tromey <tom@tromey.com>
4948 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4949 (struct dwo_file_deleter): New.
4950 (dwo_file_up): New typedef.
4951 (open_and_init_dwo_file): Use dwo_file_up.
4952 (free_dwo_file_cleanup): Remove.
4954 2018-03-30 Tom Tromey <tom@tromey.com>
4956 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4957 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4959 2018-03-30 Tom Tromey <tom@tromey.com>
4961 * dwarf2read.c (class free_cached_comp_units): New class.
4962 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4963 (free_cached_comp_units): Remove function.
4965 2018-03-30 Tom Tromey <tom@tromey.com>
4967 * utils.h (make_cleanup_unpush_target): Remove.
4968 * inf-ptrace.c (struct target_unpusher): New.
4969 (target_unpush_up) New typedef.
4970 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4972 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4974 2018-03-27 Tom Tromey <tom@tromey.com>
4976 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4978 2018-03-27 Pedro Alves <palves@redhat.com>
4979 Tom Tromey <tom@tromey.com>
4981 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4982 destructor. Now a class.
4983 (gdb_readline_wrapper_cleanup): Remove function.
4984 (gdb_readline_wrapper): Remove cleanups.
4986 2018-03-27 Tom Tromey <tom@tromey.com>
4988 * typeprint.h (struct type_print_options) <local_typedefs,
4989 global_typedefs>: Remove "struct" keyword.
4990 (class typedef_hash_table): New class.
4991 (recursively_update_typedef_hash, add_template_parameters)
4992 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4993 (find_typedef_in_hash): Don't declare.
4994 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4995 (typedef_hash_table::recursively_update): Rename from
4996 recursively_update_typedef_hash. Now a member.
4997 (typedef_hash_table::add_template_parameters): Rename from
4998 add_template_parameters. Now a member.
4999 (typedef_hash_table::typedef_hash_table): Now a constructor;
5000 rename from create_typedef_hash.
5001 (typedef_hash_table::~typedef_hash_table): Now a destructor;
5002 rename from free_typedef_hash.
5003 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5004 (do_free_global_table): Remove.
5005 (typedef_hash_table::typedef_hash_table): New constructor; renamed
5006 from copy_type_recursive.
5007 (create_global_typedef_table): Remove.
5008 (typedef_hash_table::find_global_typedef): Now a member of
5010 (typedef_hash_table::find_typedef): Rename from
5011 find_typedef_in_hash; now a member.
5012 (whatis_exp): Update.
5013 * extension.h (struct ext_lang_type_printers): Add constructor and
5015 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5017 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5018 Now a constructor; rename from start_ext_lang_type_printers.
5019 (ext_lang_type_printers): Now a destructor; rename from
5020 free_ext_lang_type_printers.
5021 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5023 (c_type_print_base_struct_union): Update. Remove cleanups.
5025 2018-03-27 Tom Tromey <tom@tromey.com>
5027 * dwarf-index-write.c: Include <cmath>.
5029 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5031 * NEWS: Add entry describing new "set|show varsize-limit" command.
5032 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5034 * printcmd.c (_initialize_printcmd): Add "set var" alias of
5037 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
5039 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5041 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5042 * dwarf-index-common.c: New file.
5043 * dwarf-index-common.h: New file.
5044 * dwarf-index-write.c: New file.
5045 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5046 (struct dwarf2_section_info): Move from here.
5047 (dwarf2_section_info_def): Likewise.
5048 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5049 (offset_type): Likewise.
5050 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5051 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5052 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5053 (byte_swap): Likewise.
5054 (MAYBE_SWAP): Likewise.
5055 (dwarf2_per_cu_ptr): Likewise.
5056 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5057 (struct tu_stats): Likewise.
5058 (struct dwarf2_per_objfile): Likewise.
5059 (struct dwarf2_per_cu_data): Likewise.
5060 (struct signatured_type): Likewise.
5061 (sig_type_ptr): Likewise.
5062 (DEF_VEC_P (sig_type_ptr)): Likewise.
5063 (INDEX4_SUFFIX): Likewise.
5064 (INDEX5_SUFFIX): Likewise.
5065 (DEBUG_STR_SUFFIX): Likewise.
5066 (dwarf2_read_section): Make non-static.
5067 (mapped_index_string_hash): Move from here.
5068 (dwarf5_djb_hash): Likewise.
5069 (file_write): Likewise.
5070 (class data_buf): Likewise.
5071 (struct symtab_index_entry): Likewise.
5072 (struct mapped_symtab): Likewise.
5073 (find_slot): Likewise.
5074 (hash_expand): Likewise.
5075 (add_index_entry): Likewise.
5076 (uniquify_cu_indices): Likewise.
5077 (class c_str_view): Likewise.
5078 (class c_str_view_hasher): Likewise.
5079 (class vector_hasher): Likewise.
5080 (write_hash_table): Likewise.
5081 (psym_index_map): Likewise.
5082 (struct addrmap_index_data): Likewise.
5083 (add_address_entry): Likewise.
5084 (add_address_entry_worker): Likewise.
5085 (write_address_map): Likewise.
5086 (symbol_kind): Likewise.
5087 (write_psymbols): Likewise.
5088 (struct signatured_type_index_data): Likewise.
5089 (write_one_signatured_type): Likewise.
5090 (recursively_count_psymbols): Likewise.
5091 (recursively_write_psymbols): Likewise.
5092 (class debug_names): Likewise.
5093 (check_dwarf64_offsets): Likewise.
5094 (psyms_seen_size): Likewise.
5095 (write_gdbindex): Likewise.
5096 (write_debug_names): Likewise.
5097 (assert_file_size): Likewise.
5098 (write_psymtabs_to_index): Likewise.
5099 (save_gdb_index_command): Likewise.
5100 (_initialize_dwarf2_read): Don't register the "save gdb-index"
5102 * dwarf2read.h: New file.
5104 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5107 * dwarf2read.c (dwarf2_physname): Do not return the demangled
5108 symbol name if the CU's language stores symbol names in linkage
5110 * language.h (struct language_defn)
5111 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
5112 all instances of this struct.
5114 2018-03-26 Tom Tromey <tom@tromey.com>
5116 * stack.c (backtrace_command_1): Remove verbose code.
5118 2018-03-26 Tom Tromey <tom@tromey.com>
5120 * python/py-framefilter.c (py_print_type): Don't catch
5121 exceptions. Return void.
5122 (py_print_value): Likewise.
5123 (py_print_single_arg): Likewise.
5124 (enumerate_args): Don't catch exceptions.
5125 (py_print_args): Likewise.
5126 (py_print_frame): Likewise.
5127 (gdbpy_apply_frame_filter): Catch exceptions here.
5129 2018-03-26 Tom Tromey <tom@tromey.com>
5131 * stack.c (_initialize_stack): Remove trailing newlines from help
5132 text. Add "Usage" line to "backtrace" help.
5134 2018-03-26 Tom Tromey <tom@tromey.com>
5137 * python/py-framefilter.c (py_print_args): Call wrap_hint.
5139 2018-03-26 Tom Tromey <tom@tromey.com>
5141 * python/py-framefilter.c (py_print_single_arg): Return
5142 EXT_LANG_BT_ERROR from catch.
5144 2018-03-26 Tom Tromey <tom@tromey.com>
5147 * stack.c (backtrace_command_1): Move some code into no-filters
5150 2018-03-26 Tom Tromey <tom@tromey.com>
5152 * python/py-framefilter.c (throw_quit_or_print_exception): New
5154 (gdbpy_apply_frame_filter): Use it.
5156 2018-03-26 Tom Tromey <tom@tromey.com>
5159 * python/py-framefilter.c (py_print_type, py_print_value)
5160 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
5163 2018-03-26 Tom Tromey <tom@tromey.com>
5165 * python/py-framefilter.c (enumerate_args): Use
5166 gdb::unique_xmalloc_ptr.
5168 2018-03-26 Tom Tromey <tom@tromey.com>
5170 * python/py-framefilter.c (py_print_frame): Return
5172 (gdbpy_apply_frame_filter): Update comment.
5173 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5175 <EXT_LANG_BT_NO_FILTERS>: Change value.
5177 2018-03-26 Tom Tromey <tom@tromey.com>
5180 * stack.c (backtrace_command): Parse "hide" argument.
5181 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5182 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5185 2018-03-26 Tom Tromey <tom@tromey.com>
5187 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5189 (backtrace_command): Remove "fulltrace", add "flags".
5191 2018-03-26 Tom Tromey <tom@tromey.com>
5193 * stack.c (backtrace_command): Rewrite command line parsing.
5195 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5197 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5199 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5201 * filename-seen-cache.h: Add include guard.
5203 2018-03-26 Keith Seitz <keiths@redhat.com>
5205 * symfile.c (place_section): Remove "struct" from section_addr_info
5207 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5208 "struct" keyword from section_addr_info.
5210 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5212 * regformats/regdef.h (reg): Add constructors.
5214 2018-03-25 Pedro Alves <palves@redhat.com>
5216 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5217 if then/else bodies in var_func_name extraction.
5219 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5221 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5222 lookup_minimal_symbol() to find symbol entry.
5223 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5225 2018-03-23 Keith Seitz <keiths@redhat.com>
5228 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5229 nested type definitions for C++, too.
5231 2018-03-23 Tom Tromey <tom@tromey.com>
5233 * machoread.c (struct oso_el): Add a constructor. Don't define as
5235 (macho_register_oso): Remove.
5236 (macho_symtab_read): Take a std::vector.
5237 (oso_el_compare_name): Now a std::sort comparator.
5238 (macho_symfile_read_all_oso): Take a std::vector.
5239 (macho_symfile_read): Use std::vector. Remove cleanups.
5241 2018-03-22 Tom Tromey <tom@tromey.com>
5243 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5244 (record_full_goto_bookmark): Use std::string.
5246 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5249 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5252 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5254 * rs6000-tdep.c (store_insn_p): New function.
5255 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5256 and cr_reg to their unshifted values. Use store_insn_p to
5257 match LR saves using either R1 or fdata->alloca_reg. Use
5258 store_insn_p to match CR saves. Set alloca_reg_offset
5259 when alloca_reg and framep are set. Remove lr_reg shift
5260 when assigning to fdata->lr_register.
5262 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5264 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5265 command line args instead of emitting a warning.
5267 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5269 * tracepoint.h (struct static_tracepoint_marker): Initialize
5270 fields, define default constructor, move constructor and move
5271 assignment, disable the rest.
5272 <str_id, extra>: Make std::string.
5273 (release_static_tracepoint_marker): Remove.
5274 (free_current_marker): Remove.
5275 * tracepoint.c (free_current_marker): Remove.
5276 (parse_static_tracepoint_marker_definition): Adjust to
5277 std::string, use new hex2str overload.
5278 (release_static_tracepoint_marker): Remove.
5279 (print_one_static_tracepoint_marker): Get marker by reference
5280 and adjust to std::string.
5281 (info_static_tracepoint_markers_command): Adjust to std::vector
5283 * target.h (static_tracepoint_marker_p): Remove typedef.
5284 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5285 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5287 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5289 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5290 (target_debug_print_std_vector_static_tracepoint_marker): New.
5291 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5293 (target_debug_print_static_tracepoint_marker_p): ... this.
5294 * target-delegates.c: Re-generate.
5295 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5297 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5298 (decode_static_tracepoint_spec): Adjust to std::vector.
5299 (tracepoint_print_one_detail): Adjust to std::string.
5300 (strace_marker_decode_location): Adjust to std::string.
5301 (update_static_tracepoint): Adjust to std::string, remove call
5302 to release_static_tracepoint_marker.
5303 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5304 Adjust to std::vector.
5305 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5306 (remote_static_tracepoint_markers_by_strid): Adjust to
5308 * common/rsp-low.h (hex2str): New overload with explicit count
5310 * common/rsp-low.c (hex2str): New overload with explicit count
5312 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5313 (_initialize_rsp_low_selftests): Add test_hex2str test.
5314 * unittests/tracepoint-selftests.c
5315 (test_parse_static_tracepoint_marker_definition): Adjust to
5318 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5320 * tracepoint.c (parse_static_tracepoint_marker_definition):
5321 Consider case where the definition is followed by more
5323 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5324 tracepoint-selftests.c.
5325 * unittests/tracepoint-selftests.c: New.
5327 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5329 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5332 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5334 * symtab.c (find_pc_sect_line): fixed indentation.
5336 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5338 * symtab.c (find_pc_sect_line): now uses binary search.
5340 2018-03-19 Tom Tromey <tom@tromey.com>
5342 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5345 2018-03-19 Pedro Alves <palves@redhat.com>
5346 Tom Tromey <tom@tromey.com>
5348 * unittests/observable-selftests.c: New file.
5349 * common/observable.h: New file.
5350 * observable.h: New file.
5351 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5352 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5353 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5354 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5355 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5356 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5357 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5358 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5359 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5360 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5361 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5362 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5363 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5364 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5365 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5366 tui/tui-interp.c, valops.c: Update all users.
5367 * tui/tui-hooks.c (tui_bp_created_observer)
5368 (tui_bp_deleted_observer, tui_bp_modified_observer)
5369 (tui_inferior_exit_observer, tui_before_prompt_observer)
5370 (tui_normal_stop_observer, tui_register_changed_observer):
5372 (tui_observers_token): New global.
5373 (attach_or_detach, tui_attach_detach_observers): New functions.
5374 (tui_install_hooks, tui_remove_hooks): Use
5375 tui_attach_detach_observers.
5376 * record-btrace.c (record_btrace_thread_observer): Remove.
5377 (record_btrace_thread_observer_token): New global.
5378 * observer.sh: Remove.
5379 * observer.c: Rename to observable.c.
5380 * observable.c (namespace gdb_observers): Define new objects.
5381 (observer_debug): Move into gdb_observers namespace.
5382 (struct observer, struct observer_list, xalloc_observer_list_node)
5383 (xfree_observer_list_node, generic_observer_attach)
5384 (generic_observer_detach, generic_observer_notify): Remove.
5385 (_initialize_observer): Update.
5386 Don't include observer.inc.
5387 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5388 (clean mostlyclean): Likewise.
5389 (observer.h, observer.inc): Remove targets.
5390 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5391 (COMMON_SFILES): Use observable.c, not observer.c.
5392 * .gitignore: Remove observer.h.
5394 2018-03-18 Tom Tromey <tom@tromey.com>
5396 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5398 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5400 2018-03-17 Tom Tromey <tom@tromey.com>
5402 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5404 2018-03-17 Tom Tromey <tom@tromey.com>
5406 * target.c (class scoped_target_fd): New.
5407 (target_fileio_close_cleanup): Remove.
5408 (target_fileio_read_alloc_1): Use scoped_target_fd.
5410 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5412 * silent-rules.mk: New.
5413 * Makefile.in: Include silent-rules.mk
5414 (srcdir, VPATH, top_srcdir): Move up.
5415 (COMPILE): Add ECHO_CXX.
5416 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5417 (init.c): Add ECHO_INIT_C.
5418 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5419 (version.c): Add ECHO_GEN.
5420 (printcmd.o): Add ECHO_CXX.
5421 (target-float.o): Add ECHO_CXX.
5422 (ada-exp.o): Add ECHO_CXX.
5423 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5424 (insight$(EXEEXT)): Add ECHO_CXXLD.
5425 * gnulib/configure.ac: Add AM_SILENT_RULES.
5426 * gnulib/aclocal.m4: Re-generate.
5427 * gnulib/configure: Re-generate.
5428 * gnulib/import/Makefile.in: Re-generate.
5430 2018-03-16 Tom Tromey <tom@tromey.com>
5432 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5433 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5434 * utils.c (do_free_section_addr_info)
5435 (make_cleanup_free_section_addr_info): Remove.
5436 * symfile.h (struct other_sections): Add constructor.
5437 (struct section_addr_info): Remove.
5438 (section_addr_info): New typedef.
5439 (struct sym_fns) <sym_offsets>: Change type of parameter.
5440 (build_section_addr_info_from_objfile)
5441 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5442 (default_symfile_offsets, symbol_file_add)
5443 (symbol_file_add_from_bfd)
5444 (build_section_addr_info_from_section_table): Update.
5445 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5446 * symfile.c (alloc_section_addr_info): Remove.
5447 (build_section_addr_info_from_section_table): Change return type.
5449 (build_section_addr_info_from_bfd)
5450 (build_section_addr_info_from_objfile): Likewise.
5451 (free_section_addr_info): Remove.
5452 (relative_addr_info_to_section_offsets): Change type of "addrs".
5453 (addrs_section_compar): Now a std::sort comparator.
5454 (addrs_section_sort): Change return type.
5455 (addr_info_make_relative): Change type of "addrs". Update.
5456 (default_symfile_offsets, syms_from_objfile_1)
5457 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5458 (symbol_file_add_separate): Update.
5459 (symbol_file_add): Change type of "addrs". Update.
5460 (add_symbol_file_command): Update. Remove cleanups.
5461 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5463 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5464 * solib.c (solib_read_symbols): Update.
5465 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5466 * machoread.c (macho_symfile_offsets): Update.
5467 * jit.c (jit_bfd_try_read_symtab): Update.
5469 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5471 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5472 unittests/utils-selftests.c.
5473 * unittests/utils-selftests.c: New file.
5475 2018-03-14 Tom Tromey <tom@tromey.com>
5478 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5481 2018-03-14 Tom Tromey <tom@tromey.com>
5484 * printcmd.c (printf_pointer): Allow "-" in format.
5486 2018-03-14 Tom Tromey <tom@tromey.com>
5488 * printcmd.c (_initialize_printcmd): Add usage to printf.
5490 2018-03-14 Yao Qi <qiyao@sourceware.org>
5492 * MAINTAINERS: Update my email address.
5494 2018-03-13 Tom Tromey <tom@tromey.com>
5496 * machoread.c (macho_check_dsym): Change filenamep to a
5498 (macho_symfile_read): Update.
5499 * symfile.c (load_command): Use std::string.
5501 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5503 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5504 to error message string.
5505 (riscv_register_name): Use xsnprintf instead of sprintf.
5506 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5508 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5510 (riscv_push_dummy_call): Likewise.
5512 2018-03-12 Tom Tromey <tom@tromey.com>
5514 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5515 Use gdb::byte_vector.
5516 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5518 2018-03-12 Yao Qi <yao.qi@linaro.org>
5520 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5521 parameter type to readable_regcache.
5522 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5525 2018-03-11 Tom Tromey <tom@tromey.com>
5527 * dwarf2read.c (struct nextfield): Add initializers.
5528 (struct nextfnfield): Remove.
5529 (struct fnfieldlist): Add initializers. Remove "length" and
5530 "head", use std::vector.
5531 (struct decl_field_list): Remove.
5532 (struct field_info): Add initializers.
5533 <fields, baseclasses>: Now std::vector.
5534 <nbaseclasses, nfnfields, typedef_field_list_count,
5535 nested_types_list_count>: Remove.
5536 (dwarf2_add_field, dwarf2_add_type_defn)
5537 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5538 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5539 (process_structure_scope): Update.
5541 2018-03-11 Tom Tromey <tom@tromey.com>
5543 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5544 for use by std::sort.
5545 (build_type_psymtabs_1): Use std::vector.
5547 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5549 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5550 and LIBMPFR in the printed configuration.
5552 2018-03-08 Tom Tromey <tom@tromey.com>
5554 * source.c (get_filename_and_charpos): Use scoped_fd.
5555 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5556 (procfs_pidlist): Likewise.
5557 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5558 (iterate_over_mappings): Likewise.
5560 2018-03-08 Tom Tromey <tom@tromey.com>
5562 * infcall.c (struct call_return_meta_info)
5563 <stack_temporaries_enabled>: Remove.
5564 (get_call_return_value, call_function_by_hand_dummy): Update.
5565 * thread.c (disable_thread_stack_temporaries): Remove.
5566 (enable_thread_stack_temporaries): Remove.
5567 (thread_stack_temporaries_enabled_p): Return bool.
5568 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5569 (get_last_thread_stack_temporary): Update.
5570 * eval.c (evaluate_subexp): Update.
5571 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5572 class, not a function.
5573 (value_ptr, value_vec): Remove typedefs.
5574 (class thread_info) <stack_temporaries_enabled>: Now bool.
5575 <stack_temporaries>: Now a std::vector.
5576 (thread_stack_temporaries_enabled_p)
5577 (value_in_thread_stack_temporaries): Return bool.
5579 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5581 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5582 (getpkt_or_notif_sane_1): Likewise.
5584 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5586 * build-id.c (build_id_to_debug_bfd): Use std::string.
5588 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5590 * build-id.c (find_separate_debug_file_by_buildid): Return
5592 * build-id.h (find_separate_debug_file_by_buildid): Return
5594 * coffread.c (coff_symfile_read): Adjust to std::string.
5595 * elfread.c (elf_symfile_read): Adjust to std::string.
5596 * symfile.c (separate_debug_file_exists): Change parameter to
5598 (find_separate_debug_file): Return std::string.
5599 (find_separate_debug_file_by_debuglink): Return std::string.
5600 * symfile.h (find_separate_debug_file_by_debuglink): Return
5603 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5605 * common/xml-utils.c (xml_escape_text): Move code to...
5606 (xml_escape_text_append): ... this new function.
5607 * common/xml-utils.h (xml_escape_text_append): New declaration.
5608 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5610 (_initialize_xml_utils): register test_xml_escape_text_append as
5613 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5615 * defs.h: Remove MAX_REGISTER_SIZE.
5616 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5618 * python/py-unwind.c (pyuw_sniffer): Likewise.
5620 2018-03-07 Tom Tromey <tom@tromey.com>
5622 * linux-tdep.c (linux_info_proc): Update.
5623 * target.h (struct target_ops) <to_fileio_readlink>: Return
5625 (target_fileio_readlink): Return optional<string>.
5626 * remote.c (remote_hostio_readlink): Return optional<string>.
5627 * inf-child.c (inf_child_fileio_readlink): Return
5629 * target.c (target_fileio_readlink): Return optional<string>.
5631 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5633 * regcache.c (cooked_read_test): Add riscv to the list of
5634 architectures that have a save_reggroup.
5636 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5638 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5639 value is not a dynamic class object.
5641 2018-03-06 Tom Tromey <tom@tromey.com>
5643 * rust-exp.y: Formatting fixes.
5645 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5647 * riscv-tdep.c (riscv_register_name): Remove target description
5649 (riscv_gdbarch_init): Remove target description check.
5651 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5653 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5655 * riscv-tdep.h: Likewise.
5657 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5659 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5660 (riscv_pseudo_register_write): Delete.
5661 (riscv_gdbarch_init): Remove all use of pseudo registers.
5663 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5665 * record-btrace.c (btrace_print_lines): Replace cleanup
5666 parameter with RAII equivalents.
5667 (btrace_insn_history): Replace cleanup with RAII equivalents.
5668 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5669 make_cleanup_ui_out_tuple_begin_end): Remove.
5670 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5671 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5672 make_cleanup_ui_out_list_begin_end): Remove.
5674 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5676 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5677 parameter types to std::vector. Use bool.
5678 (record_btrace_wait): Replace VEC(tp_t) with
5679 std::vector<thread_info *>.
5680 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5682 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5684 * record-btrace.c (record_btrace_disable_callback): Remove.
5685 (struct scoped_btrace_disable): New.
5686 (record_btrace_open): Use scoped_btrace_disable.
5688 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5690 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5691 reading values from registers.
5693 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5695 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5698 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5700 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5701 change parameter type. Use GDB's print functions, and use
5702 core_addr_to_string where appropriate.
5703 (riscv_push_dummy_call): Use core_addr_to_string where
5704 appropriate, update call to riscv_print_arg_location, and reindent
5706 (riscv_return_value): Update call to riscv_print_arg_location.
5708 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5709 Tim Newsome <tim@sifive.com>
5710 Albert Ou <a0u@eecs.berkeley.edu>
5711 Darius Rad <darius@bluespec.com>
5713 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5714 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5715 (ALLDEPFILES): Add riscv-tdep.c
5716 * configure.tgt: Add riscv support.
5717 * riscv-tdep.c: New file.
5718 * riscv-tdep.h: New file.
5719 * NEWS: Mention new target.
5720 * MAINTAINERS: Add entry for riscv.
5722 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5724 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5725 fields within aggregates.
5727 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5729 * record-btrace.c (btrace_print_lines): Change type of flags to
5730 gdb_disassembly_flags.
5732 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5734 * fbsd-nat.c: Include "inf-ptrace.h".
5735 (USE_SIGTRAP_SIGINFO): Conditionally define.
5736 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5737 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5738 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5740 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5742 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5744 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5745 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5746 "supports_stopped_by_hw_breakpoint" target methods.
5748 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5750 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5751 * fbsd-nat.c (debug_fbsd_nat): New variable.
5752 (show_fbsd_nat_debug): New function.
5753 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5754 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5756 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5758 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5759 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5761 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5762 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5765 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5767 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5768 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5770 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5772 * charset.c (struct charset_vector): New.
5773 (charsets): Change type to charset_vector.
5774 (find_charset_names): Adjust.
5776 (_initialize_charset): Adjust.
5778 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5780 * progspace.h (struct program_space) <deleted_solibs>: Change
5781 type to std::vector<std::string>.
5782 * progspace.c (clear_program_space_solib_cache): Adjust.
5783 * breakpoint.c (print_solib_event): Adjust.
5784 (check_status_catch_solib): Adjust.
5785 * solib.c (update_solib_list): Adjust.
5786 * ui-out.h (class ui_out) <field_string>: New overload.
5787 * ui-out.c (ui_out::field_string): New overload.
5789 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5791 * progspace.h (struct program_space): Add constructor and
5792 destructor, initialize fields.
5793 (add_program_space): Remove.
5794 * progspace.c (add_program_space): Rename to...
5795 (program_space::program_space): ... this.
5796 (release_program_space): Rename to...
5797 (program_space::~program_space): ... this.
5798 (delete_program_space): Use delete to delete program_space.
5799 (initialize_progspace): Use new to allocate program_space.
5800 * inferior.c (add_inferior_with_spaces): Likewise.
5801 (clone_inferior_command): Likewise.
5802 * infrun.c (follow_fork_inferior): Likewise.
5803 (handle_vfork_child_exec_or_exit): Likewise.
5805 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5807 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5808 (delim_string_to_char_ptr_vec): Return std::vector of
5809 gdb::unique_xmalloc_ptr.
5810 (dirnames_to_char_ptr_vec_append): Take std::vector of
5811 gdb::unique_xmalloc_ptr.
5812 (dirnames_to_char_ptr_vec): Return std::vector of
5813 gdb::unique_xmalloc_ptr.
5814 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5815 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5816 (delim_string_to_char_ptr_vec): Return an std::vector of
5817 gdb::unique_xmalloc_ptr, adjust the code.
5818 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5819 gdb::unique_xmalloc_ptr, adjust the code.
5820 (dirnames_to_char_ptr_vec): Return an std::vector of
5821 gdb::unique_xmalloc_ptr, adjust the code.
5822 * auto-load.c (auto_load_safe_path_vec): Change type to
5823 std::vector of gdb::unique_xmalloc_ptr.
5824 (auto_load_expand_dir_vars): Return an std::vector of
5825 gdb::unique_xmalloc_ptr, adjust the code.
5826 (auto_load_safe_path_vec_update): Adjust.
5827 (filename_is_in_auto_load_safe_path_vec): Adjust.
5828 (auto_load_objfile_script_1): Adjust.
5829 * build-id.c (build_id_to_debug_bfd): Adjust.
5830 * linux-thread-db.c (thread_db_load_search): Adjust.
5831 * source.c (add_path): Adjust.
5833 * symfile.c (find_separate_debug_file): Adjust.
5834 * utils.c (do_free_char_ptr_vec): Remove.
5835 (make_cleanup_free_char_ptr_vec): Remove.
5837 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5840 * common/pathstuff.c: Conditionally include "<windows.h>".
5842 2018-03-01 Georg Sauthoff <mail@georg.so>
5845 * gcore.in: Quote variables and switch interpreter to bash.
5847 2018-03-01 Tom Tromey <tom@tromey.com>
5849 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5850 assertion. Add assertion for discriminant_index.
5851 (quirk_rust_enum): Use correct base type name in univariant case.
5853 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5855 * record.c (get_call_history_modifiers): Return a
5857 (cmd_record_call_history): Adjust.
5858 * record-btrace.c (record_btrace_call_history): Adjust.
5859 (record_btrace_call_history_range): Adjust.
5860 (record_btrace_call_history_from): Adjust.
5861 * target-debug.h (target_debug_print_record_print_flags): New.
5862 * target-delegates.c: Re-generate.
5863 * target.c (target_call_history): Change flags type.
5864 (target_call_history_from): Likewise.
5865 (target_call_history_range): Likewise.
5866 * target.h (struct target_ops) <target_call_history>: Likewise.
5867 (target_call_history_from): Likewise.
5868 (target_call_history_range): Likewise.
5870 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5871 Simon Marchi <simon.marchi@polymtl.ca>
5873 * common/common-utils.c: Include "sys/stat.h".
5874 (is_regular_file): Move here from "source.c"; change return
5876 * common/common-utils.h (is_regular_file): New prototype.
5877 * common/pathstuff.c (contains_dir_separator): New function.
5878 * common/pathstuff.h (contains_dir_separator): New prototype.
5879 * source.c: Don't include "sys/stat.h".
5880 (is_regular_file): Move to "common/common-utils.c".
5882 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5884 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5885 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5886 * auto-load.c: Include "common/pathstuff.h".
5887 * common/common-def.h (current_directory): Move here.
5888 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5890 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5892 * common/pathstuff.c: New file.
5893 * common/pathstuff.h: New file.
5894 * compile/compile.c: Include "common/pathstuff.h".
5895 * defs.h (current_directory): Move to "common/common-defs.h".
5896 * dwarf2read.c: Include "common/pathstuff.h".
5898 * guile/scm-safe-call.c: Likewise.
5899 * linux-thread-db.c: Likewise.
5901 * nto-tdep.c: Likewise.
5902 * objfiles.c: Likewise.
5903 * source.c: Likewise.
5904 * symtab.c: Likewise.
5905 * utils.c: Include "common/pathstuff.h".
5906 (gdb_realpath): Move to "common/pathstuff.c".
5907 (gdb_realpath_keepfile): Likewise.
5908 (gdb_abspath): Likewise.
5909 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5910 (gdb_realpath_keepfile): Likewise.
5911 (gdb_abspath): Likewise.
5913 2018-02-28 John Baldwin <jhb@FreeBSD.org>
5915 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5916 wildcard process pid for super_resume for kernels with a
5919 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
5921 * compile/compile.c (get_args): Add additional comments
5922 explaining function.
5924 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
5925 Tom Tromey <tom@tromey.com>
5927 * target.h (memory_write_request_s): Remove typedef. Don't define
5929 (target_write_memory_blocks): Change argument to std::vector.
5930 (struct memory_write_request): Add constructor.
5931 * target-memory.c (compare_block_starting_address): Return bool.
5932 Change argument types.
5933 (claim_memory): Change arguments to use std::vector.
5934 (split_regular_and_flash_blocks, blocks_to_erase)
5935 (compute_garbled_blocks): Likewise.
5936 (cleanup_request_data, cleanup_write_requests_vector): Remove.
5937 (target_write_memory_blocks): Change argument to std::vector.
5938 * symfile.c (struct load_section_data): Add constructor and
5939 destructor. Use std::vector for "requests".
5940 (struct load_progress_data): Add initializers.
5941 (load_section_callback): Update. Use "new".
5942 (clear_memory_write_data): Remove.
5943 (generic_load): Update.
5945 2018-02-27 Alan Hayward <alan.hayward@arm.com>
5947 * arch/aarch64.h: Use common/tdesc.h.
5949 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5951 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5952 architecture with a 64-bit ABI.
5954 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5956 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5957 ahead of target description loading.
5959 2018-02-26 Tom Tromey <tom@tromey.com>
5961 * stack.c (backtrace_command_1): Update.
5962 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5964 * python/py-framefilter.c (py_print_frame)
5965 (gdbpy_apply_frame_filter): Change type of "flags".
5966 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5968 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5969 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5970 * extension.h (enum frame_filter_flag): Rename from
5972 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5973 (apply_ext_lang_frame_filter): Change type of "flags".
5974 * extension.c (apply_ext_lang_frame_filter): Change type of
5976 * extension-priv.h (struct extension_language_ops)
5977 <apply_frame_filter>: Change type of "flags".
5979 2018-02-26 Tom Tromey <tom@tromey.com>
5982 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
5983 off-by-one in py_end computation.
5984 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5986 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5989 2018-02-26 Tom Tromey <tom@tromey.com>
5991 * dwarf2read.c (struct variant_field): New.
5992 (struct nextfield) <variant>: New field.
5993 (dwarf2_add_field): Handle DW_TAG_variant_part.
5994 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5995 discriminated union.
5996 (read_structure_type): Handle DW_TAG_variant_part.
5997 (handle_struct_member_die): New function, extracted from
5998 process_structure_scope. Handle DW_TAG_variant.
5999 (process_structure_scope): Handle discriminated unions. Call
6000 handle_struct_member_die.
6002 2018-02-26 Tom Tromey <tom@tromey.com>
6004 * rust-lang.h (rust_last_path_segment): Declare.
6005 * rust-lang.c (rust_last_path_segment): Now public. Change
6007 (struct disr_info): Remove.
6008 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6009 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6010 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6011 (rust_enum_p, rust_enum_variant): New function.
6012 (rust_underscore_fields): Remove "offset" parameter.
6013 (rust_print_enum): New function.
6014 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6015 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6016 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
6018 (rust_internal_print_type): New function, from rust_print_type.
6020 (rust_print_type): Call rust_internal_print_type.
6021 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6022 Update enum handling.
6023 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6024 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6025 (rust_union_quirks): New functions.
6026 (process_full_comp_unit, process_full_type_unit): Call
6028 (process_structure_scope): Update rust_unions if necessary.
6030 2018-02-26 Tom Tromey <tom@tromey.com>
6032 * value.h (value_union_variant): Declare.
6033 * valops.c (value_union_variant): New function.
6034 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6035 (struct discriminant_info): New.
6036 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6038 (struct main_type) <flag_discriminated_union>: New field.
6040 2018-02-26 Tom Tromey <tom@tromey.com>
6042 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6043 unittests/unpack-selftests.c.
6044 * unittests/unpack-selftests.c: New file.
6045 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6047 2018-02-26 Yao Qi <yao.qi@linaro.org>
6049 * dwarf2read.c (struct partial_die_info) <read>: New method.
6050 (read_partial_die): Remove the declaration.
6051 (load_partial_dies): Update.
6052 (partial_die_info::partial_die_info):
6053 (read_partial_die): Change it to partial_die_info::read.
6055 2018-02-26 Yao Qi <yao.qi@linaro.org>
6057 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6058 (fixup_partial_die): Remove declaration.
6059 (scan_partial_symbols): Update.
6060 (partial_die_parent_scope): Likewise.
6061 (partial_die_full_name): Likewise.
6062 (fixup_partial_die): Change it to partial_die_info::fixup.
6064 2018-02-26 Yao Qi <yao.qi@linaro.org>
6066 * dwarf2read.c (read_partial_die): Update the declaration.
6067 (load_partial_dies): Caller update.
6068 (read_partial_die): Remove one argument abbrev_len.
6070 2018-02-26 Yao Qi <yao.qi@linaro.org>
6072 * dwarf2read.c (struct partial_die_info): Add ctor, delete
6073 assignment operator.
6074 (load_partial_dies): Use ctor and copy ctor.
6075 (read_partial_die): Update.
6076 (dwarf2_cu::find_partial_die): Use ctor.
6078 2018-02-26 Yao Qi <yao.qi@linaro.org>
6080 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6081 (find_partial_die_in_comp_unit): Change it to
6082 dwarf2_cu::find_partial_die.
6083 (find_partial_die): Update.
6085 2018-02-26 Yao Qi <yao.qi@linaro.org>
6087 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
6090 2018-02-26 Yao Qi <yao.qi@linaro.org>
6092 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
6094 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6096 * arch/amd64.h: Use common/tdesc.h.
6097 * arch/i386.c: Likewise.
6098 * arch/i386.h: Likewise.
6099 * arch/tic6x.c: Likewise.
6100 * arch/tdesc.h: Move file from here...
6101 * common/tdesc.h: ...to here.
6102 * features/aarch64-core.c: Regenerate.
6103 * features/aarch64-fpu.c: Regenerate.
6104 * features/i386/32bit-avx.c: Regenerate.
6105 * features/i386/32bit-avx512.c: Regenerate.
6106 * features/i386/32bit-core.c: Regenerate.
6107 * features/i386/32bit-linux.c: Regenerate.
6108 * features/i386/32bit-mpx.c: Regenerate.
6109 * features/i386/32bit-pkeys.c: Regenerate.
6110 * features/i386/32bit-sse.c: Regenerate.
6111 * features/i386/64bit-avx.c: Regenerate.
6112 * features/i386/64bit-avx512.c: Regenerate.
6113 * features/i386/64bit-core.c: Regenerate.
6114 * features/i386/64bit-linux.c: Regenerate.
6115 * features/i386/64bit-mpx.c: Regenerate.
6116 * features/i386/64bit-pkeys.c: Regenerate.
6117 * features/i386/64bit-segments.c: Regenerate.
6118 * features/i386/64bit-sse.c: Regenerate.
6119 * features/i386/x32-core.c: Regenerate.
6120 * features/tic6x-c6xp.c: Regenerate.
6121 * features/tic6x-core.c: Regenerate.
6122 * features/tic6x-gp.c: Regenerate.
6123 * target-descriptions.c: Use common/tdesc.h.
6124 * target-descriptions.h: Likewise.
6126 2018-02-24 Tom Tromey <tom@tromey.com>
6128 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
6129 (try_thread_db_load_from_dir, thread_db_load_search): Use
6131 (info_auto_load_libthread_db_compare): Return bool. Change
6133 (info_auto_load_libthread_db): Use std::vector, std::string.
6136 2018-02-24 Tom Tromey <tom@tromey.com>
6138 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
6140 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
6142 * gdbarch.c: Rebuild.
6143 * gdbarch.h: Rebuild.
6144 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
6145 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
6146 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
6149 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
6151 * gdbtypes.h (sect_offset): Change type to uint64_t.
6152 (sect_offset_str): New function.
6153 * dwarf2read.c (create_addrmap_from_aranges): Use
6155 (error_check_comp_unit_head): Likewise.
6156 (create_debug_type_hash_table): Likewise.
6157 (read_cutu_die_from_dwo): Likewise.
6158 (init_cutu_and_read_dies): Likewise.
6159 (init_cutu_and_read_dies_no_follow): Likewise.
6160 (process_psymtab_comp_unit_reader): Likewise.
6161 (partial_die_parent_scope): Likewise.
6162 (peek_die_abbrev): Likewise.
6163 (process_queue): Likewise.
6164 (dwarf2_physname): Likewise.
6165 (read_namespace_alias): Likewise.
6166 (read_import_statement): Likewise.
6167 (create_dwo_cu_reader): Likewise.
6168 (create_cus_hash_table): Likewise.
6169 (lookup_dwo_cutu): Likewise.
6170 (inherit_abstract_dies): Likewise.
6171 (read_func_scope): Likewise.
6172 (read_call_site_scope): Likewise.
6173 (dwarf2_add_member_fn): Likewise.
6174 (read_common_block): Likewise.
6175 (read_module_type): Likewise.
6176 (read_typedef): Likewise.
6177 (read_subrange_type): Likewise.
6178 (load_partial_dies): Likewise.
6179 (read_partial_die): Likewise.
6180 (find_partial_die): Likewise.
6181 (read_str_index): Likewise.
6182 (dwarf2_string_attr): Likewise.
6183 (build_error_marker_type): Likewise.
6184 (lookup_die_type): Likewise.
6185 (dump_die_shallow): Likewise.
6186 (follow_die_ref): Likewise.
6187 (dwarf2_fetch_die_loc_sect_off): Likewise.
6188 (dwarf2_fetch_constant_bytes): Likewise.
6189 (follow_die_sig): Likewise.
6190 (get_signatured_type): Likewise.
6191 (get_DW_AT_signature_type): Likewise.
6192 (dwarf2_find_containing_comp_unit): Likewise.
6193 (set_die_type): Likewise.
6195 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6197 * arch/aarch64.c: Include "common-defs.h".
6198 * arch/amd64.c: Likewise.
6199 * arch/i386.c: Likewise.
6201 2018-02-21 Tom Tromey <tom@tromey.com>
6203 * value.h: (extract_field_op): Update.
6204 * eval.c (extract_field_op): Return a const char *.
6205 * expression.h (parse_expression_for_completion): Update.
6206 * completer.c (complete_expression): Update.
6207 (add_struct_fields): Make fieldname const.
6208 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6209 (mark_completion_tag, parse_exp_in_context_1): Update.
6210 (parse_expression_for_completion): Change "name" to
6211 unique_xmalloc_ptr*.
6213 2018-02-21 Tom Tromey <tom@tromey.com>
6215 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6217 2018-02-21 Yao Qi <yao.qi@linaro.org>
6219 * avr-tdep.c (avr_read_pc): Change parameter type to
6221 * gdbarch.sh (read_pc): Likewise.
6222 * gdbarch.c: Re-generated.
6223 * gdbarch.h: Re-generated.
6224 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6226 * ia64-tdep.c (ia64_read_pc): Likewise.
6227 * mips-tdep.c (mips_read_pc): Likewise.
6228 * spu-tdep.c (spu_read_pc): Likewise.
6230 2018-02-21 Yao Qi <yao.qi@linaro.org>
6232 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6233 * regcache-dump.c: New file.
6234 * regcache.c: Move register_dump to regcache-dump.c.
6235 (maintenance_print_registers): Likewise.
6236 (maintenance_print_raw_registers): Likewise.
6237 (maintenance_print_cooked_registers): Likewise.
6238 (maintenance_print_register_groups): Likewise.
6239 (maintenance_print_remote_registers): Likewise.
6240 (_initialize_regcache): Likewise.
6241 * regcache.h (register_dump): Moved from regcache.c.
6243 2018-02-21 Yao Qi <yao.qi@linaro.org>
6245 * regcache.c (regcache::regcache): Update.
6246 (regcache::invalidate): Move it to detached_regcache::invalidate.
6247 (get_thread_arch_aspace_regcache): Update.
6248 (regcache::raw_update): Update.
6249 (regcache::cooked_read): Remove some code.
6250 (regcache::cooked_read_value): Likewise.
6251 (regcache::raw_write): Remove assert on m_readonly_p.
6252 (regcache::raw_supply_integer): Move it to
6253 detached_regcache::raw_supply_integer.
6254 (regcache::raw_supply_zeroed): Likewise.
6255 * regcache.h (detached_regcache) <raw_supply_integer>: New
6257 <raw_supply_zeroed, invalidate>: Likewise.
6258 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6259 <invalidate>: Likewise.
6260 <m_readonly_p>: Removed.
6262 2018-02-21 Yao Qi <yao.qi@linaro.org>
6264 * infcmd.c (get_return_value): Let stop_regs point to
6265 get_current_regcache.
6266 * regcache.c (regcache::regcache): Remove.
6267 (register_dump_reg_buffer): New class.
6268 (regcache_print): Adjust.
6269 * regcache.h (regcache): Remove constructors.
6271 2018-02-21 Yao Qi <yao.qi@linaro.org>
6273 * regcache.c (class register_dump): New class.
6274 (register_dump_regcache, register_dump_none): New class.
6275 (register_dump_remote, register_dump_groups): New class.
6276 (regcache_print): Update.
6277 * regcache.h (regcache_dump_what): Move it to regcache.c.
6278 (regcache) <dump>: Remove.
6280 2018-02-21 Yao Qi <yao.qi@linaro.org>
6282 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6284 (jit_unwind_reg_set_impl): Call raw_supply.
6285 (jit_frame_sniffer): Use reg_buffer_rw.
6286 * record-full.c (record_full_core_regbuf): Change its type.
6287 (record_full_core_open_1): Use reg_buffer_rw.
6288 (record_full_close): Likewise.
6289 (record_full_core_fetch_registers): Use regcache->raw_supply.
6290 (record_full_core_store_registers): Likewise.
6291 * regcache.c (regcache::get_register_status): Move it to
6293 (regcache_raw_set_cached_value): Remove.
6294 (regcache::raw_set_cached_value): Remove.
6295 (regcache::raw_write): Call raw_supply.
6296 (regcache::raw_supply): Move it to reg_buffer_rw.
6297 * regcache.h (regcache_raw_set_cached_value): Remove.
6298 (reg_buffer_rw): New class.
6300 2018-02-21 Yao Qi <yao.qi@linaro.org>
6302 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6303 readonly_detached_regcache.
6304 (dummy_frame_prev_register): Use regcache->cooked_read.
6305 * frame.c (frame_save_as_regcache): Change return type.
6306 (frame_pop): Update.
6307 * frame.h (frame_save_as_regcache): Update declaration.
6308 * inferior.h (get_infcall_suspend_state_regcache): Update
6310 * infrun.c (infcall_suspend_state) <registers>: use
6311 readonly_detached_regcache.
6312 (save_infcall_suspend_state): Don't use regcache_dup.
6313 (get_infcall_suspend_state_regcache): Change return type.
6314 * linux-fork.c (struct fork_info) <savedregs>: Change to
6315 readonly_detached_regcache.
6317 (fork_save_infrun_state): Don't use regcache_dup.
6318 (info_checkpoints_command): Adjust.
6319 * mi/mi-main.c (register_changed_p): Update declaration.
6320 (mi_cmd_data_list_changed_registers): Use
6321 readonly_detached_regcache.
6322 (register_changed_p): Change parameter type to
6323 readonly_detached_regcache.
6324 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6325 readonly_detached_regcache.
6326 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6327 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6329 (regcache::save): Move it to reg_buffer.
6330 (regcache::restore): Change parameter type.
6331 (regcache_dup): Remove.
6332 * regcache.h (reg_buffer) <save>: New method.
6333 (readonly_detached_regcache): New class.
6334 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6335 readonly_detached_regcache.
6336 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6338 2018-02-21 Yao Qi <yao.qi@linaro.org>
6340 * frame.c (frame_save_as_regcache): Use regcache method save.
6341 (frame_pop): Use regcache method restore.
6342 * infrun.c (restore_infcall_suspend_state): Likewise.
6343 * linux-fork.c (fork_load_infrun_state): Likewise.
6344 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6346 * regcache.c (regcache_save): Remove.
6347 (regcache::restore): More asserts.
6348 (regcache_cpy): Remove.
6349 * regcache.h (regcache_save): Remove the declaration.
6350 (regcache::restore): Move from private to public.
6351 Remove the friend declaration of regcache_cpy.
6352 (regcache_cpy): Remove declaration.
6354 2018-02-21 Yao Qi <yao.qi@linaro.org>
6356 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6357 parameter type to 'readable_regcache *'.
6358 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6359 * arm-tdep.c (arm_neon_quad_read): Likewise.
6360 (arm_pseudo_read): Likewise.
6361 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6362 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6363 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6364 * gdbarch.c: Re-generated.
6365 * gdbarch.h: Re-generated.
6366 * gdbarch.sh (pseudo_register_read): Change parameter type to
6367 'readable_regcache *'.
6368 (pseudo_register_read_value): Likewise.
6369 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6370 (h8300_pseudo_register_read): Likewise.
6371 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6372 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6373 (i386_pseudo_register_read_into_value): Likewise.
6374 (i386_pseudo_register_read_value): Likewise.
6375 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6377 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6378 * m32c-tdep.c (m32c_raw_read): Likewise.
6379 (m32c_read_flg): Likewise.
6380 (m32c_banked_register): Likewise.
6381 (m32c_banked_read): Likewise.
6382 (m32c_sb_read): Likewise.
6383 (m32c_part_read): Likewise.
6384 (m32c_cat_read): Likewise.
6385 (m32c_r3r2r1r0_read): Likewise.
6386 (m32c_pseudo_register_read): Likewise.
6387 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6388 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6389 (mep_pseudo_cr64_read): Likewise.
6390 (mep_pseudo_register_read): Likewise.
6391 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6392 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6393 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6394 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6395 (regcache::cooked_read): Likewise.
6396 (regcache::cooked_read_value): Likewise.
6397 (regcache_cooked_read_signed):
6398 (regcache::cooked_read): Likewise.
6399 * regcache.h (readable_regcache): New class.
6400 (regcache): Inherit readable_regcache. Move some methods to
6402 * rl78-tdep.c (rl78_pseudo_register_read): Change
6403 parameter type to 'readable_regcache *'.
6404 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6405 (e500_pseudo_register_read): Change parameter type to
6406 'readable_regcache *'.
6407 (dfp_pseudo_register_read): Likewise.
6408 (vsx_pseudo_register_read): Likewise.
6409 (efpr_pseudo_register_read): Likewise.
6410 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6411 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6412 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6413 (sh64_pseudo_register_read): Likewise.
6414 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6415 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6416 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6417 (spu_pseudo_register_read): Likewise.
6418 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6419 (xtensa_pseudo_register_read): Likewise.
6421 2018-02-21 Yao Qi <yao.qi@linaro.org>
6423 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6424 (regcache::arch): Move it to reg_buffer::arch.
6425 (regcache::register_buffer): Likewise.
6426 (regcache::assert_regnum): Likewise.
6427 (regcache::num_raw_registers): Likewise.
6428 * regcache.h (reg_buffer): New class.
6429 (regcache): Inherit reg_buffer.
6431 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6433 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6434 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6436 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6438 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6440 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6442 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6443 (SFILES): Remove common/*.c files.
6444 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6445 * common/common.host: Add common reference.
6446 * configure.ac: Likewise.
6447 * configure: Regenerate.
6449 2018-02-16 Yao Qi <yao.qi@linaro.org>
6451 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6452 (block_initialize_namespace): Use new.
6453 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6454 (dwarf2_free_objfile): Use delete.
6455 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6456 (copy_type_recursive): Use new.
6457 * gdb_obstack.h (allocate_on_obstack): New.
6459 2018-02-15 Yao Qi <yao.qi@linaro.org>
6462 * inferior.c (exit_inferior_1): Reset inf->control.
6464 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6466 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6469 2018-02-14 Pedro Alves <palves@redhat.com>
6471 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6472 frame_cleanup_after_sniffer on exception.
6474 2018-02-14 Tom Tromey <tom@tromey.com>
6476 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6478 (solib_bfd_open): Make pathname const.
6479 * solib.c (solib_bfd_open): Make pathname const.
6480 * solib-spu.c (spu_bfd_fopen): Make name const.
6481 (spu_bfd_open): Make pathname const.
6482 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6483 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6485 2018-02-14 Tom Tromey <tom@tromey.com>
6487 * symfile.c (symfile_bfd_open): Update.
6488 * source.h (openp, source_full_path_of, find_and_open_source):
6489 Change argument type to unique_xmalloc_ptr.
6490 * source.c (openp): Take a unique_xmalloc_ptr.
6491 (source_full_path_of, find_and_open_source): Likewise.
6492 (open_source_file, symtab_to_fullname): Update.
6493 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6495 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6496 (exec_file_find): Update.
6497 * psymtab.c (psymtab_to_fullname): Update.
6498 * nto-tdep.h (nto_find_and_open_solib): Update.
6499 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6501 * exec.c (exec_file_attach): Update.
6502 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6503 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6505 2018-02-14 Tom Tromey <tom@tromey.com>
6507 * solib.c: Include source.h.
6508 * nto-tdep.c: Include source.h.
6509 * mi/mi-cmd-env.c: Include source.h.
6510 * infcmd.c: Include source.h.
6511 * exec.c: Include source.h.
6512 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6513 (add_path, directory_switch, source_path, init_source_path): Move
6515 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6516 (add_path, directory_switch, source_path, init_source_path):
6519 2018-02-14 Tom Tromey <tom@tromey.com>
6521 * solist.h (exec_file_find, solib_find): Return
6523 (solib_bfd_fopen): Take a const char *.
6524 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6525 (exec_file_find, solib_find): Likewise.
6526 (solib_bfd_fopen): Do not take ownership of "pathname".
6527 (solib_bfd_open): Use unique_xmalloc_ptr.
6528 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6529 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6530 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6531 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6533 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6535 * ada-lang.c (name_match_type_from_name): Remove reference to
6536 ada_name_for_lookup in function's documentation.
6537 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6539 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6541 * defs.h (enum openp_flags): New enum.
6542 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6543 Move to enum openp_flags.
6544 (openp_flags): New enum flags.
6545 (openp): Change parameter type to openp_flags.
6546 * source.c (openp): Change parameter type to openp_flags.
6547 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6548 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6550 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6552 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6555 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6557 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6559 (class dwarf2_queue_guard): ...the destructor of this new class.
6560 (dw2_do_instantiate_symtab): Create instance of the new class
6561 dwarf2_queue_guard, remove cleanup.
6563 2018-02-09 Tom Tromey <tom@tromey.com>
6565 * source.c (find_source_lines): Don't reference past the end of
6568 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6570 * remote.c (remote_btrace_maybe_reopen): Change error message.
6571 * btrace.c (btrace_enable): Likewise.
6572 (parse_xml_btrace): Likewise.
6573 (parse_xml_btrace_conf): Likewise.
6575 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6577 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6578 (linux_enable_pt, linux_enable_bts): Call
6579 diagnose_perf_event_open_fail.
6581 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6583 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6584 Remove parameter and change return type. Update callers. Move it.
6585 (linux_enable_bts, linux_enable_pt): Improve error message.
6586 (linux_enable_pt): Remove zero buffer size check.
6587 (linux_enable_btrace): Improve error messages. Remove NULL return
6590 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6592 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6593 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6594 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6595 (linux_supports_pt, linux_supports_btrace): Remove.
6596 (linux_enable_bts): Call cpu_supports_bts.
6597 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6598 * remote.c (remote_supports_btrace): Remove.
6599 (init_remote_ops): Remove remote_supports_btrace.
6600 * target-delegates.c: Regenerated.
6601 * target.c (target_supports_btrace): Remove.
6602 * target.h (target_ops) <to_supports_btrace>: Remove
6603 (target_supports_btrace): Remove.
6604 * x86-linux-nat.c (x86_linux_create_target): Remove
6605 linux_supports_btrace.
6607 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6609 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6611 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6612 exception and use message in own exception.
6614 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6616 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6617 (perf_event_pt_event_type): Use gdb_file_up.
6618 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6619 scoped_fd, and scoped_mmap.
6621 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6623 * common/scoped_mmap.h: New.
6624 * unittests/scoped_mmap-selftest.c: New.
6625 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6626 unittests/scoped_mmap-selftest.c.
6628 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6630 * common/scoped_fd.h: New.
6631 * unittests/scoped_fd-selftest.c: New.
6632 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6633 unittests/scoped_fd-selftest.c.
6635 2018-02-09 Tom Tromey <tom@tromey.com>
6637 * auto-load.c (auto_load_section_scripts): Use
6638 gdb::unique_xmalloc_ptr.
6640 2018-02-09 Tom Tromey <tom@tromey.com>
6642 * auto-load.c (execute_script_contents): Use std::string.
6644 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6646 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6647 Python function, rather than a new command.
6649 2018-02-08 Tom Tromey <tom@tromey.com>
6651 * solib.c (solib_find_1): Use std::string.
6652 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6654 2018-02-08 Tom Tromey <tom@tromey.com>
6656 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6658 2018-02-08 Tom Tromey <tom@tromey.com>
6660 * source.c (find_source_lines): Use gdb::def_vector.
6662 2018-02-08 Tom Tromey <tom@tromey.com>
6664 * macrocmd.c (struct temporary_macro_definition): New.
6665 (macro_define_command): Use temporary_macro_definition. Remove
6667 (free_macro_definition_ptr): Remove.
6669 2018-02-08 Tom Tromey <tom@tromey.com>
6671 * macroexp.c (maybe_expand): Use std::string.
6673 2018-02-08 Tom Tromey <tom@tromey.com>
6675 * macroexp.c (struct macro_buffer): Add initializers for some
6677 (init_buffer, init_shared_buffer, free_buffer)
6678 (free_buffer_return_text): Remove.
6679 (macro_buffer): New constructors.
6680 (~macro_buffer): New destructor.
6681 (macro_buffer::set_shared): New method.
6682 (macro_buffer::resize_buffer, macro_buffer::appendc)
6683 (macro_buffer::appendmem): Now methods, not free functions.
6684 (set_token, append_tokens_without_splicing, stringify)
6685 (macro_stringify): Update.
6686 (gather_arguments): Change return type. Remove argc_p argument,
6687 add args_ptr argument. Use std::vector.
6688 (substitute_args): Remove argc argument. Accept std::vector.
6689 (expand): Update. Use std::vector.
6690 (scan, macro_expand, macro_expand_next): Update.
6692 2018-02-08 Tom Tromey <tom@tromey.com>
6694 * symtab.c (default_collect_symbol_completion_matches_break_on):
6695 Use unique_xmalloc_ptr.
6696 * macroscope.h: (sal_macro_scope, user_macro_scope)
6697 (default_macro_scope): Return unique_xmalloc_ptr.
6698 * macroscope.c (sal_macro_scope, user_macro_scope)
6699 (default_macro_scope): Return unique_xmalloc_ptr.
6700 * macroexp.h (macro_expand, macro_expand_once): Return
6702 * macroexp.c (macro_expand, macro_expand_once): Return
6704 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6705 (info_macro_command, info_macros_command): Use
6707 * compile/compile-c-support.c (write_macro_definitions): Use
6709 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6711 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6713 * value.c (value_static_field): Assign field type instead of
6714 containing type when returning an optimized out value.
6716 2018-02-06 Yao Qi <yao.qi@linaro.org>
6718 * ft32-tdep.c (ft32_read_pc): Remove.
6719 (ft32_write_pc): Remove.
6720 (ft32_gdbarch_init): Update.
6721 * m32r-tdep.c (m32r_read_pc): Remove.
6722 (m32r_gdbarch_init): Update.
6723 * mep-tdep.c (mep_read_pc): Remove.
6724 (mep_gdbarch_init): Update.
6725 * microblaze-tdep.c (microblaze_write_pc): Remove.
6726 (microblaze_gdbarch_init): Update.
6727 * mn10300-tdep.c (mn10300_read_pc): Remove.
6728 (mn10300_write_pc): Remove.
6729 (mn10300_gdbarch_init): Update.
6730 * moxie-tdep.c (moxie_read_pc): Remove.
6731 (moxie_write_pc): Remove.
6732 (moxie_gdbarch_init): Update.
6734 2018-02-06 Yao Qi <yao.qi@linaro.org>
6736 * expprint.c (print_subexp_standard): Handle
6737 OP_F77_UNDETERMINED_ARGLIST.
6738 (dump_subexp_body_standard): Likewise.
6740 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6742 * target-descriptions.c (tdesc_element_visitor) Add empty
6744 (tdesc_type): Move make_gdb_type from here.
6745 (tdesc_type_builtin): Likewise.
6746 (tdesc_type_vector): Likewise.
6747 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6748 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6749 (make_gdb_type_union): Likewise.
6750 (make_gdb_type_flags): Likewise.
6751 (make_gdb_type_enum): Likewise.
6752 (make_gdb_type): New function.
6753 (tdesc_register_type): Use static make_gdb_type.
6755 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6757 * infcmd.c (default_print_one_register_info): Align natural-format
6758 column values consistently one under another.
6759 (pad_to_column): New function.
6761 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6763 * dwarf2read.c (dwarf2_physname): Move commment.
6765 2018-02-01 Leszek Swirski <leszeks@google.com>
6767 * varobj.c (varobj_formatted_print_options): Allow recursive
6768 pretty printing if pretty printing is enabled.
6770 2018-02-01 Leszek Swirski <leszeks@google.com>
6772 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6773 names after a structop as a filename.
6775 2018-02-01 Yao Qi <yao.qi@linaro.org>
6777 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6778 (arm_record_coproc_data_proc): Likewise.
6780 2018-02-01 Yao Qi <yao.qi@linaro.org>
6782 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6784 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6786 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6787 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6789 2018-01-31 Pedro Alves <palves@redhat.com>
6791 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6792 * inflow.c (child_terminal_save_inferior): Wrap reference to
6793 tcgetpgrp in HAVE_TERMIOS_H.
6794 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6796 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6797 always iterate over all inferiors.
6798 (gdbsim_cntrl_c): Adjust.
6799 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6801 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6803 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6804 index type is objfile-owned if the element type is as well.
6806 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6810 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6812 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6813 "features/s390x-linux64.c".
6814 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6815 s390_linux32 and s390x_linux64.
6816 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6818 * s390-tdep.c: Include "features/s390-linux32.c" and
6819 "features/s390x-linux64.c".
6820 (s390_tdesc_valid): Add check for tdesc_has_registers.
6821 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6822 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6823 tdesc_s390x_linux64.
6824 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6825 tdesc_s390x_linux64 to...
6826 * s390-tdep.h: ...here.
6828 2018-01-30 Pedro Alves <palves@redhat.com>
6831 * config.in, configure: Regenerate.
6832 * configure.ac: Check for getpgid.
6833 * go32-nat.c (go32_pass_ctrlc): New.
6834 (go32_target): Install it.
6835 * inf-child.c (inf_child_target): Install
6836 child_terminal_save_inferior, child_pass_ctrlc and
6838 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6839 (inf_ptrace_target): No longer install it.
6840 * infcmd.c (interrupt_target_1): Adjust.
6841 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6842 (child_interrupt): Declare.
6843 (inferior::terminal_state): New.
6844 * inflow.c (struct terminal_info): Update comments.
6845 (inferior_process_group): Delete.
6846 (terminal_is_ours): Delete.
6847 (gdb_tty_state): New.
6848 (child_terminal_init): Adjust.
6849 (is_gdb_terminal, sharing_input_terminal_1)
6850 (sharing_input_terminal): New functions.
6851 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6852 Set the process's actual process group in the foreground if
6853 possible. Handle is_ours_for_output/is_ours distinction. Don't
6854 mark terminal as the inferior's if not sharing GDB's terminal.
6855 Don't check attach_flag.
6856 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6857 pass down a target_terminal_state.
6858 (child_terminal_save_inferior): New, factored out from ...
6859 (child_terminal_ours_1): ... this. Handle
6860 target_terminal_state::is_ours_for_output.
6861 (child_interrupt, child_pass_ctrlc): New.
6862 (inflow_inferior_exit): Clear the inferior's terminal_state.
6863 (copy_terminal_info): Copy the inferior's terminal state.
6864 (_initialize_inflow): Remove reference to terminal_is_ours.
6865 * inflow.h (inferior_process_group): Delete.
6866 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6867 * procfs.c (procfs_target): Don't install procfs_interrupt.
6868 (procfs_interrupt): Delete.
6869 * remote.c (remote_serial_quit_handler): Adjust.
6870 (remote_interrupt): Remove ptid parameter. Adjust.
6871 * target-delegates.c: Regenerate.
6872 * target.c: Include "terminal.h".
6873 (target_terminal::terminal_state): Rename to ...
6874 (target_terminal::m_terminal_state): ... this.
6875 (target_terminal::init): Adjust.
6876 (target_terminal::inferior): Adjust to per-inferior
6878 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6879 (target_terminal::ours, target_terminal::ours_for_output): Use
6880 target_terminal_is_ours_kind.
6881 (target_interrupt): Remove ptid parameter. Adjust.
6882 (default_target_pass_ctrlc): Adjust.
6883 * target.h (target_ops::to_terminal_save_inferior): New field.
6884 (target_ops::to_interrupt): Remove ptid_t parameter.
6885 (target_interrupt): Remove ptid_t parameter. Update comment.
6886 (target_pass_ctrlc): Update comment.
6887 * target/target.h (target_terminal_state): New scoped enum,
6889 (target_terminal::terminal_state): ... here.
6890 (target_terminal::inferior): Update comments.
6891 (target_terminal::restore_inferior): New.
6892 (target_terminal::is_inferior, target_terminal::is_ours)
6893 (target_terminal::is_ours_for_output): Adjust.
6894 (target_terminal::scoped_restore_terminal_state): Adjust to
6895 rename, and call restore_inferior() instead of inferior().
6896 (target_terminal::scoped_restore_terminal_state::m_state): Change
6898 (target_terminal::terminal_state): Rename to ...
6899 (target_terminal::m_terminal_state): ... this and change type.
6901 2018-01-30 Pedro Alves <palves@redhat.com>
6903 * linux-nat.c (wait_for_signal): New function.
6904 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6906 (async_terminal_is_ours)
6907 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6908 (linux_nat_add_target): Don't override
6909 to_terminal_inferior/to_terminal_ours.
6911 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
6913 * remote.c (remote_follow_fork): Don't call "detach_inferior".
6915 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
6917 * dwarf2read.c (free_dwo_files): Add forward-declaration.
6918 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6919 dwarf2_per_objfile_free here.
6920 (dwarf2_per_objfile_free): Remove.
6921 (_initialize_dwarf2_read): Don't register
6922 dwarf2_per_objfile_free as a registry cleanup.
6924 2018-01-27 Eli Zaretskii <eliz@gnu.org>
6926 Avoid compilation errors in MinGW native builds
6928 The error is triggered by including python-internal.h, and the
6931 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6932 from build-gnulib/import/math.h:27,
6933 from d:/usr/Python26/include/pyport.h:235,
6934 from d:/usr/Python26/include/Python.h:58,
6935 from python/python-internal.h:94,
6936 from python/py-arch.c:24:
6937 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6941 This happens because Python headers define 'hypot' to expand t
6942 '_hypot' in the Windows builds.
6943 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6944 'hypoth'. This avoids a compilation error.
6946 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6948 * MAINTAINERS (Write After Approval): Fix ordering.
6950 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6952 * MAINTAINERS (Write After Approval): Add Alan Hayward.
6954 2018-01-26 Alan Modra <amodra@gmail.com>
6956 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6957 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6958 Remove nop. Make const. Comment.
6959 (powerpc32_plt_stub_so_2): New.
6960 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6961 Correct count. Update uses.
6962 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6963 Move common code reading PLT entry word. Correct
6964 powerpc32_plt_stub PLT address calculation.
6965 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6966 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6967 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6968 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6969 (ppc64_standard_linkage8): Likewise.
6970 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6971 Correct insns description.
6972 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6974 2018-01-24 Pedro Alves <palves@redhat.com>
6976 GCC PR libstdc++/83906
6977 * gdbtypes.c (operator==(const dynamic_prop &,
6978 const dynamic_prop &)): New.
6979 (operator==(const range_bounds &, const range_bounds &)): New.
6980 (check_types_equal): Use them instead of memcmp.
6981 * gdbtypes.h (operator==(const dynamic_prop &,
6982 const dynamic_prop &)): Declare.
6983 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6984 (operator==(const range_bounds &, const range_bounds &)): Declare.
6985 (operator!=(const range_bounds &, const range_bounds &)): Declare.
6987 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6989 * s390-linux-tdep.c (s390_record_address_mask)
6990 (s390_record_calc_disp_common, s390_record_calc_disp)
6991 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6992 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6993 (s390_process_record): Move to s390-tdep.c.
6994 (s390_linux_init_abi_any): Adjust.
6995 * s390-tdep.c (s390_record_address_mask)
6996 (s390_record_calc_disp_common, s390_record_calc_disp)
6997 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6998 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6999 (s390_process_record): Moved from s390-linux-tdep.c
7000 (s390_gdbarch_init): Adjust.
7002 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7004 * s390-linux-nat.c (s390-tdep.h): New include.
7005 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7006 (HFILES_NO_SRCDIR): Add s390-tdep.h.
7007 (ALLDEPFILES): Add s390-tdep.c.
7008 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7009 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7010 * s390-tdep.h: ...this. New file.
7011 * s390-linux-tdep.c (s390-tdep.h): New include.
7012 (_initialize_s390_tdep): Rename to...
7013 (_initialize_s390_linux_tdep): ...this and adjust.
7014 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7015 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7017 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7018 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7019 (s390_is_partial_instruction, s390_software_single_step)
7020 (is_non_branch_ril, s390_displaced_step_copy_insn)
7021 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7022 (s390_prologue_data, s390_addr, s390_store, s390_load)
7023 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7024 (s390_register_call_saved, s390_guess_tracepoint_registers)
7025 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7026 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7027 (s390_pseudo_register_name, s390_pseudo_register_type)
7028 (s390_pseudo_register_read, s390_pseudo_register_write)
7029 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7030 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7031 (s390_addr_bits_remove, s390_address_class_type_flags)
7032 (s390_address_class_type_flags_to_name)
7033 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7034 (s390_function_arg_float, s390_function_arg_vector)
7035 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7036 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7037 (s390_frame_align, s390_register_return_value, s390_return_value)
7038 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7039 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7040 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7041 (s390_trad_frame_prev_register, s390_unwind_cache)
7042 (s390_prologue_frame_unwind_cache)
7043 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7044 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7045 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7046 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7047 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7048 (s390_frame_base_address, s390_local_base_address)
7049 (s390_frame_base, s390_gcc_target_options)
7050 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7051 (s390_validate_reg_range, s390_tdesc_valid)
7052 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7053 * s390-tdep.c: ...this. New file.
7055 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7057 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7058 (s390_process_record, s390_gdbarch_tdep_alloc)
7059 (s390_linux_init_abi_any): Use/set new hook.
7061 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7063 * s390-linux-tdep.c (osabi.h): New include.
7064 (s390_linux_init_abi_31, s390_linux_init_abi_64)
7065 (s390_linux_init_abi_any): New functions.
7066 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7068 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7070 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7071 tdesc_has_registers check
7073 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7075 * s390-linux-tdep.c (s390_tdesc_valid): New function.
7076 (s390_validate_reg_range): New macro.
7077 (s390_gdbarch_init): Adjust.
7079 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7081 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7082 (s390_gdbarch_tdep_alloc): Adjust.
7083 (s390_gdbarch_init): Adjust.
7085 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7087 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
7088 <have_tdb>: Change type to bool.
7089 (s390_gdbarch_tdep_alloc): Adjust.
7090 (s390_gdbarch_init): Adjust.
7092 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7094 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
7095 (gdbarch_tdep) <have_upper, have_vx>: New fields.
7096 (s390_gdbarch_tdep_alloc): New function.
7097 (s390_gdbarch_init): Allocate tdep at start and use its fields
7098 instead of separate variables.
7100 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7102 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7103 when looking for cached gdbarch and add comment for remaining.
7105 2018-01-22 Pedro Alves <palves@redhat.com>
7106 Sergio Durigan Junior <sergiodj@redhat.com>
7108 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7111 2018-01-22 Maciej W. Rozycki <macro@mips.com>
7113 * MAINTAINERS: Update my company e-mail address.
7115 2018-01-22 Yao Qi <yao.qi@linaro.org>
7117 * regcache.c (cooked_write_test): New function.
7118 (_initialize_regcache): Register the test.
7120 2018-01-22 Yao Qi <yao.qi@linaro.org>
7122 * ia64-tdep.c (ia64_pseudo_register_read): Call
7123 regcache->cooked_read instead of regcache_cooked_read_unsigned.
7124 * m32c-tdep.c (m32c_cat_read): Likewise.
7125 (m32c_r3r2r1r0_read): Likewise.
7126 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7127 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7129 2018-01-22 Yao Qi <yao.qi@linaro.org>
7131 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
7132 method raw_read instead of regcache_raw_read.
7133 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7134 * arm-tdep.c (arm_neon_quad_read): Likewise.
7135 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7136 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7137 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7138 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
7139 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7140 (i386_pseudo_register_read_into_value): Likewise.
7141 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7142 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7143 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7144 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
7145 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
7146 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7147 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7148 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7149 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
7151 2018-01-22 Yao Qi <yao.qi@linaro.org>
7153 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
7154 * configure.tgt: Remove target mt.
7155 * mt-tdep.c: Remove.
7156 * regcache.c (cooked_read_test): Remove the check for mt.
7158 2018-01-22 Yao Qi <yao.qi@linaro.org>
7160 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
7161 instead of gdbarch_pseudo_register_read_value.
7163 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7165 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7168 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7170 * linespec.c (create_sals_line_offset): Remove code that preserved
7171 the symtab_and_line's line number.
7173 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7175 * varobj.c (varobj_create): Don't set valid_block when creating a
7178 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7180 * varobj.c (varobj_create): Remove out of date comment.
7182 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7185 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7186 updating innermost block.
7187 * parse.c (innermost_block_tracker::update): Take extra type
7188 parameter, and check types match before updating innermost block.
7189 (write_dollar_variable): Update innermost block for registers.
7190 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7191 (innermost_block_tracker::innermost_block_tracker): Initialise
7193 (innermost_block_tracker::reset): Take type parameter.
7194 (innermost_block_tracker::update): Take type parameter, and pass
7195 type through as needed.
7196 (innermost_block_tracker::m_types): New member.
7197 * varobj.c (varobj_create): Pass type when reseting innermost
7200 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7202 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7203 * ada-lang.c (resolve_subexp): Likewise.
7204 * breakpoint.c (set_breakpoint_condition) Likewise.
7205 (watch_command_1) Likewise.
7206 * c-exp.y (variable): Likewise.
7207 * d-exp.y (PrimaryExpression): Likewise.
7208 * f-exp.y (variable): Likewise.
7209 * go-exp.y (variable): Likewise.
7210 * m2-exp.y (variable): Likewise.
7211 * objfiles.c (objfile::~objfile): Likewise.
7212 * p-exp.y (variable): Likewise.
7213 * parse.c (innermost_block): Change type.
7214 * parser-defs.h (class innermost_block_tracker): New.
7215 (innermost_block): Change to innermost_block_tracker.
7216 * printcmd.c (display_command): Switch to innermost_block API.
7217 (do_one_display): Likewise.
7218 * rust-exp.y (do_one_display): Likewise.
7219 * symfile.c (clear_symtab_users): Likewise.
7220 * varobj.c (varobj_create): Switch to innermost_block API, replace
7221 use of innermost_block with block stored on varobj object.
7223 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7225 * expression.h (innermost_block): Remove declaration.
7226 * varobj.c: Add 'parser-defs.h' include.
7228 2018-01-19 Tom Tromey <tom@tromey.com>
7230 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7231 symbols in the static and global blocks.
7233 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7235 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7236 gdb_ptrace.h, and move including gdb_wait.h ...
7237 * nat/linux-ptrace.h: ... to here.
7239 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7241 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7242 inf_ptrace_detach_success.
7243 (inf_ptrace_detach_success): Add inferior parameter, use it
7244 instead of inferior_ptid, pass it to detach_inferior.
7245 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7247 * inferior.c (detach_inferior): Add overload that takes an
7249 * inferior.h (detach_inferior): Likewise.
7250 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7251 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7252 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7254 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7256 * target.h (struct target_ops) <to_detach>: Add inferior
7258 (target_detach): Likewise.
7259 * target.c (dispose_inferior): Pass inferior down.
7260 (target_detach): Pass inferior down. Assert that it is equal to
7261 the current inferior.
7262 * aix-thread.c (aix_thread_detach): Pass inferior down.
7263 * corefile.c (core_file_command): Pass current_inferior() down.
7264 * corelow.c (core_detach): Add inferior parameter.
7265 * darwin-nat.c (darwin_detach): Likewise.
7266 * gnu-nat.c (gnu_detach): Likewise.
7267 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7268 * infcmd.c (detach_command): Pass current_inferior() down to
7270 * infrun.c (follow_fork_inferior): Pass parent_inf to
7272 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7274 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7275 * linux-thread-db.c (thread_db_detach): Likewise.
7276 * nto-procfs.c (procfs_detach): Likewise.
7277 * procfs.c (procfs_detach): Likewise.
7278 * record.c (record_detach): Likewise.
7279 * record.h (struct inferior): Forward-declare.
7280 (record_detach): Add inferior parameter.
7281 * remote-sim.c (gdbsim_detach): Likewise.
7282 * remote.c (remote_detach_1): Likewise.
7283 (remote_detach): Likewise.
7284 (extended_remote_detach): Likewise.
7285 * sol-thread.c (sol_thread_detach): Likewise.
7286 * target-debug.h (target_debug_print_inferior_p): New macro.
7287 * target-delegates.c: Re-generate.
7288 * top.c (kill_or_detach): Pass inferior down to target_detach.
7289 * windows-nat.c (windows_detach): Add inferior parameter.
7291 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7293 * target.h (struct target_ops) <to_detach>: Remove args
7295 (target_detach): Likewise.
7296 * target.c (dispose_inferior): Adjust.
7297 (target_detach): Remove args parameter, adjust.
7298 * aix-thread.c (aix_thread_detach): Adjust.
7299 * corefile.c (core_file_command): Adjust.
7300 * corelow.c (core_detach): Adjust.
7301 * darwin-nat.c (darwin_detach): Adjust.
7302 * gnu-nat.c (gnu_detach): Adjust.
7303 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7304 * infcmd.c (detach_command): Adjust
7305 * infrun.c (follow_fork_inferior): Adjust.
7306 (handle_vfork_child_exec_or_exit): Adjust.
7307 * linux-fork.c (linux_fork_detach): Remove args parameter.
7308 * linux-fork.h (linux_fork_detach): Likewise.
7309 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7310 * linux-thread-db.c (thread_db_detach): Likewise.
7311 * nto-procfs.c (procfs_detach): Likewise.
7312 * procfs.c (procfs_detach): Likewise.
7313 (do_detach): Remove signo parameter.
7314 * record.c (record_detach): Remove args parameter.
7315 * record.h (record_detach): Likewise.
7316 * remote-sim.c (gdbsim_detach): Likewise.
7317 * remote.c (remote_detach_1): Likewise.
7318 (remote_detach): Likewise.
7319 (extended_remote_detach): Likewise.
7320 * sol-thread.c (sol_thread_detach): Likewise.
7321 * target-delegates.c: Re-generate.
7322 * top.c (struct qt_args) <args>: Remove field.
7323 (kill_or_detach): Don't pass args.
7324 (quit_force): Don't set args.
7325 * windows-nat.c (windows_detach): Remove args parameter.
7327 2018-01-19 Yao Qi <yao.qi@linaro.org>
7329 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7330 (arm_linux_init_abi): Install it.
7332 2018-01-19 Yao Qi <yao.qi@linaro.org>
7334 * osabi.c (gdb_osabi_names): Extend the regexp for
7335 arm-linux-gnueabihf.
7337 2018-01-18 Yao Qi <yao.qi@linaro.org>
7339 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7341 (abbrev_table::add_abbrev): Update.
7342 (abbrev_table::lookup_abbrev): Update.
7344 2018-01-18 Yao Qi <yao.qi@linaro.org>
7346 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7348 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7350 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7353 2018-01-17 Tom Tromey <tom@tromey.com>
7355 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7357 2018-01-17 Tom Tromey <tom@tromey.com>
7359 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7360 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7361 (create_array_type_with_stride): Update.
7362 * dwarf2read.c (set_die_type): Update.
7364 2018-01-17 Tom Tromey <tom@tromey.com>
7366 * dwarf2read.c (delayed_method_info): Remove typedef.
7367 (dwarf2_cu::method_info): Now a std::vector.
7368 (add_to_method_list): Update.
7369 (free_delayed_list): Remove.
7370 (compute_delayed_physnames): Update.
7371 (process_full_comp_unit, process_full_type_unit): Clear the method
7372 list. Remove cleanups.
7373 (psymtab_include_file_name): Add name_holder parameter. Use
7375 (dwarf_decode_lines): Update.
7377 2018-01-17 Tom Tromey <tom@tromey.com>
7378 Simon Marchi <simon.marchi@ericsson.com>
7380 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7381 (dwarf2_per_objfile::free_cached_comp_units)
7382 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7383 (init_cutu_and_read_dies_no_follow): Update.
7384 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7385 (dwarf2_cu::~dwarf2_cu): New.
7386 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7387 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7389 2018-01-17 Tom Tromey <tom@tromey.com>
7390 Simon Marchi <simon.marchi@ericsson.com>
7392 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7393 (struct die_reader_specs) <abbrev_table>: New member.
7394 (struct abbrev_table): Add constructor.
7395 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7396 <abbrev_obstack>: Now an auto_obstack.
7397 (abbrev_table_up): New typedef.
7398 (init_cu_die_reader): Add abbrev_table parameter.
7399 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7400 Add result_dwo_abbrev_table.
7401 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7402 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7404 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7406 (skip_children): Update.
7407 (abbrev_table::alloc_abbrev): Rename from
7408 abbrev_table_alloc_abbrev.
7409 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7410 (abbrev_table::lookup_abbrev): Rename from
7411 abbrev_table_lookup_abbrev.
7412 (abbrev_table_read_table): Return abbrev_table_up.
7413 (abbrev_table_free, abbrev_table_free_cleanup)
7414 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7415 (load_partial_dies): Update.
7417 2018-01-17 Tom Tromey <tom@tromey.com>
7419 * dwarf2read.c (dwarf2_compute_name): Update comment.
7420 (read_func_scope, read_variable): Update.
7421 (new_symbol): Remove.
7422 (new_symbol_full): Rename to new_symbol.
7424 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7427 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7428 a warning instead of throwing an error, set section size to 0 and return
7430 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7432 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7434 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7436 (linux_ptrace_attach_fail_reason_string): Likewise.
7437 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7439 (linux_ptrace_attach_fail_reason_string): Likewise.
7440 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7442 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7444 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7446 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7449 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7450 checking for fs_base/gs_base fields in struct user_regs_struct.
7451 * configure: Regenerate.
7453 2018-01-17 Yao Qi <yao.qi@linaro.org>
7455 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7457 (aarch64_linux_init_abi): Install it to gdbarch hook
7460 2018-01-15 Pedro Alves <palves@redhat.com>
7462 * common/signals-state-save-restore.c
7463 (save_original_signals_state): Fix typos.
7465 2017-01-12 Tom Tromey <tom@tromey.com>
7466 Sergio Durigan Junior <sergiodj@redhat.com>
7468 * Makefile.in (install-only): Install gdb-add-index.
7470 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7472 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7474 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7476 * infrun.c (keep_going_pass_signal): Clear step-over info when
7477 insert_breakpoints fails.
7479 2018-01-11 Pedro Alves <palves@redhat.com>
7482 * infrun.c (resume): Rename to ...
7483 (resume_1): ... this.
7484 (resume): Reimplement as wrapper around resume_1.
7486 2018-01-11 Pedro Alves <palves@redhat.com>
7489 * remote.c (remote_parse_stop_reply): Default to the last-set
7490 general thread instead of to 'magic_null_ptid'.
7492 2018-01-10 Pedro Alves <palves@redhat.com>
7494 * language.h (language_get_symbol_name_matcher): Rename ...
7495 (get_symbol_name_matcher): ... this.
7496 * language.c (language_get_symbol_name_matcher): Ditto.
7497 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7500 2018-01-10 Pedro Alves <palves@redhat.com>
7504 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7505 Adjust to use language_get_symbol_name_matcher instead of
7506 language_defn::la_get_symbol_name_matcher.
7507 * language.c (language_get_symbol_name_matcher): If in Ada mode
7508 and the lookup name is a verbatim match, return Ada's matcher.
7509 * language.h (language_get_symbol_name_matcher): Adjust comment.
7510 (ada_lookup_name_info::verbatim_p):: New method.
7512 2018-01-10 Pedro Alves <palves@redhat.com>
7515 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7516 minsym's language is language_auto or language_cplus, pass down
7517 language_ada instead.
7518 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7520 2018-01-10 Pedro Alves <palves@redhat.com>
7523 * minsyms.c (linkage_name_str): New function.
7524 (iterate_over_minimal_symbols): Use it.
7526 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7528 * NEWS: Document that 'info proc' now works on FreeBSD.
7530 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7532 * configure.ac: Check for kinfo_getfile in libutil.
7533 * configure: Regenerate.
7534 * config.in: Regenerate.
7535 * fbsd-nat.c: Include "fbsd-tdep.h".
7536 (fbsd_fetch_cmdline): New.
7537 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7538 rather than calling error.
7539 (fbsd_info_proc): New.
7540 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7541 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7542 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7544 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7546 * fbsd-nat.c (struct free_deleter): Remove.
7547 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7549 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7551 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7552 NULL for an empty pathname.
7554 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7556 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7557 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7558 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7559 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7560 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7561 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7562 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7563 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7564 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7565 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7566 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7567 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7568 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7569 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7570 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7572 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7574 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7575 (gnu_xfer_auxv): New function.
7576 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7579 2018-01-08 Yao Qi <yao.qi@linaro.org>
7580 Simon Marchi <simon.marchi@ericsson.com>
7582 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7584 (COMMON_OBS): Remove selftest.o.
7585 * configure.ac: Append selftest-arch.c and common/selftest.c to
7586 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7587 * configure: Re-generated.
7588 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7590 (maintenance_info_selftests): Likewise.
7592 2018-01-08 Xavier Roirand <roirand@adacore.com>
7594 * ada-valprint.c (val_print_packed_array_elements): Use
7595 proper number of elements when printing an array indexed
7596 by an enumeration type.
7598 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7600 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7601 (dw2_get_file_names_reader): Adjust.
7602 (lookup_dwo_signatured_type): Adjust.
7603 (lookup_dwp_signatured_type): Adjust.
7604 (lookup_signatured_type): Adjust.
7605 (create_type_unit_group): Adjust.
7606 (get_type_unit_group): Adjust.
7607 (process_psymtab_comp_unit_reader): Adjust.
7608 (build_type_psymtabs_reader): Adjust.
7609 (scan_partial_symbols): Adjust.
7610 (add_partial_symbol): Adjust.
7611 (add_partial_subprogram): Adjust.
7612 (peek_die_abbrev): Adjust.
7613 (fixup_go_packaging): Adjust.
7614 (process_imported_unit_die): Adjust.
7615 (dwarf2_compute_name): Adjust.
7616 (dwarf2_physname): Adjust.
7617 (read_import_statement): Adjust.
7618 (handle_DW_AT_stmt_list): Adjust.
7619 (read_file_scope): Adjust.
7620 (read_func_scope): Adjust.
7621 (read_lexical_block_scope): Adjust.
7622 (read_call_site_scope): Adjust.
7623 (read_variable): Adjust.
7624 (dwarf2_rnglists_process): Adjust.
7625 (dwarf2_ranges_process): Adjust.
7626 (dwarf2_ranges_read): Adjust.
7627 (dwarf2_get_pc_bounds): Adjust.
7628 (dwarf2_record_block_ranges): Adjust.
7629 (dwarf2_add_field): Adjust.
7630 (dwarf2_add_member_fn): Adjust.
7631 (read_structure_type): Adjust.
7632 (process_structure_scope): Adjust.
7633 (read_enumeration_type): Adjust.
7634 (read_array_type): Adjust.
7635 (mark_common_block_symbol_computed): Adjust.
7636 (read_common_block): Adjust.
7637 (read_namespace_type): Adjust.
7638 (read_namespace): Adjust.
7639 (read_module_type): Adjust.
7640 (read_tag_pointer_type): Adjust.
7641 (read_tag_ptr_to_member_type): Adjust.
7642 (read_tag_string_type): Adjust.
7643 (read_subroutine_type): Adjust.
7644 (read_typedef): Adjust.
7645 (read_base_type): Adjust.
7646 (attr_to_dynamic_prop): Adjust.
7647 (read_subrange_type): Adjust.
7648 (read_unspecified_type): Adjust.
7649 (dwarf2_read_abbrevs): Adjust.
7650 (load_partial_dies): Adjust.
7651 (read_partial_die): Adjust.
7652 (find_partial_die): Adjust.
7653 (guess_partial_die_structure_name): Adjust.
7654 (fixup_partial_die): Adjust.
7655 (read_attribute_value): Adjust.
7656 (read_addr_index): Adjust.
7657 (read_addr_index_from_leb128): Adjust.
7658 (read_str_index): Adjust.
7659 (dwarf2_string_attr): Adjust.
7660 (get_debug_line_section): Adjust.
7661 (dwarf_decode_line_header): Adjust.
7662 (lnp_state_machine::check_line_address): Adjust.
7663 (dwarf_decode_lines_1): Adjust.
7664 (dwarf_decode_lines): Adjust.
7665 (dwarf2_start_symtab): Adjust.
7666 (var_decode_location): Adjust.
7667 (new_symbol_full): Adjust.
7668 (dwarf2_const_value_data): Adjust.
7669 (dwarf2_const_value_attr): Adjust.
7670 (dwarf2_const_value): Adjust.
7672 (die_containing_type): Adjust.
7673 (build_error_marker_type): Adjust.
7674 (lookup_die_type): Adjust.
7675 (guess_full_die_structure_name): Adjust.
7676 (anonymous_struct_prefix): Adjust.
7677 (determine_prefix): Adjust.
7678 (dwarf2_name): Adjust.
7679 (follow_die_ref_or_sig): Adjust.
7680 (follow_die_offset): Adjust.
7681 (follow_die_ref): Adjust.
7682 (follow_die_sig_1): Adjust.
7683 (follow_die_sig): Adjust.
7684 (get_signatured_type): Adjust.
7685 (get_DW_AT_signature_type): Adjust.
7686 (decode_locdesc): Adjust.
7687 (dwarf_decode_macros): Adjust.
7688 (cu_debug_loc_section): Adjust.
7689 (fill_in_loclist_baton): Adjust.
7690 (dwarf2_symbol_mark_computed): Adjust.
7691 (init_one_comp_unit): Don't assign
7692 dwarf2_cu::dwarf2_per_objfile.
7693 (set_die_type): Adjust.
7695 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7697 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7698 <dwarf2_per_objfile>: New field.
7699 (dwarf2_per_objfile): Remove global.
7700 (get_dwarf2_per_objfile): New function.
7701 (set_dwarf2_per_objfile): New function.
7702 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7704 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7705 (read_abbrev_offset): Likewise.
7706 (read_indirect_string): Likewise.
7707 (read_indirect_line_string): Likewise.
7708 (read_indirect_string_at_offset): Likewise.
7709 (read_indirect_string_from_dwz): Likewise.
7710 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7712 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7713 (create_all_comp_units): Change objfile parameter to
7715 (create_all_type_units): Likewise.
7716 (process_queue): Add dwarf2_per_objfile parameter.
7717 (read_and_check_comp_unit_head): Likewise.
7718 (lookup_dwo_unit_in_dwp): Likewise.
7719 (get_dwp_file): Likewise.
7720 (process_cu_includes): Likewise.
7721 (struct free_dwo_file_cleanup_data): New struct.
7722 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7723 set_dwarf2_per_objfile.
7724 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7725 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7726 context, adjust calls.
7727 (dw2_instantiate_symtab): Likewise.
7728 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7729 (dw2_get_cu): Likewise.
7730 (create_cu_from_index_list): Change objfile parameter to
7732 (create_cus_from_index_list): Get dwarf2_per_objfile from
7733 context, adjust calls.
7734 (create_cus_from_index): Likewise.
7735 (create_signatured_type_table_from_index): Change objfile
7736 parameter to dwarf2_per_objfile.
7737 (create_signatured_type_table_from_debug_names): Change objfile
7738 parameter to dwarf2_per_objfile.
7739 (create_addrmap_from_index): Likewise.
7740 (create_addrmap_from_aranges): Likewise.
7741 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7742 (dw2_setup): Remove.
7743 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7745 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7746 get_dwarf2_per_objfile.
7747 (dw2_forget_cached_source_info): Likewise.
7748 (dw2_map_symtabs_matching_filename): Likewise.
7749 (struct dw2_symtab_iterator) <index>: Remove.
7750 <dwarf2_per_objfile>: New field.
7751 (dw2_symtab_iter_init): Replace index parameter with
7753 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7754 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7755 (dw2_print_stats): Likewise.
7756 (dw2_dump): Likewise.
7757 (dw2_expand_symtabs_for_function): Likewise.
7758 (dw2_expand_all_symtabs): Likewise.
7759 (dw2_expand_symtabs_with_fullname): Likewise.
7760 (dw2_expand_marked_cus): Replace index and objfile parameters
7761 with dwarf2_per_objfile.
7762 (dw_expand_symtabs_matching_file_matcher): Add
7763 dwarf2_per_objfile parameter and adjust calls.
7764 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7766 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7767 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7769 (create_cus_from_debug_names_list): Replace objfile parameter
7770 with dwarf2_per_objfile and adjust calls.
7771 (create_cus_from_debug_names): Likewise.
7772 (dwarf2_read_debug_names): Likewise.
7773 (mapped_debug_names::namei_to_name): Adjust call.
7774 (dw2_debug_names_iterator::next): Likewise.
7775 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7776 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7777 (dw2_debug_names_dump): Likewise.
7778 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7779 (dw2_debug_names_expand_symtabs_matching): Likewise.
7780 (dwarf2_initialize_objfile): Likewise.
7781 (dwarf2_build_psymtabs): Likewise.
7782 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7784 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7785 (read_and_check_comp_unit_head): Likewise.
7786 (read_abbrev_offset): Likewise.
7787 (create_debug_type_hash_table): Likewise.
7788 (create_debug_types_hash_table): Likewise.
7789 (create_all_type_units): Replace objfile parameter with
7791 (add_type_unit): Add dwarf2_per_objfile parameter.
7792 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7793 with dwarf2_per_objfile.
7794 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7795 (lookup_dwp_signatured_type): Likewise.
7796 (lookup_signatured_type): Likewise.
7797 (read_cutu_die_from_dwo): Likewise.
7798 (init_tu_and_read_dwo_dies): Likewise.
7799 (init_cutu_and_read_dies): Likewise.
7800 (init_cutu_and_read_dies_no_follow): Likewise.
7801 (allocate_type_unit_groups_table): Add objfile parameter.
7802 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7803 (get_type_unit_group): Likewise.
7804 (process_psymtab_comp_unit): Update call.
7805 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7806 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7807 (print_tu_stats): Likewise.
7808 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7810 (build_type_psymtabs): Change objfile parameter to
7812 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7813 passed in void* parameter.
7814 (process_skeletonless_type_units): Change objfile parameter to
7816 (set_partial_user): Likewise.
7817 (dwarf2_build_psymtabs_hard): Likewise.
7818 (read_comp_units_from_section): Likewise.
7819 (create_all_comp_units): Likewise.
7820 (scan_partial_symbols): Update calls.
7821 (add_partial_symbol): Likewise.
7822 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7823 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7824 (process_queue): Add dwarf2_per_objfile parameter.
7825 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7826 (compute_compunit_symtab_includes): Likewise.
7827 (process_cu_includes): Add dwarf2_per_objfile parameter.
7828 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7829 (process_full_type_unit): Likewise.
7830 (process_imported_unit_die): Update call.
7831 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7832 (read_file_scope): Likewise.
7833 (allocate_dwo_file_hash_table): Add objfile parameter.
7834 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7835 (create_cus_hash_table): Likewise.
7836 (create_dwp_hash_table): Likewise.
7837 (create_dwo_unit_in_dwp_v1): Likewise.
7838 (create_dwp_v2_section): Likewise.
7839 (create_dwo_unit_in_dwp_v2): Likewise.
7840 (lookup_dwo_unit_in_dwp): Likewise.
7841 (try_open_dwop_file): Likewise.
7842 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7843 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7844 cleanup to include a reference to dwarf2_per_objfile.
7845 (open_dwp_file): Add dwarf2_per_objfile parameter.
7846 (open_and_init_dwp_file): Likewise.
7847 (get_dwp_file): Likewise.
7848 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7849 (queue_and_load_all_dwo_tus): Update call.
7850 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7852 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7853 (dwarf2_ranges_process): Likewise.
7854 (dwarf2_get_pc_bounds): Likewise.
7855 (mark_common_block_symbol_computed): Likewise.
7856 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7857 (dwarf2_read_abbrevs): Update call.
7858 (read_partial_die): Use dwarf2_per_objfile from cu.
7859 (find_partial_die): Likewise.
7860 (fixup_partial_die): Likewise.
7861 (read_attribute_value): Likewise.
7862 (read_indirect_string_at_offset_from): Add objfile parameter.
7863 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7865 (read_indirect_string_from_dwz): Add objfile parameter.
7866 (read_indirect_string): Add objfile parameter.
7867 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7868 (read_addr_index): Use dwarf2_per_objfile from cu.
7869 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7871 (read_str_index): Use dwarf2_per_objfile from cu.
7872 (get_debug_line_section): Likewise.
7873 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7874 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7875 (new_symbol_full): Use dwarf2_per_objfile from cu.
7876 (build_error_marker_type): Likewise.
7877 (lookup_die_type): Likewise.
7878 (determine_prefix): Likewise.
7879 (follow_die_offset): Likewise.
7880 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7881 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7882 (dwarf2_fetch_die_type_sect_off): Likewise.
7883 (dwarf2_get_die_type): Likewise.
7884 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7885 (get_signatured_type): Likewise.
7886 (get_DW_AT_signature_type): Likewise.
7887 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7888 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7889 (cu_debug_loc_section): Likewise.
7890 (fill_in_loclist_baton): Likewise.
7891 (dwarf2_symbol_mark_computed): Likewise.
7892 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7894 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7896 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7897 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7898 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7899 (set_die_type): Use dwarf2_free_objfile from cu.
7900 (get_die_type_at_offset): Likewise.
7901 (dwarf2_per_objfile_free): Don't assign global variable.
7902 (debug_names) <constructor>: Add dwarf2_per_objfile
7903 parameter, update m_debugstrlookup construction.
7904 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7906 <m_dwarf2_per_objfile>: New field.
7907 <lookup>: Use m_dwarf2_per_objfile.
7908 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7909 (psyms_seen_size): Likewise.
7910 (write_gdbindex): Replace objfile parameter with
7912 (write_debug_names): Likewise.
7913 (write_psymtabs_to_index): Likewise.
7914 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7917 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7919 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7920 <dwarf2_per_objfile>: New field.
7921 (struct dwarf2_per_cu_data) <objfile>: Remove.
7922 <dwarf2_per_objfile>: New field.
7923 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7925 (create_signatured_type_table_from_index): Likewise.
7926 (create_debug_type_hash_table): Likewise.
7927 (fill_in_sig_entry_from_dwo_entry): Likewise.
7928 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7929 (create_type_unit_group): Assign dwarf2_per_objfile instead of
7931 (create_partial_symtab): Access objfile through
7933 (process_psymtab_comp_unit_reader): Likewise.
7934 (read_comp_units_from_section): Likewise.
7935 (scan_partial_symbols): Likewise.
7936 (add_partial_symbol): Likewise.
7937 (add_partial_subprogram): Likewise.
7938 (peek_die_abbrev): Likewise.
7939 (fixup_go_packaging): Likewise.
7940 (process_full_comp_unit): Likewise.
7941 (process_full_type_unit): Likewise.
7942 (process_imported_unit_die): Likewise.
7943 (dwarf2_compute_name): Likewise.
7944 (dwarf2_physname): Likewise.
7945 (read_import_statement): Likewise.
7946 (create_cus_hash_table): Assign dwarf2_physname instead of
7948 (read_func_scope): Access objfile through dwarf2_per_objfile.
7949 (read_lexical_block_scope): Likewise.
7950 (read_call_site_scope): Likewise.
7951 (read_variable): Likewise.
7952 (dwarf2_rnglists_process): Likewise.
7953 (dwarf2_ranges_process): Likewise.
7954 (dwarf2_ranges_read): Likewise.
7955 (dwarf2_record_block_ranges): Likewise.
7956 (dwarf2_add_field): Likewise.
7957 (dwarf2_add_member_fn): Likewise.
7958 (read_structure_type): Likewise.
7959 (process_structure_scope): Likewise.
7960 (read_enumeration_type): Likewise.
7961 (read_array_type): Likewise.
7962 (read_common_block): Likewise.
7963 (read_namespace_type): Likewise.
7964 (read_namespace): Likewise.
7965 (read_module_type): Likewise.
7966 (read_tag_pointer_type): Likewise.
7967 (read_tag_ptr_to_member_type): Likewise.
7968 (read_tag_string_type): Likewise.
7969 (read_subroutine_type): Likewise.
7970 (read_typedef): Likewise.
7971 (read_base_type): Likewise.
7972 (attr_to_dynamic_prop): Likewise.
7973 (read_subrange_type): Likewise.
7974 (read_unspecified_type): Likewise.
7975 (load_partial_dies): Likewise.
7976 (read_partial_die): Likewise.
7977 (find_partial_die): Likewise.
7978 (guess_partial_die_structure_name): Likewise.
7979 (fixup_partial_die): Likewise.
7980 (read_attribute_value): Likewise.
7981 (read_addr_index_from_leb128): Likewise.
7982 (dwarf2_read_addr_index): Likewise.
7983 (dwarf2_string_attr): Likewise.
7984 (lnp_state_machine::check_line_address): Likewise.
7985 (dwarf_decode_lines_1): Likewise.
7986 (dwarf_decode_lines): Likewise.
7987 (dwarf2_start_symtab): Likewise.
7988 (var_decode_location): Likewise.
7989 (new_symbol_full): Likewise.
7990 (dwarf2_const_value_data): Likewise.
7991 (dwarf2_const_value_attr): Likewise.
7992 (dwarf2_const_value): Likewise.
7993 (die_type): Likewise.
7994 (die_containing_type): Likewise.
7995 (lookup_die_type): Likewise.
7996 (guess_full_die_structure_name): Likewise.
7997 (anonymous_struct_prefix): Likewise.
7998 (dwarf2_name): Likewise.
7999 (follow_die_ref_or_sig): Likewise.
8000 (follow_die_offset): Likewise.
8001 (follow_die_ref): Likewise.
8002 (dwarf2_fetch_die_loc_sect_off): Likewise.
8003 (dwarf2_fetch_constant_bytes): Likewise.
8004 (dwarf2_fetch_die_type_sect_off): Likewise.
8005 (dwarf2_get_die_type): Likewise.
8006 (follow_die_sig): Likewise.
8007 (decode_locdesc): Likewise.
8008 (dwarf2_per_cu_objfile): Likewise.
8009 (dwarf2_per_cu_text_offset): Likewise.
8010 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8012 (set_die_type): Access objfile through
8015 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8017 * valprint.c (converted_character_d): Remove typedef.
8018 (DEF_VEC_O (converted_character_d)): Remove.
8019 (count_next_character): Use std::vector.
8020 (print_converted_chars_to_obstack): Likewise.
8021 (generic_printstr): Likewise.
8023 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8025 * xml-support.h (struct gdb_xml_value): Add constructor.
8026 <value>: Change type to unique_xmalloc_ptr.
8027 (gdb_xml_value_s): Remove typedef.
8028 (DEF_VEC_O (gdb_xml_value_s)): Remove.
8029 (gdb_xml_element_start_handler): Change parameter type to
8031 (xml_find_attribute): Likewise.
8032 * xml-support.c (xml_find_attribute): Change parameter type to
8033 std::vector and adjust.
8034 (gdb_xml_values_cleanup): Remove.
8035 (gdb_xml_parser::start_element): Adjust to std::vector.
8036 (xinclude_start_include): Change paraeter type to std::vector
8038 * btrace.c (check_xml_btrace_version): Likewise.
8039 (parse_xml_btrace_block): Likewise.
8040 (parse_xml_btrace_pt_config_cpu): Likewise.
8041 (parse_xml_btrace_pt): Likewise.
8042 (parse_xml_btrace_conf_bts): Likewise.
8043 (parse_xml_btrace_conf_pt): Likewise.
8044 * memory-map.c (memory_map_start_memory): Likewise.
8045 (memory_map_start_property): Likewise.
8046 * osdata.c (osdata_start_osdata): Likewise.
8047 (osdata_start_item): Likewise.
8048 (osdata_start_column): Likewise.
8049 * remote.c (start_thread): Likewise.
8050 * solib-aix.c (library_list_start_library): Likewise.
8051 (library_list_start_list): Likewise.
8052 * solib-svr4.c (library_list_start_library): Likewise.
8053 (svr4_library_list_start_list): Likewise.
8054 * solib-target.c (library_list_start_segment): Likewise.
8055 (library_list_start_section): Likewise.
8056 (library_list_start_library): Likewise.
8057 (library_list_start_list): Likewise.
8058 * tracepoint.c (traceframe_info_start_memory): Likewise.
8059 (traceframe_info_start_tvar): Likewise.
8060 * xml-syscall.c (syscall_start_syscall): Likewise.
8061 * xml-tdesc.c (tdesc_start_target): Likewise.
8062 (tdesc_start_feature): Likewise.
8063 (tdesc_start_reg): Likewise.
8064 (tdesc_start_union): Likewise.
8065 (tdesc_start_struct): Likewise.
8066 (tdesc_start_flags): Likewise.
8067 (tdesc_start_enum): Likewise.
8068 (tdesc_start_field): Likewise.
8069 (tdesc_start_enum_value): Likewise.
8070 (tdesc_start_vector): Likewise.
8072 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8074 * extension.h (struct xmethod_worker) <clone>: Remove.
8075 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8077 (python_xmethod_worker::clone): Remove.
8078 * valops.c (find_overload_match): Use std::move instead of
8081 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8083 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8084 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8085 <free_xmethod_worker_data>: Remove.
8086 <get_matching_xmethod_workers>: Chance VEC to std::vector.
8087 <get_xmethod_arg_types>: Remove.
8088 <get_xmethod_result_type>: Remove.
8089 <invoke_xmethod>: Remove.
8090 * extension.c (new_xmethod_worker): Remove.
8091 (clone_xmethod_worker): Remove.
8092 (get_matching_xmethod_workers): Return void, pass std::vector by
8094 (get_xmethod_arg_types): Rename to...
8095 (xmethod_worker::get_arg_types): ... this, and adjust.
8096 (get_xmethod_result_type): Rename to...
8097 (xmethod_worker::get_result_type): ... this, and adjust.
8098 (invoke_xmethod): Remove.
8099 (free_xmethod_worker): Remove.
8100 (free_xmethod_worker_vec): Remove.
8101 * extension.h (enum ext_lang_rc): Move here from
8103 (struct xmethod_worker): Add constructor and destructor.
8106 <invoke, clone, do_get_result_type, do_get_arg_types>: New
8107 virtual pure methods.
8108 <get_arg_types, get_result_type>: New methods.
8109 (xmethod_worker_ptr): Remove typedef.
8110 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8111 (xmethod_worker_vec): Remove typedef.
8112 (xmethod_worker_up): New typedef.
8113 (invoke_xmethod): Remove.
8114 (clone_xmethod_worker): Remove.
8115 (free_xmethod_worker): Remove.
8116 (free_xmethod_worker_vec): Remove.
8117 (get_xmethod_arg_types): Remove.
8118 (get_xmethod_result_type): Remove.
8119 * valops.c (find_method_list): Use std::vector, don't use
8120 intermediate vector.
8121 (value_find_oload_method_list): Use std::vector.
8122 (find_overload_match): Use std::vector.
8123 (find_oload_champ): Use std::vector.
8124 * value.c (value_free): Use operator delete.
8125 (value_of_xmethod): Rename to...
8126 (value_from_xmethod): ... this. Don't assign
8127 xmethod_worker::value, take rvalue-reference.
8128 (result_type_of_xmethod): Adjust.
8129 (call_xmethod): Adjust.
8130 * value.h: Include extension.h.
8131 (struct xmethod_worker): Don't forward-declare.
8132 (value_of_xmethod): Rename to...
8133 (value_from_xmethod): ... this, take rvalue-reference.
8134 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
8135 (struct python_xmethod_worker): ... this, add constructor and
8137 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
8138 (gdbpy_free_xmethod_worker_data): Rename to...
8139 (python_xmethod_worker::~python_xmethod_worker): ... this and
8141 (gdbpy_clone_xmethod_worker_data): Rename to...
8142 (python_xmethod_worker::clone): ... this and adjust.
8143 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
8145 (gdbpy_get_xmethod_arg_types): Rename to...
8146 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
8147 (gdbpy_get_xmethod_result_type): Rename to...
8148 (python_xmethod_worker::do_get_result_type): ... this and
8150 (gdbpy_invoke_xmethod): Rename to...
8151 (python_xmethod_worker::invoke): ... this and adjust.
8152 (new_python_xmethod_worker): Rename to...
8153 (python_xmethod_worker::python_xmethod_worker): ... this and
8155 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
8157 (gdbpy_free_xmethod_worker_data): Remove.
8158 (gdbpy_get_matching_xmethod_workers): Use std::vector.
8159 (gdbpy_get_xmethod_arg_types): Remove.
8160 (gdbpy_get_xmethod_result_type): Remove.
8161 (gdbpy_invoke_xmethod): Remove.
8162 * python/python.c (python_extension_ops): Remove obsolete
8165 2018-01-05 Pedro Alves <palves@redhat.com>
8168 * common/signals-state-save-restore.c
8169 (save_original_signals_state): New parameter 'quiet'. Warn if we
8170 find a custom handler preinstalled, instead of internal erroring.
8171 But only warn if !quiet.
8172 * common/signals-state-save-restore.h
8173 (save_original_signals_state): New parameter 'quiet'.
8174 * main.c (captured_main_1): Move save_original_signals_state call
8175 after option handling, and pass QUIET.
8177 2018-01-05 Pedro Alves <palves@redhat.com>
8179 * spu-tdep.c (spu_catch_start): Pass
8180 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8182 2018-01-05 Pedro Alves <palves@redhat.com>
8185 * ada-lang.c (literal_symbol_name_matcher): New function.
8186 (ada_get_symbol_name_matcher): Use it for
8187 symbol_name_match_type::SEARCH_NAME.
8188 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8189 it down instead of assuming symbol_name_match_type::FULL.
8190 * block.h (block_lookup_symbol): New parameter 'match_type'.
8191 * c-valprint.c (print_unpacked_pointer): Use
8192 lookup_symbol_search_name instead of lookup_symbol.
8193 * compile/compile-object-load.c (get_out_value_type): Pass down
8194 symbol_name_match_type::SEARCH_NAME.
8195 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8196 symbol_name_match_type::FULL.
8197 * cp-support.c (cp_get_symbol_name_matcher): Handle
8198 symbol_name_match_type::SEARCH_NAME.
8199 * infrun.c (insert_exception_resume_breakpoint): Use
8200 lookup_symbol_search_name.
8201 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8202 * psymtab.c (maintenance_check_psymtabs): Use
8203 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8204 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8206 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8207 if symbol_name_match_type::SEARCH_NAME.
8208 (lookup_symbol_in_language): Pass down
8209 symbol_name_match_type::FULL.
8210 (lookup_symbol_search_name): New.
8211 (lookup_language_this): Pass down
8212 symbol_name_match_type::SEARCH_NAME.
8213 (lookup_symbol_aux, lookup_local_symbol): New parameter
8214 'match_type'. Pass it down.
8215 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8216 (lookup_symbol_search_name): New declaration.
8217 (lookup_symbol_in_block): New 'match_type' parameter.
8219 2018-01-05 Pedro Alves <palves@redhat.com>
8222 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8224 (ada_lookup_symbol): Reimplement in terms of
8225 ada_lookup_symbol_list, bits factored out from
8226 ada_lookup_encoded_symbol.
8228 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8230 * ada-exp.y (write_object_renaming): When subscripting an array
8231 using a symbol as the index, pass the block in call to
8232 ada_lookup_encoded_symbol when looking that symbol up.
8234 2018-01-05 Jerome Guitton <guitton@adacore.com>
8236 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8239 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8241 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8242 the case where VALUE_LVAL (val0) is not lval_memory.
8244 2018-01-05 Xavier Roirand <roirand@adacore.com>
8246 * ada-valprint.c (print_optional_low_bound): Handle
8247 character-indexed array printing like boolean-indexed array
8250 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8252 * NEWS: Create a new section for the next release branch.
8253 Rename the section of the current branch, now that it has
8256 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8258 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8259 * version.in: Bump version to 8.1.50.DATE-git.
8261 2018-01-03 Xavier Roirand <roirand@adacore.com>
8263 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8265 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8267 (default_exception_support_info) <catch_handlers_sym>: Add field.
8268 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8269 (ada_exception_name_addr_1): Add "catch handlers" handling.
8270 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8272 (create_excep_cond_exprs) <ex>: Add parameter.
8273 (re_set_exception): Update create_excep_cond_exprs call.
8274 (print_it_exception, print_one_exception, print_mention_exception)
8275 (print_recreate_exception): Add "catch handler" handling.
8276 (allocate_location_catch_handlers, re_set_catch_handlers)
8277 (check_status_catch_handlers, print_it_catch_handlers)
8278 (print_one_catch_handlers, print_mention_catch_handlers)
8279 (print_recreate_catch_handlers): New function.
8280 (catch_handlers_breakpoint_ops): New variable.
8281 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8282 Add parameter. Add "catch handler" handling.
8283 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8284 Add "catch handler" handling.
8285 (ada_exception_catchpoint_cond_string): Add "catch handler"
8287 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8289 (catch_ada_handlers_command): New function.
8290 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8291 operations structure.
8292 (_initialize_ada_language): Add "catch handlers" command entry.
8293 * NEWS: Document "catch handlers" feature.
8295 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8297 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8298 account when creating the array type of the slice.
8299 (ada_value_slice): Likewise.
8301 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8303 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8305 (create_array_type_with_stride): Add byte_stride_prop parameter.
8306 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8307 New parameter. Update all callers in this file.
8308 (array_type_has_dynamic_stride): New function.
8309 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8310 of arrays with dynamic byte strides.
8311 * dwarf2read.c (read_array_type): Add support for dynamic
8312 DW_AT_byte_stride attributes.
8314 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8316 * dwarf2read.c (read_unspecified_type): Treat
8317 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8319 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8321 Update copyright year range in all GDB files.
8323 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8325 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8326 and gdb/testsuite/gdb.base/step-line.c.
8328 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8330 * copyright.py (main): Dump the contents of
8331 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8332 even if BY_HAND is empty.
8334 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8336 * top.c (print_gdb_version): Update Copyright year in version
8339 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8341 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8343 For older changes see ChangeLog-2017.
8349 version-control: never