1 2018-06-10 Tom Tromey <tom@tromey.com>
3 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
9 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
10 "beneath" as a method.
11 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
12 Use "beneath" as a method.
14 2018-06-10 Tom Tromey <tom@tromey.com>
16 * tracefile.c (struct trace_file_writer_deleter): New.
17 <operator()>: Rename from trace_file_writer_xfree.
18 (trace_file_writer_up): New typedef.
19 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
21 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
23 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
24 <m_registers, m_register_status>: Change type to
26 * regcache.c (reg_buffer::reg_buffer): Use new instead of
29 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
31 * common/common-regcache.h (enum register_status): Add
32 underlying type "signed char".
33 * regcache.h (reg_buffer) <m_register_status>: Change type to
35 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
36 register_status instead of signed char.
37 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
38 (reg_buffer::get_register_status): Remove cast.
39 (readable_regcache::raw_read): Remove cast.
40 (readable_regcache::cooked_read): Remove cast.
42 2018-06-09 Tom Tromey <tom@tromey.com>
44 * source.c (reverse_search_command, forward_search_command): Use
47 2018-06-09 Tom Tromey <tom@tromey.com>
49 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
50 (serial_ops_list): Now static, std::vector.
51 (serial_interface_lookup, serial_add_interface): Update.
53 2018-06-09 Tom Tromey <tom@tromey.com>
55 * dwarf2read.c (process_cu_includes): Update.
56 (process_full_comp_unit): Update.
57 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
60 2018-06-08 Paul Koning <paul_koning@dell.com>
64 * python/python.c (do_start_initialization):
65 Avoid call to internal Python API.
66 (init__gdb_module): New function.
68 2018-06-08 Gary Benson <gbenson@redhat.com>
70 * linux-thread-db.c (valprint.h): New include.
71 (struct check_thread_db_info): New structure.
72 (check_thread_db_on_load, tdb_testinfo): New static globals.
73 (check_thread_db, check_thread_db_callback): New functions.
74 (try_thread_db_load_1): Run integrity checks if requested.
75 (maintenance_check_libthread_db): New function.
76 (_initialize_thread_db): Register "maint check libthread-db"
77 and "maint set/show check-libthread-db".
78 * NEWS: Mention the above new commands.
80 2018-06-08 Tom Tromey <tom@tromey.com>
82 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
85 2018-06-08 Tom Tromey <tom@tromey.com>
87 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
89 2018-06-08 Tom Tromey <tom@tromey.com>
91 * common/btrace-common.h (struct btrace_data): Add constructor,
92 destructor, move assignment operator.
93 <empty, clear, fini>: New methods.
95 (btrace_data_init, btrace_data_fini, btrace_data_clear)
96 (btrace_data_empty): Don't declare.
97 * common/btrace-common.c (btrace_data_init): Remove.
98 (btrace_data::fini): Rename from btrace_data_fini.
99 (btrace_data::empty): Rename from btrace_data_empty.
100 (btrace_data::clear): Rename from btrace_data_clear. Return
102 * btrace.h (make_cleanup_btrace_data): Don't declare.
103 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
104 (parse_xml_btrace): Update.
105 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
106 (maint_btrace_clear_packet_history_cmd): Update.
108 2018-06-07 Pedro Alves <palves@redhat.com>
110 * target.h (target_ops) <beneath>: Now a method. All references
112 (class target_stack): New.
113 * target.c (g_target_stack): New.
114 (g_current_top_target): Delete.
115 (current_top_target): Get the top target out of g_target_stack.
116 (target_stack::push, target_stack::unpush): New.
117 (push_target, unpush_target): Reimplement.
118 (target_is_pushed): Reimplement in terms of g_target_stack.
119 (target_ops::beneath, target_stack::find_beneath): New.
121 2018-06-07 Pedro Alves <palves@redhat.com>
123 * target.h (find_target_beneath): Delete declaration.
124 * target.c (find_target_beneath): Delete definition.
125 * aix-thread.c: All callers of find_target_beneath adjusted to
126 call target_ops::beneath instead.
127 * bsd-uthread.c: Likewise.
128 * linux-thread-db.c: Likewise.
129 * ravenscar-thread.c: Likewise.
130 * sol-thread.c: Likewise.
131 * spu-multiarch.c: Likewise.
133 2018-06-07 Pedro Alves <palves@redhat.com>
135 * target.h (target_ops) <beneath>: Now a method. All references
137 (target_ops) <m_beneath>: New.
138 * target.c (target_ops::beneath): New.
139 * corelow.c: Adjust all references to target_ops::beneath.
140 * linux-thread-db.c: Likewise.
141 * make-target-delegates: Likewise.
142 * record-btrace.c: Likewise.
143 * record-full.c: Likewise.
144 * remote.c: Likewise.
145 * target.c: Likewise.
146 * target-delegates.c: Regenerate.
148 2018-06-07 Pedro Alves <palves@redhat.com>
150 * target.h (target_stack): Delete.
151 (current_top_target): Declare function.
152 * target.c (target_stack): Delete.
153 (g_current_top_target): New.
154 (current_top_target): New function.
155 * auxv.c: Use current_top_target instead of target_stack
157 * avr-tdep.c: Likewise.
158 * breakpoint.c: Likewise.
159 * corefile.c: Likewise.
160 * elfread.c: Likewise.
162 * exceptions.c: Likewise.
164 * gdbarch-selftests.c: Likewise.
165 * gnu-v3-abi.c: Likewise.
166 * ia64-tdep.c: Likewise.
167 * ia64-vms-tdep.c: Likewise.
168 * infcall.c: Likewise.
169 * infcmd.c: Likewise.
170 * infrun.c: Likewise.
171 * linespec.c: Likewise.
172 * linux-tdep.c: Likewise.
173 * minsyms.c: Likewise.
174 * ppc-linux-nat.c: Likewise.
175 * ppc-linux-tdep.c: Likewise.
176 * procfs.c: Likewise.
177 * regcache.c: Likewise.
178 * remote.c: Likewise.
179 * rs6000-tdep.c: Likewise.
180 * s390-linux-nat.c: Likewise.
181 * s390-tdep.c: Likewise.
182 * solib-aix.c: Likewise.
183 * solib-darwin.c: Likewise.
184 * solib-dsbt.c: Likewise.
185 * solib-spu.c: Likewise.
186 * solib-svr4.c: Likewise.
187 * solib-target.c: Likewise.
188 * sparc-tdep.c: Likewise.
189 * sparc64-tdep.c: Likewise.
190 * spu-tdep.c: Likewise.
191 * symfile.c: Likewise.
192 * symtab.c: Likewise.
193 * target-descriptions.c: Likewise.
194 * target-memory.c: Likewise.
195 * target.c: Likewise.
196 * target.h: Likewise.
197 * tracefile-tfile.c: Likewise.
198 * tracepoint.c: Likewise.
199 * valops.c: Likewise.
200 * valprint.c: Likewise.
202 * windows-tdep.c: Likewise.
203 * mi/mi-main.c: Likewise.
205 2018-06-07 Tom Tromey <tom@tromey.com>
207 * valprint.h (build_address_symbolic): Declare.
208 * printcmd.c (print_address_symbolic): Update.
209 (build_address_symbolic): Change "name" and "filename" to
211 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
213 * defs.h (build_address_symbolic): Remove declaration.
215 2018-06-07 Alan Hayward <alan.hayward@arm.com>
217 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
218 (aarch64_vnv_type): Add function.
219 (aarch64_pseudo_register_name): Add V regs for SVE.
220 (aarch64_pseudo_register_type): Likewise.
221 (aarch64_pseudo_register_reggroup_p): Likewise.
222 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
223 (aarch64_pseudo_read_value): Add V regs for SVE.
224 (aarch64_pseudo_write_2): Use V0 offset for SVE
225 (aarch64_pseudo_write): Add V regs for SVE.
226 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
228 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
230 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
231 (sve_vl_from_vq): Likewise.
233 2018-06-05 Tom Tromey <tom@tromey.com>
235 * cli/cli-cmds.c (show_version): Update.
236 * top.c (print_gdb_version): Add "interactive" parameter.
238 * main.c (captured_main_1): Update.
239 * top.h (print_gdb_version): Add "interactive" parameter and a
242 2018-06-05 David Malcolm <dmalcolm@redhat.com>
244 * common/enum-flags.h: Add trailing semicolon to example in
247 2018-06-05 Tom Tromey <tom@tromey.com>
250 * NEWS: Add entry about pager.
251 * utils.c (pagination_disabled_for_command): New global.
252 (prompt_for_continue): Allow "c" response to prompt.
253 (reinitialize_more_filter): Clear
254 pagination_disabled_for_command.
255 (fputs_maybe_filtered): Check pagination_disabled_for_command.
257 2018-06-04 Tom Tromey <tom@tromey.com>
259 * ada-lang.h (ada_lookup_symbol_list): Update.
260 * ada-lang.c (resolve_subexp): Update.
261 (symbols_are_identical_enums): Change type of syms. Remove nsyms
263 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
264 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
265 results parameter to std::vector.
266 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
268 * ada-exp.y (block_lookup): Update.
269 (select_possible_type_sym): Change type of syms. Remove nsyms
271 (write_var_or_type, write_name_assoc): Update.
273 2018-06-04 Joel Brobecker <brobecker@adacore.com>
275 * windows-nat.c (windows_nat_target::xfer_partial): Return
276 TARGET_XFER_E_IO if we need to delegate to the target beneath
279 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
281 * Makefile.in (config.status): Add configure.nat as a
284 2018-06-04 Tom Tromey <tom@tromey.com>
286 * cp-name-parser.y (cpname_state): Add method declarations.
287 (HANDLE_QUAL): Update.
288 (cpname_state::d_grab, cpname_state::fill_comp)
289 (cpname_state::make_operator, cpname_state::make_dtor)
290 (cpname_state::make_builtin_type, cpname_state::make_name)
291 (cpname_state::d_qualify, cpname_state::d_int_type)
292 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
293 (%union): Move earlier.
295 2018-06-04 Alan Hayward <alan.hayward@arm.com>
297 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
299 2018-06-04 Alan Hayward <alan.hayward@arm.com>
301 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
302 (aarch64_pseudo_write_1): Likewise.
303 (aarch64_pseudo_read_value): Use helper.
304 (aarch64_pseudo_write): Likewise.
306 2018-06-04 Pedro Alves <palves@redhat.com>
308 * darwin-nat.c (darwin_ops): Delete.
309 (darwin_attach_pid): Use get_native_target.
311 2018-06-04 Alan Hayward <alan.hayward@arm.com>
313 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
314 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
316 2018-06-04 Alan Hayward <alan.hayward@arm.com>
318 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
319 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
320 (aarch64_gdbarch_init): Check for SVE.
321 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
323 2018-06-04 Alan Hayward <alan.hayward@arm.com>
325 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
326 * aarch64-tdep.h (aarch64_read_description): Likewise.
327 * arch/aarch64.c (aarch64_create_target_description): Likewise.
328 * arch/aarch64.h (aarch64_create_target_description): Likewise.
329 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
330 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
331 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
333 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
335 * value.c (value_fetch_lazy_bitfield): New.
336 (value_fetch_lazy_memory): New.
337 (value_fetch_lazy_register): New.
338 (value_fetch_lazy): Factor out to smaller functions.
340 2018-06-01 Tom Tromey <tom@tromey.com>
342 * cp-name-parser.y (backslashable, represented): Now const.
344 2018-06-01 Tom Tromey <tom@tromey.com>
346 * cp-name-parser.y: Include parser-defs.h.
347 (parser_fprintf): Remove declaration.
349 2018-06-01 Tom Tromey <tom@tromey.com>
351 * cp-name-parser.y: Use %pure-parser, %lex-param, and
353 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
354 (global_result): Remove globals.
355 (struct cpname_state): New.
356 (yyparse): Don't declare.
357 (yylex, yyerror): Move declarations after %union.
358 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
359 (make_name): Add state parameter.
361 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
363 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
365 (yylex): Add lvalp, state parameters.
366 (yyerror): Add state parameter.
367 (cp_demangled_name_to_comp): Update.
369 2018-06-01 Tom Tromey <tom@tromey.com>
371 * cp-name-parser.y (parser_fprintf): Declare.
372 (GDB_YY_REMAP_PREFIX): Define.
373 Include yy-remap.h. Don't redefine yy* identifiers.
375 2018-06-01 Tom Tromey <tom@tromey.com>
377 * python/py-type.c (typy_legacy_template_argument): Update.
378 * cp-support.h (cp_demangled_name_to_comp): Update.
379 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
380 parameter to be a "std::string *".
383 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
385 * ada-lex.l: Include "diagnostics.h" instead of
386 "common/diagnostics.h".
387 * unittests/environ-selftests.c: Likewise.
388 * common/diagnostics.h: Moved to ../include.
390 2018-06-01 Joel Brobecker <brobecker@adacore.com>
392 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
393 to language_mode_manual while calling breakpoint_re_set_one.
395 2018-06-01 Tom Tromey <tom@tromey.com>
397 * valops.c (value_cast_structs, destructor_name_p): Update.
398 * symtab.c (gdb_mangle_name): Update.
399 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
401 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
402 (pascal_object_print_value_fields, pascal_object_print_value):
404 * p-typeprint.c (pascal_type_print_derivation_info): Update.
405 * linespec.c (find_methods): Update.
406 * gdbtypes.h (type_name_no_tag): Remove.
407 (type_name_or_error): Rename from type_name_no_tag_or_error.
408 * gdbtypes.c (type_name_no_tag): Remove.
409 (type_name_or_error): Rename from type_name_no_tag_or_error.
410 (lookup_struct_elt_type, check_typedef): Update.
411 * expprint.c (print_subexp_standard): Update.
412 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
413 * d-namespace.c (d_lookup_nested_symbol): Update.
414 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
415 (cp_print_class_member): Update.
416 * cp-namespace.c (cp_lookup_nested_symbol): Update.
417 * completer.c (add_struct_fields): Update.
418 * c-typeprint.c (cp_type_print_derivation_info)
419 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
421 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
422 (ada_prefer_type, ada_is_exception_sym): Update.
424 2018-06-01 Tom Tromey <tom@tromey.com>
426 * valops.c (enum_constant_from_type, value_namespace_elt)
427 (value_maybe_namespace_elt): Update.
428 * valarith.c (find_size_for_pointer_math): Update.
429 * target-descriptions.c (make_gdb_type): Update.
430 * symmisc.c (print_symbol): Update.
431 * stabsread.c (define_symbol, read_type)
432 (complain_about_struct_wipeout, add_undefined_type)
433 (cleanup_undefined_types_1): Update.
434 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
435 (rust_range_type_p, val_print_struct, rust_print_struct_def)
436 (rust_internal_print_type, rust_composite_type)
437 (rust_evaluate_funcall, rust_evaluate_subexp)
438 (rust_inclusive_range_type_p): Update.
439 * python/py-type.c (typy_get_tag): Update.
440 * p-typeprint.c (pascal_type_print_base): Update.
441 * mdebugread.c (parse_symbol, parse_type): Update.
442 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
444 * guile/scm-type.c (gdbscm_type_tag): Update.
445 * go-lang.c (sixg_string_p): Update.
446 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
448 * gdbtypes.h (struct main_type) <tag_name>: Remove.
449 (TYPE_TAG_NAME): Remove.
450 * gdbtypes.c (type_name_no_tag): Simplify.
451 (check_typedef, check_types_equal, recursive_dump_type)
452 (copy_type_recursive, arch_composite_type): Update.
453 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
454 in summary mode when needed.
455 * eval.c (evaluate_funcall): Update.
456 * dwarf2read.c (fixup_go_packaging, read_structure_type)
457 (process_structure_scope, read_enumeration_type)
458 (read_namespace_type, read_module_type, determine_prefix): Update.
459 * cp-support.c (inspect_type): Update.
460 * coffread.c (process_coff_symbol, decode_base_type): Update.
461 * c-varobj.c (c_is_path_expr_parent): Update.
462 * c-typeprint.c (c_type_print_base_struct_union): Update.
463 (c_type_print_base_1): Update. Print struct/class/union/enum in
464 summary when using C language.
465 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
466 (gen_maybe_namespace_elt): Update.
467 * ada-lang.c (ada_type_name): Simplify.
468 (empty_record, ada_template_to_fixed_record_type_1)
469 (template_to_static_fixed_type)
470 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
472 2018-06-01 Tom Tromey <tom@tromey.com>
474 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
476 * c-typeprint.c (c_print_type_1): Add "language" parameter.
477 (c_print_type): Update.
478 (c_print_type): New overload.
479 (c_type_print_varspec_prefix, c_type_print_args)
480 (c_type_print_varspec_suffix, c_print_type_no_offsets)
481 (c_type_print_base_struct_union, c_type_print_base_1)
482 (cp_type_print_method_args): Add "language" parameter.
483 (c_type_print_base): Update.
484 * c-lang.h (c_print_type): Add new overload.
486 2018-06-01 Tom Tromey <tom@tromey.com>
488 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
489 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
491 2018-06-01 Alan Hayward <alan.hayward@arm.com>
493 * aarch64-tdep.c (aarch64_sve_register_names): New const
495 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
496 (AARCH64_SVE_Z_REGS_NUM): New define.
497 (AARCH64_SVE_P_REGS_NUM): Likewise.
498 (AARCH64_SVE_NUM_REGS): Likewise.
500 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
502 * nat/linux-ptrace.h [__alpha__]
503 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
506 2018-05-31 Maciej W. Rozycki <macro@mips.com>
508 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
509 the endianness selected.
510 * NEWS: Document `set endian auto' mode operation update.
512 2018-05-31 Alan Hayward <alan.hayward@arm.com>
514 * Makefile.in: Add new header.
515 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
516 (sve_vl_from_vg): Likewise.
517 (sve_vq_from_vl): Likewise.
518 (sve_vl_from_vq): Likewise.
519 (sve_vq_from_vg): Likewise.
520 (sve_vg_from_vq): Likewise.
521 * configure.nat: Add new c file.
522 * nat/aarch64-sve-linux-ptrace.c: New file.
523 * nat/aarch64-sve-linux-ptrace.h: New file.
525 2018-05-31 Alan Hayward <alan.hayward@arm.com>
527 * aarch64-linux-nat.c (aarch64_linux_read_description):
529 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
531 * aarch64-tdep.c (tdesc_aarch64_list): Add.
532 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
533 (aarch64_gdbarch_init): Add parmeter zero.
534 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
535 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
536 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
538 * doc/gdb.texinfo: Describe SVE feature
539 * features/aarch64-sve.c: New file.
541 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
544 * gdbarch.sh (significant_addr_bit): Default to zero when
545 not set by target architecture.
546 * gdbarch.c: Re-generated.
547 * utils.c (address_significant): Update.
549 2018-05-30 Joel Brobecker <brobecker@adacore.com>
551 * stack.c (func_command): Remove trailing newline in call to error.
553 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
555 * regcache.h (regcache_raw_collect): Remove, update callers to
556 use regcache::raw_collect.
557 * regcache.c (regcache_raw_collect): Remove.
559 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
561 * regcache.h (regcache_raw_supply): Remove, update callers to
562 use detached_regcache::raw_supply.
563 * regcache.c (regcache_raw_supply): Remove.
565 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
567 * regcache.h (regcache_cooked_write_part): Remove, update
568 callers to use regcache::cooked_write_part.
569 * regcache.c (regcache_cooked_write_part): Remove.
571 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
573 * regcache.h (regcache_cooked_read_part): Remove, update callers
574 to use readable_regcache::cooked_read_part.
575 * regcache.c (regcache_cooked_read_part): Remove.
577 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
579 * regcache.h (regcache_cooked_read_value): Remove, update
580 callers to use readable_regcache::cooked_read_value.
581 * regcache.c (regcache_cooked_read_value): Remove.
583 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
585 * regcache.h (regcache_cooked_write): Remove, update callers to
586 use regcache::cooked_write.
587 * regcache.c (regcache_cooked_write): Remove.
589 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
591 * regcache.h (regcache_invalidate): Remove, update callers to
592 use detached_regcache::invalidate instead.
593 * regcache.c (regcache_invalidate): Remove.
595 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
597 * regcache.h (regcache_raw_write_part): Remove, update callers
598 to use regcache::raw_write_part instead.
599 * regcache.c (regcache_raw_write_part): Remove.
601 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
603 * regcache.h (regcache_raw_read_part): Remove, update callers to
604 use readable_regcache::raw_read_part instead.
605 * regcache.c (regcache_raw_read_part): Remove.
607 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
609 * regcache.h (regcache_cooked_read): Remove, update callers to
610 use readable_regcache::cooked_read instead.
611 * regcache.c (regcache_cooked_read): Remove.
613 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
615 * regcache.h (regcache_raw_write): Remove, update callers to use
616 regcache::raw_write instead.
617 * regcache.c (regcache_raw_write): Remove.
619 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
621 * regcache.h (regcache_raw_read): Remove, update callers to use
622 readable_regcache::raw_read instead.
623 * regcache.c (regcache_raw_read): Remove.
625 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
627 * regcache.h (regcache_raw_update): Remove, update callers to
628 use readable_regcache::raw_update instead.
629 * regcache.c (regcache_raw_update): Remove.
631 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
633 * regcache.h (regcache_register_status): Remove, update callers
634 to use reg_buffer::get_register_status directly instead.
635 * regcache.c (regcache_register_status): Remove.
637 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
639 * regcache.h (regcache_get_ptid): Remove, update all callers to
640 call regcache::ptid instead.
641 * regcache.c (regcache_get_ptid): Remove.
643 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
645 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
647 2018-05-30 Pedro Alves <palves@redhat.com>
649 * common/common-exceptions.h (exception_rethrow): Use
652 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
654 * breakpoint.c (print_solib_event, check_status_catch_solib):
655 Remove struct keyword in range-based for loops.
656 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
657 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
659 * linespec.c (find_superclass_methods, search_minsyms_for_name):
661 * symfile.c (addr_info_make_relative): Likewise.
662 * thread.c (value_in_thread_stack_temporaries): Likewise.
664 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
666 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
667 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
668 * coff-pe-read.c (add_pe_forwarded_sym): Replace
669 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
670 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
671 * jit.c (jit_breakpoint_re_set_internal): Likewise.
672 * printcmd.c (info_address_command): Likewise.
674 2018-05-29 Tom Tromey <tom@tromey.com>
676 * windows-nat.c (handle_exception): Update fall-through comment.
678 2018-05-29 Tom Tromey <tom@tromey.com>
680 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
681 (struct program_space) <added_solibs>: Now a std::vector.
682 * breakpoint.c (print_solib_event): Update.
683 (check_status_catch_solib): Update.
684 * progspace.c (clear_program_space_solib_cache): Update.
685 * solib.c (update_solib_list): Update.
687 2018-05-29 Tom Tromey <tom@tromey.com>
689 * python/py-type.c (typy_richcompare): Update.
690 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
691 * gdbtypes.h (types_deeply_equal): Return bool.
692 (types_equal): Likewise.
693 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
695 (check_types_equal): Change worklist to std::vector. Return
697 (struct type_equality_entry): Add constructor.
698 (compare_maybe_null_strings): Return bool.
699 (check_types_worklist): Return bool. Change worklist to
701 (types_deeply_equal): Use std::vector.
702 (types_equal): Return bool.
703 (compare_maybe_null_strings): Simplify.
705 2018-05-29 Tom Tromey <tom@tromey.com>
707 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
709 2018-05-29 Tom Tromey <tom@tromey.com>
711 * objc-lang.h: Don't include cp-support.h.
712 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
715 2018-05-27 Tom Tromey <tom@tromey.com>
717 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
719 2018-05-25 Tom Tromey <tom@tromey.com>
721 * value.c (value::location): Initialize.
723 2018-05-25 Tom Tromey <tom@tromey.com>
725 * dbxread.c (init_bincl_list): Remove.
726 (bincl_list): Now a std::vector.
727 (bincls_allocated, next_bincl): Remove.
728 (free_bincl_list, do_free_bincl_list_cleanup)
729 (make_cleanup_free_bincl_list): Remove.
730 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
732 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
733 (struct header_file_location): Add constructor.
734 (add_bincl_to_list): Remove.
736 2018-05-25 Tom Tromey <tom@tromey.com>
738 * tui/tui.c (tui_enable): Update.
739 * mi/mi-interp.c (mi_interp::init): Update.
740 * interps.h (class interp) <name>: New method.
741 <m_name>: Rename from name.
742 (~scoped_restore_interp): Update.
743 * interps.c (interp::interp): Update.
744 (interp_add, interp_set, interp_lookup_existing)
745 (current_interp_named_p): Update.
747 2018-05-25 Tom Tromey <tom@tromey.com>
749 * interps.c (interp_name): Remove.
750 * mi/mi-interp.c (mi_interp::init): Update.
751 * interps.h (interp_name): Remove.
752 (~scoped_restore_interp): Update.
753 * tui/tui.c (tui_enable): Update.
755 2018-05-25 Tom Tromey <tom@tromey.com>
757 * utils.c (fputs_maybe_filtered): Update.
758 * linespec.c (decode_line_full): Update.
759 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
760 (mi_print_breakpoint_for_event, mi_solib_loaded)
761 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
762 (mi_user_selected_context_changed): Update.
763 * mi/mi-main.c (mi_execute_command): Update.
764 * cli/cli-script.c (execute_control_command): Update.
765 * python/python.c (execute_gdb_command): Update.
766 * solib.c (info_sharedlibrary_command): Update.
767 * interps.c (interp_ui_out): Remove.
768 * interps.h (interp_ui_out): Remove.
770 2018-05-25 Tom Tromey <tom@tromey.com>
772 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
773 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
774 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
776 2018-05-25 Tom Tromey <tom@tromey.com>
778 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
779 * interps.c (interp_exec): Use scoped_restore.
781 2018-05-25 Tom Tromey <tom@tromey.com>
783 * remote.c (remote_target::remote_file_get): Use
785 (remote_target::remote_file_put): Likewise.
787 2018-05-25 Tom Tromey <tom@tromey.com>
789 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
791 (get_pe_section_index, add_pe_exported_sym): Update.
792 (read_pe_exported_syms): Use gdb::def_vector.
794 2018-05-25 Tom Tromey <tom@tromey.com>
796 * frame.c (remove_prev_frame): Remove.
797 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
799 2018-05-25 Maciej W. Rozycki <macro@mips.com>
801 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
803 * mips-linux-nat.c (supply_fpregset): Always call
804 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
805 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
806 `mips_fill_fpregset'.
807 * mips-linux-tdep.c (mips_supply_fpregset)
808 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
809 (mips_fill_fpregset_wrapper): Remove functions.
810 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
811 (mips_linux_fpregset): Remove variable.
812 (mips_linux_iterate_over_regset_sections): Use
813 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
814 (mips_linux_o32_sigframe_init): Remove comment.
816 2018-05-25 Pedro Alves <palves@redhat.com>
818 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
819 (struct readahead_cache, struct packet_reg, struct
820 remote_arch_state, class remote_state): Move higher up in the
822 (remote_target::m_remote_state): Now an object instead of a pointer.
823 (remote_target::get_remote_state): Adjust.
825 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
827 * stack.c (select_and_print_frame): Delete.
828 (struct function_bounds): Move struct within function.
829 (func_command): Most content moved into new function
830 find_frame_for_function, use new function, print result, add
832 (find_frame_for_function): New function, now returns a result.
834 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
836 * stack.c (iterate_over_block_arg_vars): Fix comment.
837 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
839 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
843 (scoped_restore_selected_frame::scoped_restore_selected_frame):
845 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
847 * frame.h (class scoped_restore_selected_frame): New class.
848 * stack.c (print_frame_local_vars): Remove catching and rethrowing
849 of any exception, use scoped_restore_selected_frame to restore the
852 2018-05-24 Pedro Alves <palves@redhat.com>
854 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
857 2018-05-23 Tom Tromey <tom@tromey.com>
859 * complaints.c (struct complaints): Remove.
860 (symfile_complaint_book): Remove.
861 (series): New global.
862 (complaint_internal): Update.
863 (clear_complaints): Update.
865 2018-05-23 Tom Tromey <tom@tromey.com>
867 * complaints.c (counters): New global.
868 (struct complain): Remove.
869 (struct complaints) <root>: Remove.
870 (complaint_sentinel): Remove.
871 (symfile_complaint_book): Update.
872 (find_complaint) Remove.
873 (complaint_internal, clear_complaints): Update.
875 2018-05-23 Tom Tromey <tom@tromey.com>
877 * complaints.c (struct complain) <file, line>: Remove.
878 (find_complaint): Remove file, line parameters.
879 (complaint_internal): Update.
881 2018-05-23 Tom Tromey <tom@tromey.com>
883 * complaints.c (vcomplaint): Remove.
884 (complaint_internal) Merge in contents of vcomplaint.
886 2018-05-23 Tom Tromey <tom@tromey.com>
888 * complaints.c (struct complaints) <explanation>: Remove.
889 (symfile_explanations): Remove.
890 (symfile_complaint_book): Update.
891 (vcomplaint): Update.
892 (struct explanation): Remove.
894 2018-05-23 Tom Tromey <tom@tromey.com>
896 * complaints.c (symfile_complaints): Remove.
897 (complaint_internal): Remove "complaints" parameter.
898 (clear_complaints, vcomplaint): Remove "c" parameter.
899 (get_complaints): Remove.
900 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
901 (dwarf2_debug_line_missing_file_complaint)
902 (dwarf2_debug_line_missing_end_sequence_complaint)
903 (dwarf2_complex_location_expr_complaint)
904 (dwarf2_const_value_length_mismatch_complaint)
905 (dwarf2_section_buffer_overflow_complaint)
906 (dwarf2_macro_malformed_definition_complaint)
907 (dwarf2_invalid_attrib_class_complaint)
908 (create_addrmap_from_index, dw2_symtab_iter_next)
909 (dw2_expand_marked_cus)
910 (dw2_debug_names_iterator::find_vec_in_debug_names)
911 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
912 (create_debug_type_hash_table, init_cutu_and_read_dies)
913 (partial_die_parent_scope, add_partial_enumeration)
914 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
915 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
916 (read_import_statement, read_file_scope, create_dwo_cu_reader)
917 (create_cus_hash_table, create_dwp_hash_table)
918 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
919 (dwarf2_rnglists_process, dwarf2_ranges_process)
920 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
921 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
922 (handle_struct_member_die, process_structure_scope)
923 (read_array_type, read_common_block, read_module_type)
924 (read_tag_pointer_type, read_typedef, read_base_type)
925 (read_subrange_type, load_partial_dies, partial_die_info::read)
926 (partial_die_info::read, partial_die_info::read)
927 (partial_die_info::read, read_checked_initial_length_and_offset)
928 (dwarf2_string_attr, read_formatted_entries)
929 (dwarf_decode_line_header)
930 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
931 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
932 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
933 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
934 (get_signatured_type, get_DW_AT_signature_type)
935 (decode_locdesc, file_file_name, consume_improper_spaces)
936 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
937 (dwarf_decode_macro_bytes, dwarf_decode_macros)
938 (dwarf2_symbol_mark_computed, set_die_type)
939 (read_attribute_value): Update.
940 * stap-probe.c (handle_stap_probe, get_stap_base_address):
942 * dbxread.c (unknown_symtype_complaint)
943 (lbrac_mismatch_complaint, repeated_header_complaint)
944 (set_namestring, function_outside_compilation_unit_complaint)
945 (read_dbx_symtab, process_one_symbol): Update.
946 * gdbtypes.c (stub_noname_complaint): Update.
947 * windows-nat.c (handle_unload_dll): Update.
948 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
949 (decode_base_type): Update.
950 * xcoffread.c (bf_notfound_complaint, ef_complaint)
951 (eb_complaint, record_include_begin, record_include_end)
952 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
953 (process_xcoff_symbol, read_symbol)
954 (function_outside_compilation_unit_complaint)
955 (scan_xcoff_symtab): Update.
956 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
957 * buildsym.c (finish_block_internal, make_blockvector)
958 (end_symtab_get_static_block, augment_type_symtab): Update.
959 * dtrace-probe.c (dtrace_process_dof)
960 (dtrace_static_probe_ops::get_probes): Update.
961 * complaints.h (struct complaint): Don't declare.
962 (symfile_complaints): Remove.
963 (complaint_internal): Remove "complaints" parameter.
964 (complaint): Likewise.
965 (clear_complaints): Likewise.
966 * symfile.c (syms_from_objfile_1, finish_new_objfile)
967 (reread_symbols): Update.
968 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
969 (dwarf2_frame_cache, decode_frame_entry): Update.
970 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
971 * objc-lang.c (lookup_objc_class, lookup_child_selector)
972 (info_selectors_command): Update.
973 * macrotab.c (macro_include, check_for_redefinition)
974 (macro_undef): Update.
975 * objfiles.c (filter_overlapping_sections): Update.
976 * stabsread.c (invalid_cpp_abbrev_complaint)
977 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
978 (define_symbol, error_type, read_type, rs6000_builtin_type)
979 (stabs_method_name_from_physname, read_member_functions)
980 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
981 (attach_fields_to_type, complain_about_struct_wipeout)
982 (read_range_type, read_args, common_block_start)
983 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
985 * mdebugread.c (index_complaint, unknown_ext_complaint)
986 (basic_type_complaint, bad_tag_guess_complaint)
987 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
988 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
989 (parse_procedure, parse_lines)
990 (function_outside_compilation_unit_complaint)
991 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
992 (bad_tag_guess_complaint, reg_value_complaint): Update.
993 * cp-support.c (demangled_name_complaint): Update.
994 * macroscope.c (sal_macro_scope): Update.
995 * dwarf-index-write.c (class debug_names): Update.
997 2018-05-23 Tom Tromey <tom@tromey.com>
999 * complaints.c (clear_complaints): Remove "noisy" parameter.
1000 * complaints.h (clear_complaints): Update.
1001 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1002 (reread_symbols): Update.
1004 2018-05-23 Tom Tromey <tom@tromey.com>
1006 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1008 (vcomplaint, clear_complaints): Update.
1009 (symfile_explanations): Remove some messages.
1011 2018-05-23 Tom Tromey <tom@tromey.com>
1013 * complaints.c (internal_complaint): Remove.
1014 * complaints.h (internal_complaint): Remove.
1016 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1018 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1020 2018-05-22 Pedro Alves <palves@redhat.com>
1022 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1023 (remote_fileio_badfd, remote_fileio_return_errno)
1024 (remote_fileio_return_success, remote_fileio_func_open)
1025 (remote_fileio_func_open, remote_fileio_func_close)
1026 (remote_fileio_func_read, remote_fileio_func_write)
1027 (remote_fileio_func_lseek, remote_fileio_func_rename)
1028 (remote_fileio_func_unlink, remote_fileio_func_stat)
1029 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1030 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1031 remote_target parameter.
1032 (remote_fio_func_map) <func>: Add remote_target parameter.
1033 (do_remote_fileio_request, remote_fileio_request):
1034 * remote-fileio.h (remote_fileio_request):
1035 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1036 remote_target parameter.
1037 (remote_notif_process, handle_notification): Adjust to pass down
1039 (remote_notif_state_allocate): Add remote_target parameter. Save
1041 * remote-notif.h (struct remote_target): Forward declare.
1042 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1043 remote_target parameter.
1044 (struct remote_notif_state) <remote>: New field.
1045 (remote_notif_ack, remote_notif_parse): Add remote_target
1047 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1048 remote_target parameter.
1049 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1050 (threads_listing_context, rmt_thread_action, protocol_feature)
1051 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1052 (packet_result, struct threads_listing_context, remote_state):
1053 Move definitions and declarations higher up.
1054 (remote_target) <~remote_target>: Declare.
1055 (remote_download_command_source, remote_file_put, remote_file_get)
1056 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1057 (remote_hostio_pread_vFile, remote_hostio_send_command)
1058 (remote_hostio_set_filesystem, remote_hostio_open)
1059 (remote_hostio_close, remote_hostio_unlink, remote_state)
1060 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1061 (get_memory_write_packet_size, get_memory_read_packet_size)
1062 (append_pending_thread_resumptions, remote_detach_1)
1063 (append_resumption, remote_resume_with_vcont)
1064 (add_current_inferior_and_thread, wait_ns, wait_as)
1065 (process_stop_reply, remote_notice_new_inferior)
1066 (process_initial_stop_replies, remote_add_thread)
1067 (btrace_sync_conf, remote_btrace_maybe_reopen)
1068 (remove_new_fork_children, kill_new_fork_children)
1069 (discard_pending_stop_replies, stop_reply_queue_length)
1070 (check_pending_events_prevent_wildcard_vcont)
1071 (discard_pending_stop_replies_in_queue, stop_reply)
1072 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1073 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1074 (remote_interrupt_as, remote_interrupt_ns)
1075 (remote_get_noisy_reply, remote_query_attached)
1076 (remote_add_inferior, remote_current_thread, get_current_thread)
1077 (set_thread, set_general_thread, set_continue_thread)
1078 (set_general_process, write_ptid)
1079 (remote_unpack_thread_info_response, remote_get_threadinfo)
1080 (parse_threadlist_response, remote_get_threadlist)
1081 (remote_threadlist_iterator, remote_get_threads_with_ql)
1082 (remote_get_threads_with_qxfer)
1083 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
1084 (get_offsets, remote_check_symbols, remote_supported_packet)
1085 (remote_query_supported, remote_packet_size)
1086 (remote_serial_quit_handler, remote_detach_pid)
1087 (remote_vcont_probe, remote_resume_with_hc)
1088 (send_interrupt_sequence, interrupt_query)
1089 (remote_notif_get_pending_events, fetch_register_using_p)
1090 (send_g_packet, process_g_packet, fetch_registers_using_g)
1091 (store_register_using_P, store_registers_using_G)
1092 (set_remote_traceframe, check_binary_download)
1093 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
1094 (remote_xfer_live_readonly_partial, remote_read_bytes)
1095 (remote_send_printf, remote_flash_write, readchar)
1096 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
1097 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
1098 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
1099 (extended_remote_disable_randomization, extended_remote_run)
1100 (send_environment_packet, extended_remote_environment_support)
1101 (extended_remote_set_inferior_cwd, remote_write_qxfer)
1102 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
1103 (packet_command): Now methods of ...
1104 (remote_target): ... this class.
1105 (m_remote_state) <remote_target>: New field.
1106 (struct remote_state) <stop_reply_queue,
1107 remote_async_inferior_event_token, wait_forever_enabled_p>: New
1109 (remote_state::remote_state): Allocate stop_reply_queue.
1110 (remote_state): Delete global.
1111 (get_remote_state_raw): Delete.
1112 (remote_target::get_remote_state): Allocate m_remote_state on
1114 (get_current_remote_target): New.
1115 (remote_ops, extended_remote_ops): Delete.
1116 (wait_forever_enabled_p, remote_async_inferior_event_token):
1117 Delete, moved to struct remote_state.
1118 (remote_target::close): Delete self. Destruction bits split to
1120 (remote_target::~remote_target): ... this.
1121 (show_memory_packet_size): Adjust to use
1122 get_current_remote_target.
1123 (struct protocol_feature) <func>: Add remote_target parameter.
1124 All callers adjusted.
1125 (curr_quit_handler_target): New.
1126 (remote_serial_quit_handler): Reimplement.
1127 (remote_target::open_1): Adjust to use get_current_remote_target.
1128 Heap-allocate remote_target/extended_remote_target instances.
1129 (vcont_builder::vcont_builder): Add remote_target parameter, and
1130 save it in m_remote. All callers adjusted.
1131 (vcont_builder::m_remote): New field.
1132 (vcont_builder::restart, vcont_builder::flush)
1133 (vcont_builder::push_action): Use it.
1134 (remote_target::commit_resume): Use it.
1135 (struct queue_iter_param) <remote>: New field.
1136 (remote_target::remove_new_fork_children): Fill in 'remote' field.
1137 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1138 (check_pending_event_prevents_wildcard_vcont_callback)
1139 (remote_target::check_pending_events_prevent_wildcard_vcont)
1140 (remote_target::discard_pending_stop_replies)
1141 (remote_target::discard_pending_stop_replies_in_queue)
1142 (remote_target::remote_notif_remove_queued_reply): Fill in
1144 (remote_notif_get_pending_events): New.
1145 (remote_target::readchar, remote_target::remote_serial_write):
1146 Save/restore curr_quit_handler_target.
1148 (kill_new_fork_children): Fill in 'remote' field.
1149 (packet_command): Use get_current_remote_target, defer to
1150 remote_target method of same name.
1151 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1152 parameter, and save it in m_remote. All callers adjusted.
1153 (scoped_remote_fd::release): Use m_remote.
1154 (scoped_remote_fd::m_remote): New field.
1155 (remote_file_put, remote_file_get, remote_file_delete): Use
1156 get_current_remote_target, defer to remote_target method of same
1158 (remote_btrace_reset): Add remote_state paremeter. Update all
1160 (remote_async_inferior_event_handler). Pass down 'data'.
1161 (remote_new_objfile): Use get_current_remote_target.
1162 (remote_target::vcont_r_supported): New.
1163 (set_range_stepping): Use get_current_remote_target and
1164 remote_target::vcont_r_supported.
1165 (_initialize_remote): Don't allocate 'remote_state' and
1166 'stop_reply_queue' globals.
1167 * remote.h (struct remote_target): Forward declare.
1168 (getpkt, putpkt, remote_notif_get_pending_events): Add
1169 'remote_target' parameter.
1171 2018-05-22 Pedro Alves <palves@redhat.com>
1173 * remote.c (vcont_builder): Now a class. Make all data members
1175 (vcont_builder) <vcont_builder, restart, flush, push_action>:
1177 (vcont_builder_restart): Rename to ...
1178 (vcont_builder::restart): ... this.
1179 (vcont_builder_flush): Rename to ...
1180 (vcont_builder::flush): ... this.
1181 (vcont_builder_push_action): Rename to ...
1182 (vcont_builder::push_action): ... this.
1183 (remote_target::commit_resume): Adjust.
1185 2018-05-22 Pedro Alves <palves@redhat.com>
1187 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1188 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1189 (get_fixed_memory_packet_size): New.
1190 (get_memory_packet_size): Use it.
1191 (set_memory_packet_size): Don't override the config size with
1192 DEFAULT_MAX_MEMORY_PACKET_SIZE.
1193 (show_memory_packet_size): Use get_fixed_memory_packet_size.
1194 Don't refer to get_memory_packet_size if not connected to a remote
1195 target. Show "(default)" if configured size is 0.
1197 2018-05-22 Pedro Alves <palves@redhat.com>
1199 * remote.c (remote_target::mourn_inferior): Move
1200 discard_pending_stop_replies call here from ...
1201 (_initialize_remote): ... here.
1203 2018-05-22 Pedro Alves <palves@redhat.com>
1205 * remote.c (compare_section_command): Remove set_general_process
1208 2018-05-22 Pedro Alves <palves@redhat.com>
1210 * remote.c (struct packet_reg, struct remote_arch_state):
1211 Move higher up in the file.
1212 (remote_state) <m_arch_states>: Store remote_arch_state values
1213 instead of remote_arch_state pointers.
1214 (remote_state::get_remote_arch_state): Adjust.
1216 2018-05-22 Pedro Alves <palves@redhat.com>
1218 * remote.c: Include <unordered_map>.
1219 (remote_state): Now a class.
1220 (remote_state) <get_remote_arch_state>: Declare method.
1221 <get_remote_arch_state>: New field.
1222 (remote_arch_state) <remote_arch_state>: Declare ctor.
1223 <regs>: Now a unique_ptr.
1224 (remote_gdbarch_data_handle): Delete.
1225 (get_remote_arch_state): Delete.
1226 (remote_state::get_remote_arch_state): New.
1227 (get_remote_state): Adjust to call remote_state's
1228 get_remote_arch_state method.
1229 (init_remote_state): Delete, bits factored out to ...
1230 (remote_arch_state::remote_arch_state): ... this new method.
1231 (get_remote_packet_size, get_memory_packet_size)
1232 (process_g_packet, remote_target::fetch_registers)
1233 (remote_target::prepare_to_store, store_registers_using_G)
1234 (remote_target::store_registers, remote_target::get_trace_status):
1235 Adjust to call remote_state's method.
1236 (_initialize_remote): Remove reference to
1237 remote_gdbarch_data_handle.
1239 2018-05-22 Pedro Alves <palves@redhat.com>
1241 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
1242 pread>: New method declarations.
1243 (remote_target::open_1): Adjust.
1244 (readahead_cache_invalidate): Rename to ...
1245 (readahead_cache::invalidate): ... this, and adjust to be a class
1247 (readahead_cache_invalidate_fd): Rename to ...
1248 (readahead_cache::invalidate_fd): ... this, and adjust to be a
1250 (remote_hostio_pwrite): Adjust.
1251 (remote_hostio_pread_from_cache): Rename to ...
1252 (readahead_cache::pread): ... this, and adjust to be a class
1254 (remote_hostio_close): Adjust.
1256 2018-05-22 Pedro Alves <palves@redhat.com>
1258 * remote.c (remote_hostio_close_cleanup): Delete.
1259 (class scoped_remote_fd): New.
1260 (remote_file_put, remote_file_get): Use it.
1262 2018-05-22 Pedro Alves <palves@redhat.com>
1264 (struct vCont_action_support): Use bool and initialize all fields.
1265 (struct readahead_cache): Initialize all fields.
1266 (remote_state): Use bool and initialize all fields.
1267 (remote_state::remote_state, remote_state::~remote_state): New.
1268 (new_remote_state): Delete.
1269 (_initialize_remote): Use new to allocate remote_state.
1271 2018-05-22 Pedro Alves <palves@redhat.com>
1275 * c-exp.y: Include "c-support.h".
1276 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
1277 of tolower. Use c_ident_is_alpha to scan names.
1278 * c-lang.c: Include "c-support.h".
1279 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1280 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1281 * c-support.h: New file, with bits factored out from ...
1282 * cp-name-parser.y: ... this file.
1283 Include "c-support.h".
1284 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1285 c-support.h and renamed.
1286 (symbol_end, yylex): Adjust.
1288 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1290 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1291 parameter type to CORE_ADDR.
1292 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1293 parameter type in declaration to CORE_ADDR.
1294 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1295 target_auxv_search to get AT_HWCAP and use the result to get the
1297 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1298 to CORE_ADDR. Remove the cast of the return value to unsigned
1299 long. Fix error predicate of target_auxv_search.
1300 (ppc_linux_nat_target::read_description): Change the type of the
1301 hwcap variable to CORE_ADDR.
1303 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1305 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1306 if the size of fpscr is larger than 32 bits.
1308 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1310 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1311 (ppc32_linux_vsxregmap): New global.
1312 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1313 regcache_supply_regset, and regcache_collect_regset.
1314 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1315 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1316 (fetch_vsx_register, store_vsx_register): Remove.
1317 (fetch_vsx_registers): Add regno parameter. Get regset using
1318 ppc_linux_vsxregset. Use regset to supply registers.
1319 (store_vsx_registers): Add regno parameter. Get regset using
1320 ppc_linux_vsxregset. Use regset to collect registers.
1321 (fetch_register): Call fetch_vsx_registers instead of
1323 (store_register): Call store_vsx_registers instead of
1325 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1326 new regno parameter.
1327 (store_ppc_registers): Call store_vsx_registers with -1 for the
1328 new regno parameter.
1329 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1330 (ppc_collect_vsxregset): Remove.
1332 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1334 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1336 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1337 for vector register offset fields.
1338 (ppc64_fbsd_reg_offsets): Likewise.
1339 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1340 to vector register offset fields.
1341 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1342 to vector register offset fields.
1343 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1344 vector register offset fields.
1345 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1346 initializers for vector register offset fields.
1347 (rs6000_aix64_reg_offsets): Likewise.
1348 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1349 (ppc_supply_vrregset): Remove.
1350 (ppc_collect_vrregset): Remove.
1351 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1352 (ppc_linux_vrregset) : New function.
1353 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1354 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1355 (ppc32_linux_vrregset): Remove.
1356 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1357 and use result instead of ppc32_linux_vrregset.
1358 (ppc32_linux_reg_offsets): Remove initializers for vector register
1360 (ppc64_linux_reg_offsets): Likewise.
1361 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1362 * ppc-linux-nat.c: Include regset.h.
1363 (gdb_vrregset_t): Adjust comment to account for little-endian
1365 (supply_vrregset, fill_vrregset): Remove.
1366 (fetch_altivec_register, store_altivec_register): Remove.
1367 (fetch_altivec_registers): Add regno parameter. Get regset using
1368 ppc_linux_vrregset. Use regset to supply registers.
1369 (store_altivec_registers): Add regno parameter. Get regset using
1370 ppc_linux_vrregset. Use regset to collect registers.
1371 (fetch_register): Call fetch_altivec_registers instead of
1372 fetch_altivec_register.
1373 (store_register): Call store_altivec_registers instead of
1374 store_altivec_register.
1375 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1376 the new regno parameter.
1377 (store_ppc_registers): Call store_altivec_registers with -1 for
1378 the new regno parameter.
1380 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1382 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1383 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1384 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1385 (gdb_vrregset_t): Change array type size to
1386 PPC_LINUX_SIZEOF_VRREGSET.
1387 (gdb_vsxregset_t): Change array type size to
1388 PPC_LINUX_SIZEOF_VSXREGSET.
1389 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1390 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1391 PPC_LINUX_SIZEOF_VSXREGSET.
1393 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1395 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1396 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1398 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1399 ppc_linux_target_wordsize with tid.
1400 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1402 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1403 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1404 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1405 tid parameter. Remove static specifier.
1406 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1407 (ppc_linux_target_wordsize): New declaration.
1409 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1411 * arch/ppc-linux-common.c: New file.
1412 * arch/ppc-linux-common.h: New file.
1413 * arch/ppc-linux-tdesc.h: New file.
1414 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1415 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1416 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1417 arch/ppc-linux-tdesc.h.
1418 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1419 arch/ppc-linux-tdesc.h.
1420 (ppc_linux_nat_target::read_description): Remove target
1421 description matching code. Fill a ppc_linux_features struct and
1422 call ppc_linux_match_description with it. Move comment about ISA
1423 2.05 to ppc-linux-common.c.
1424 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1425 arch/ppc-linux-tdesc.h.
1426 (ppc_linux_core_read_description): Remove target description
1427 matching code. Fill a ppc_linux_features struct and call
1428 ppc_linux_match_description with it.
1429 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1430 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1431 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1432 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1433 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1434 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1435 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1436 (tdesc_powerpc_e500l): Remove.
1438 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1440 * ada-lang.c (catch_assert_command): Pass empty string instead
1441 of NULL for excep_string argument.
1443 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1445 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1446 the width of the requested register exceeds the width of the
1449 2018-05-21 Tom Tromey <tom@tromey.com>
1451 * printcmd.c (output_command): Remove.
1452 (output_command_const): Rename to output_command.
1453 * valprint.h (output_command): Rename from output_command_const.
1454 * tracepoint.c (trace_dump_actions): Call output_command.
1456 2018-05-21 Tom Tromey <tom@tromey.com>
1458 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1459 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1460 * ada-lang.h (create_ada_exception_catchpoint): Update.
1461 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1463 (create_excep_cond_exprs, ~ada_catchpoint)
1464 (should_stop_exception, print_one_exception)
1465 (print_mention_exception, print_recreate_exception): Update.
1466 (ada_get_next_arg): Remove.
1467 (catch_ada_exception_command_split): Use std::string. Change type
1468 of "excep_string", "cond_string".
1469 (catch_ada_exception_command): Update.
1470 (create_ada_exception_catchpoint): Change type of excep_string.
1471 (ada_exception_sal): Remove excep_string parameter.
1472 (~ada_catchpoint): Remove.
1474 2018-05-21 Tom Tromey <tom@tromey.com>
1476 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1479 2018-05-21 Tom Tromey <tom@tromey.com>
1481 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1482 Return unique_xmalloc_ptr.
1483 (print_it_exception): Update.
1485 2018-05-21 Tom Tromey <tom@tromey.com>
1487 * tracepoint.c (trace_dump_actions): Use std::string.
1489 2018-05-21 Tom Tromey <tom@tromey.com>
1491 * symfile.c (reread_symbols): Use std::string for original_name.
1493 2018-05-21 Tom Tromey <tom@tromey.com>
1495 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1496 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1499 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1501 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1503 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1504 * objfiles.c (get_objfile_bfd_data): Allocate
1505 objfile_per_bfd_storage with obstack_new when allocating on
1508 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1510 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1512 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1513 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1514 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1515 (add_pending): Likewise.
1516 (parse_symbol): Likewise.
1517 (parse_partial_symbols): Likewise.
1518 (psymtab_to_symtab_1): Likewise.
1519 (new_psymtab): Likewise.
1520 (elfmdebug_build_psymtabs): Likewise.
1521 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1522 * objfiles.c (get_objfile_bfd_data): Likewise.
1523 (objfile_register_static_link): Likewise.
1524 * psymtab.c (allocate_psymtab): Likewise.
1525 * stabsread.c (read_member_functions): Likewise.
1526 * xcoffread.c (xcoff_end_psymtab): Likewise.
1528 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1530 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1531 compiler supports std::is_trivially_constructible.
1532 * common/poison.h: Include obstack.h.
1533 (IsMallocable): Define to is_trivially_constructible if the
1534 compiler supports it, define to true_type otherwise.
1538 (XOBNEWVEC): Redefine.
1539 * gdb_obstack.h (obstack_zalloc): New.
1540 (OBSTACK_ZALLOC): Redefine.
1541 (obstack_calloc): New.
1542 (OBSTACK_CALLOC): Redefine.
1544 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1545 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1547 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1548 obstack_calloc/obstack_zalloc.
1549 (gdbarch_obstack_zalloc): Remove.
1550 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1552 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1554 * stack.c (backtrace_command_1): Remove useless variable int i.
1556 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1558 * stack.c (print_frame_info): Fix comment.
1560 2018-05-18 Tom Tromey <tom@tromey.com>
1562 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1563 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1564 (~dwarf2_per_objfile): Update
1565 (dwarf2_get_dwz_file): Use new.
1566 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1569 2018-05-18 Tom Tromey <tom@tromey.com>
1571 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1573 * dwarf2read.c (struct dwp_file): Add constructor and
1575 (open_and_init_dwp_file): Return a unique_ptr.
1576 (dwarf2_per_objfile, create_dwp_hash_table)
1577 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1578 (lookup_dwo_unit_in_dwp): Update.
1579 (open_and_init_dwp_file, get_dwp_file): Update.
1581 2018-05-18 Tom Tromey <tom@tromey.com>
1583 * dwarf2read.c (dwarf2_per_objfile): Update.
1584 (struct mapped_index): Add initializers.
1585 (dwarf2_read_index): Use new.
1586 (dw2_symtab_iter_init): Update.
1587 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1590 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1592 * dwarf2read.c (mapped_index) <total_size>: Remove.
1594 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1596 * unittests/format_pieces-selftests.c (test_format_specifier):
1599 2018-05-18 Tom Tromey <tom@tromey.com>
1601 * c-typeprint.c (maybe_print_hole): New function.
1602 (c_print_type_struct_field_offset): Update.
1603 (c_type_print_base_struct_union): Call maybe_print_hole.
1605 2018-05-17 Keith Seitz <keiths@redhat.com>
1607 * breakpoint.c (build_bpstat_chain): New function, moved from
1609 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1610 If no stop chain is passed, call build_bpstat_chain to build it.
1611 * breakpoint.h (build_bpstat_chain): Declare.
1612 (bpstat_stop_status): Move documentation here from breakpoint.c.
1613 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1614 build the stop chain and pass it to skip_inline_frames.
1615 Pass this stop chain to bpstat_stop_status.
1616 * inline-frame.c: Include breakpoint.h.
1617 (stopped_by_user_bp_inline_frame): New function.
1618 (skip_inline_frames): Add parameter `stop_chain'.
1619 Move documention to inline-frame.h.
1620 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1621 whether the frame should be elided.
1622 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1623 Add moved documentation and update for new parameter.
1625 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1628 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1629 unittests/format_pieces-selftests.c.
1630 * common/format.h (format_piece) <operator==>: New.
1631 (format_pieces) <operator[]>: Remove.
1632 * common/format.c (format_pieces::format_pieces): Handle \e.
1633 * unittests/format_pieces-selftests.c: New.
1635 2018-05-17 Tom Tromey <tom@tromey.com>
1638 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1639 (dw2_instantiate_symtab): Add skip_partial parameter.
1640 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1641 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1642 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1643 (dw2_expand_symtabs_matching_one)
1644 (dw2_find_pc_sect_compunit_symtab)
1645 (dw2_debug_names_lookup_symbol)
1646 (dw2_debug_names_expand_symtabs_for_function): Update.
1647 (init_cutu_and_read_dies): Add skip_partial parameter.
1648 (process_psymtab_comp_unit, build_type_psymtabs_1)
1649 (process_skeletonless_type_unit, load_partial_comp_unit)
1650 (psymtab_to_symtab_1): Update.
1651 (load_full_comp_unit): Add skip_partial parameter.
1652 (process_imported_unit_die, dwarf2_read_addr_index)
1653 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1654 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1655 (read_signatured_type): Update.
1657 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1659 * value.c (release_value): Remove unused variable.
1660 (record_latest_value): Likewise.
1661 (access_value_history): Likewise.
1662 (preserve_values): Likewise.
1664 2018-05-17 Tom Tromey <tom@tromey.com>
1666 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1669 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1672 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1673 Also handle registers whose width is not a multiple of
1675 (linux_nat_trad_target::store_register): Likewise.
1677 2018-05-16 Tom Tromey <tom@tromey.com>
1679 * gdbcore.h (core_bfd): Redefine.
1680 * corelow.c (core_target::close): Update.
1681 (core_target_open): Update.
1682 * progspace.h (struct program_space) <cbfd>: Now a
1685 2018-05-16 Tom Tromey <tom@tromey.com>
1688 * symfile-add-flags.h (enum symfile_add_flags)
1689 <SYMFILE_NOT_FILENAME>: New constant.
1690 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1691 objfile name from BFD.
1692 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1693 * minidebug.c (find_separate_debug_file_in_section): Put
1694 ".gnu_debugdata" into BFD's file name.
1696 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1698 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1701 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1704 * aarch64-tdep.c (aarch64_analyze_prologue,
1705 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1706 Indicate not interested in errors.
1708 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1710 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1711 Supply the MIPS_ZERO_REGNUM register.
1713 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1715 * mips-tdep.c (mask_address_var): Make variable static.
1717 2018-05-14 Tom Tromey <tom@tromey.com>
1719 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1721 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1723 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1724 FXSAVE_ADDR for the mxcsr register.
1726 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1728 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1730 2018-05-11 Pedro Alves <palves@redhat.com>
1732 * corelow.c (core_target) <core_target>: No longer inline.
1733 Initialize m_core_gdbarch, m_core_vec and build the section table
1735 <~core_target>: New.
1736 <core_gdbarch, get_core_register_section>: New methods.
1737 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1738 factored out from ...
1739 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1741 (sniff_core_bfd): Add gdbarch parameter.
1742 (core_close): Delete, merged into ...
1743 (core_target::close): ... here. Delete self.
1744 (core_close_cleanup): Delete.
1745 (core_target_open): Allocate a core_target on the heap. Use a
1746 unique_ptr instead of a cleanup. Bits moved into the core_target
1747 ctor. Adjust to use core_target methods instead of globals.
1748 (get_core_register_section): Rename to ...
1749 (core_target::get_core_register_section): ... this and adjust.
1750 (struct get_core_registers_cb_data): New.
1751 (get_core_registers_cb): Use it. Use bool.
1752 (core_target::fetch_registers, core_target::files_info)
1753 (core_target::xfer_partial, core_target::read_description)
1754 (core_target::pid_to, core_target::thread_name): Adjust to
1755 reference class fields instead of globals.
1756 * target.h (struct target_ops_deleter, target_ops_up): New.
1758 2018-05-11 Pedro Alves <palves@redhat.com>
1760 * corefile.c (core_file_command): Move to corelow.c.
1761 * corelow.c (the_core_target): Delete.
1762 (core_file_command): Moved from corefile.c. Check exec_bfd
1763 instead of the_core_target. Use target_detach instead of calling
1764 into the_core_target directly.
1765 (maybe_say_no_core_file_now): New.
1766 (core_target::detach): Use it.
1767 (_initialize_corelow): Remove references to the_core_target.
1768 * gdbcore.h (the_core_target): Delete.
1770 2018-05-11 Tom Tromey <tromey@redhat.com>
1771 Pedro Alves <palves@redhat.com>
1773 * corefile.c (core_bfd): Remove.
1774 * gdbcore.h (core_bfd): Now a macro.
1775 * progspace.h (struct program_space) <cbfd>: New field.
1777 2018-05-11 Tom Tromey <tom@tromey.com>
1779 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1782 2018-05-10 Tom Tromey <tom@tromey.com>
1784 * configure: Rebuild.
1785 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1787 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1790 * regformats/regdat.sh: Adjust script, following the addition
1791 of the new expedite_regs parameter to init_target_desc.
1793 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1796 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1797 set_gdbarch_significant_addr_bit.
1798 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1799 set_gdbarch_significant_addr_bit.
1800 * utils.c (address_significant): Update to sign extend addr.
1802 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1804 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1805 (xtensa_linux_init_abi): Limit tdep->num_regs by
1806 tdep->num_nopriv_regs.
1807 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1808 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1811 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1813 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1815 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1817 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1818 (I387_MXCSR_INIT_VAL): New constant.
1819 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1820 buffer if it was supplied by the inferior.
1821 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1822 (i387_xsave_get_clear_bv): New function.
1823 (i387_supply_xsave): Only read x87 control registers from the
1824 xsave buffer if the feature is enabled, and the state will have
1825 been written, otherwise, provide a suitable default.
1826 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1827 including x87 control registers. Update control registers if they
1828 have changed from the default value, and mark features as enabled
1830 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1832 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1834 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1836 2018-05-07 Tom Tromey <tom@tromey.com>
1838 * configure: Rebuild.
1839 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1841 2018-05-07 Tom Tromey <tom@tromey.com>
1844 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1845 bit. Use correct value for VDIV.
1847 2018-05-04 Tom Tromey <tom@tromey.com>
1849 * configure: Rebuild.
1850 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1852 2018-05-04 Tom Tromey <tom@tromey.com>
1854 * linux-record.c (record_linux_system_call) <case
1855 RECORD_SYS_RECVFROM>: Add "break".
1857 2018-05-04 Tom Tromey <tom@tromey.com>
1859 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1860 Add missing "break".
1861 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1862 Add missing "break".
1864 2018-05-04 Tom Tromey <tom@tromey.com>
1866 * rs6000-tdep.c (ppc_process_record_op4)
1867 (ppc_process_record_op63): Add fall-through comment.
1869 2018-05-04 Tom Tromey <tom@tromey.com>
1871 * i386-tdep.c (i386_process_record): Add fall-through comment.
1873 2018-05-04 Tom Tromey <tom@tromey.com>
1875 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1878 2018-05-04 Tom Tromey <tom@tromey.com>
1880 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1881 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1882 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1884 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1886 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1889 2018-05-04 Tom Tromey <tom@tromey.com>
1891 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1893 2018-05-04 Tom Tromey <tom@tromey.com>
1895 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1896 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1897 * symfile.c (section_is_mapped): Fix fall-through comment.
1898 * stabsread.c (define_symbol, read_member_functions): Fix
1899 fall-through comment.
1900 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1902 * remote.c (remote_wait_as): Fix fall-through comment.
1903 * p-exp.y (yylex): Fix fall-through comment.
1904 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1906 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1907 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1908 * jv-exp.y (yylex): Fix fall-through comment.
1909 * go-exp.y (lex_one_token): Fix fall-through comment.
1910 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1911 fall-through comment.
1912 * f-exp.y (yylex): Fix fall-through comment.
1913 * dwarf2read.c (process_die): Fix fall-through comments.
1914 * dbxread.c (process_one_symbol): Fix fall-through comment.
1915 * d-exp.y (lex_one_token): Fix fall-through comment.
1916 * cp-name-parser.y (yylex): Fix fall-through comment.
1917 * coffread.c (coff_symtab_read): Fix fall-through comment.
1918 * c-exp.y (lex_one_token): Fix fall-through comment.
1919 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1921 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1924 2018-05-04 Tom Tromey <tom@tromey.com>
1927 * NEWS: Mention gdb.execute change.
1928 * gdbcmd.h (execute_control_command): Don't declare.
1929 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1930 execute_control_commands, execute_control_commands_to_string.
1931 * cli/cli-script.h (execute_control_commands)
1932 (execute_control_commands_to_string): Declare.
1933 (execute_control_command): Add from_tty parameter.
1934 * cli/cli-script.c (execute_control_commands)
1935 (execute_control_commands_to_string): New functions.
1936 (execute_user_command): Use execute_control_commands.
1937 (execute_control_command_1): Add "from_tty" parameter. Update.
1938 (execute_control_command): Likewise.
1940 2018-05-04 Tom Tromey <tom@tromey.com>
1943 * NEWS: Mention that breakpoint commands are writable.
1944 * python/py-breakpoint.c (bppy_set_commands): New function.
1945 (breakpoint_object_getset) <"commands">: Use it.
1947 2018-05-04 Tom Tromey <tom@tromey.com>
1949 * tracepoint.c (actions_command): Update.
1950 * mi/mi-cmd-break.c (mi_command_line_array)
1951 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1952 (mi_read_next_line): Remove.
1953 (mi_cmd_break_commands): Update.
1954 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1956 * cli/cli-script.c (get_command_line): Update.
1957 (process_next_line): Use function_view. Constify.
1958 (recurse_read_control_structure, read_command_lines)
1959 (read_command_lines_1): Change argument types to function_view.
1960 (do_define_command, document_command): Update.
1961 * breakpoint.h (check_tracepoint_command): Don't declare.
1962 * breakpoint.c (check_tracepoint_command): Remove.
1963 (commands_command_1, create_tracepoint_from_upload): Update.
1965 2018-05-04 Tom Tromey <tom@tromey.com>
1968 * cli/cli-script.h (enum command_control_type) <define_control>:
1970 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1971 (build_command_line, execute_control_command_1)
1972 (process_next_line): Likewise.
1973 (do_define_command): New function, extracted from define_command.
1974 (define_command): Use it.
1976 2018-05-04 Tom Tromey <tom@tromey.com>
1978 * tracepoint.c (actions_command): Update.
1979 * cli/cli-script.h (read_command_lines): Update.
1980 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1981 (MAX_TMPBUF): Remove define.
1982 (define_command): Use string_printf.
1983 (document_command): Likewise.
1984 * breakpoint.c (commands_command_1): Update.
1986 2018-05-04 Tom Tromey <tom@tromey.com>
1988 * top.c (execute_command): Update.
1989 * cli/cli-script.h (print_command_lines): Now varargs.
1990 * cli/cli-script.c (print_command_lines): Now varargs.
1991 (execute_control_command_1) <case while_control, case if_control>:
1994 2018-05-04 Tom Tromey <tom@tromey.com>
1996 * tracepoint.c (all_tracepoint_actions): Rename from
1997 all_tracepoint_actions_and_cleanup. Change return type.
1998 (actions_command, encode_actions_1, encode_actions)
1999 (trace_dump_actions, tdump_command): Update.
2000 * remote.c (remote_download_command_source): Update.
2001 * python/python.c (gdbpy_eval_from_control_command)
2002 (python_command, python_interactive_command): Update.
2003 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2004 * guile/guile.c (guile_command)
2005 (gdbscm_eval_from_control_command, guile_command): Update.
2006 * compile/compile.c (compile_code_command)
2007 (compile_print_command, compile_to_object): Update.
2008 * cli/cli-script.h (struct command_lines_deleter): New.
2009 (counted_command_line): New typedef.
2010 (struct command_line): Add constructor, destructor.
2011 <body_list>: Remove.
2012 <body_list_0, body_list_1>: New members.
2013 (command_line_up): Remove typedef.
2014 (read_command_lines, read_command_lines_1, get_command_line):
2016 (copy_command_lines): Don't declare.
2017 * cli/cli-script.c (build_command_line): Use "new".
2018 (get_command_line): Return counted_command_line.
2019 (print_command_lines, execute_user_command)
2020 (execute_control_command_1, while_command, if_command): Update.
2021 (realloc_body_list): Remove.
2022 (process_next_line, recurse_read_control_structure): Update.
2023 (read_command_lines, read_command_lines_1): Return counted_command_line.
2024 (free_command_lines): Use "delete".
2025 (copy_command_lines): Remove.
2026 (define_command, document_command, show_user_1): Update.
2027 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2028 a counted_command_line.
2029 * breakpoint.h (counted_command_line): Remove typedef.
2030 (breakpoint_set_commands): Update.
2031 * breakpoint.c (check_no_tracepoint_commands)
2032 (validate_commands_for_breakpoint): Update.
2033 (breakpoint_set_commands): Change commands to be a
2034 counted_command_line.
2035 (commands_command_1, update_dprintf_command_list)
2036 (create_tracepoint_from_upload): Update.
2038 2018-05-04 Tom Tromey <tom@tromey.com>
2040 * cli/cli-decode.h (cmd_list_element): New constructor.
2041 (~cmd_list_element): New destructor.
2042 (struct cmd_list_element): Add initializers.
2043 * cli/cli-decode.c (do_add_cmd): Use "new".
2044 (delete_cmd): Use "delete".
2046 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2047 Pedro Alves <palves@redhat.com>
2049 PR breakpoints/19806 and support for PR external/20207.
2050 * NEWS: Mention Aarch64 watchpoint improvements.
2051 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2052 watchpoints and PR external/20207 watchpoints.
2053 * nat/aarch64-linux-hw-point.c
2054 (kernel_supports_any_contiguous_range): New.
2055 (aarch64_watchpoint_offset): New.
2056 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2057 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2058 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2059 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2060 next_addr_orig_p. Support PR external/20207 watchpoints.
2061 (aarch64_downgrade_regs): New.
2062 (aarch64_dr_state_insert_one_point): New parameters offset and
2064 (aarch64_dr_state_remove_one_point): Likewise.
2065 (aarch64_handle_breakpoint): Update caller.
2066 (aarch64_handle_aligned_watchpoint): Likewise.
2067 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2069 (aarch64_linux_set_debug_regs): Remove const from state. Call
2070 aarch64_downgrade_regs.
2071 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2072 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2073 (DR_CONTROL_MASK): ... this.
2074 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2075 (unsigned int aarch64_watchpoint_offset): New prototype.
2076 (aarch64_linux_set_debug_regs): Remove const from state.
2077 * utils.c (align_up, align_down): Move to ...
2078 * common/common-utils.c (align_up, align_down): ... here.
2079 * utils.h (align_up, align_down): Move to ...
2080 * common/common-utils.h (align_up, align_down): ... here.
2082 2018-05-04 Joel Brobecker <brobecker@adacore.com>
2084 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
2085 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
2086 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
2087 Re-implement to match the ABI as summarized in GCC's
2088 gcc/config/sparc/sparc.c. All callers updated.
2089 (sparc32_store_arguments): Remove assertion.
2091 2018-05-04 Tom Tromey <tom@tromey.com>
2093 * printcmd.c: Don't include tui.h.
2094 (decode_format): Use skip_spaces.
2096 2018-05-04 Tom Tromey <tom@tromey.com>
2099 * printcmd.c (last_count): New global.
2100 (x_command): Use saved count when repeating.
2102 2018-05-04 Tom Tromey <tom@tromey.com>
2104 * nto-procfs.c (do_closedir_cleanup): Remove.
2105 (procfs_pidlist): Use gdb_dir_up.
2106 * procfs.c (do_closedir_cleanup): Remove.
2107 (proc_update_threads): Use gdb_dir_up.
2108 * common/filestuff.h (struct gdb_dir_deleter): New.
2109 (gdb_dir_up): New typedef.
2111 2018-05-04 Tom Tromey <tom@tromey.com>
2113 * ada-lang.c (print_mention_exception): Use std::string.
2115 2018-05-04 Tom Tromey <tom@tromey.com>
2117 * ada-lang.c (create_excep_cond_exprs): Update.
2118 (ada_exception_catchpoint_cond_string): Use std::string.
2120 2018-05-04 Tom Tromey <tom@tromey.com>
2122 * ada-lang.c (xget_renaming_scope): Return std::string.
2123 (old_renaming_is_invisible): Update.
2125 2018-05-04 Tom Tromey <tom@tromey.com>
2127 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2128 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2130 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
2132 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2134 2018-05-04 Tom Tromey <tom@tromey.com>
2136 * remote.c (remote_query_supported_append): Change type.
2137 (remote_check_symbols): Update.
2139 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
2142 * configure.ac: Prepend libpython.
2143 * python/python-config.py: Likewise.
2144 * configure: Regenerate.
2146 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
2148 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2150 2018-05-03 Pedro Alves <palves@redhat.com>
2153 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2154 override. Write 'true' instead of '1'.
2155 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2158 2018-05-02 Pedro Alves <palves@redhat.com>
2160 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2161 add_inf_child_target.
2162 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2163 add_inf_child_target.
2164 * aix-thread.c (aix_thread_target_info): New.
2165 (aix_thread_target) <shortname, longname, doc>: Delete.
2167 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2168 add_inf_child_target.
2169 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2170 add_inf_child_target.
2171 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2172 add_inf_child_target.
2173 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2174 add_inf_child_target.
2175 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2176 add_inf_child_target.
2177 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2178 add_inf_child_target.
2179 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2180 add_inf_child_target.
2181 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2182 add_inf_child_target.
2183 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2184 add_inf_child_target.
2185 * bfd-target.c (target_bfd_target_info): New.
2186 (target_bfd) <shortname, longname, doc>: Delete.
2188 * bsd-kvm.c (bsd_kvm_target_info): New.
2189 (bsd_kvm_target) <shortname, longname, doc>: Delete.
2191 (bsd_kvm_target::open): Rename to ...
2192 (bsd_kvm_target_open): ... this. Adjust.
2193 * bsd-uthread.c (bsd_uthread_target_info): New.
2194 (bsd_uthread_target) <shortname, longname, doc>: Delete.
2196 * corefile.c (core_file_command): Adjust.
2197 * corelow.c (core_target_info): New.
2198 (core_target) <shortname, longname, doc>: Delete.
2200 (core_target::open): Rename to ...
2201 (core_target_open): ... this. Adjust.
2202 * ctf.c (ctf_target_info): New.
2203 (ctf_target) <shortname, longname, doc>: Delete.
2205 (ctf_target::open): Rename to ...
2206 (ctf_target_open): ... this.
2207 (_initialize_ctf): Adjust.
2208 * exec.c (exec_target_info): New.
2209 (exec_target) <shortname, longname, doc>: Delete.
2211 (exec_target::open): Rename to ...
2212 (exec_target_open): ... this.
2213 * gdbcore.h (core_target_open): Declare.
2214 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2215 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2216 add_inf_child_target.
2217 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2218 add_inf_child_target.
2219 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2220 add_inf_child_target.
2221 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2222 add_inf_child_target.
2223 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2224 add_inf_child_target.
2225 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2226 add_inf_child_target.
2227 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2228 add_inf_child_target.
2229 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
2230 add_inf_child_target.
2231 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
2232 add_inf_child_target.
2233 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
2234 add_inf_child_target.
2235 * inf-child.c (inf_child_target_info): New.
2236 (inf_child_target::info): New.
2237 (inf_child_open_target): Remove 'target' parameter. Use
2238 get_native_target instead.
2239 (inf_child_target::open): Delete.
2240 (add_inf_child_target): New.
2241 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
2244 (add_inf_child_target): Declare.
2245 (inf_child_open_target): Declare.
2246 * linux-thread-db.c (thread_db_target_info): New.
2247 (thread_db_target) <shortname, longname, doc>: Delete.
2249 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
2250 add_inf_child_target.
2251 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
2252 add_inf_child_target.
2253 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
2254 add_inf_child_target.
2255 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
2256 add_inf_child_target.
2257 * make-target-delegates (print_class): Adjust.
2258 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
2259 add_inf_child_target.
2260 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
2261 add_inf_child_target.
2262 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
2263 add_inf_child_target.
2264 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
2265 add_inf_child_target.
2266 * nto-procfs.c (nto_native_target_info): New.
2267 (nto_procfs_target_native) <shortname, longname, doc>:
2270 (nto_procfs_target_info): New.
2271 (nto_procfs_target_procfs) <shortname, longname, doc>:
2274 (init_procfs_targets): Adjust.
2275 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
2276 add_inf_child_target.
2277 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2278 add_inf_child_target.
2279 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2280 add_inf_child_target.
2281 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2282 add_inf_child_target.
2283 * ravenscar-thread.c (ravenscar_target_info): New.
2284 (ravenscar_thread_target) <shortname, longname, doc>:
2287 * record-btrace.c (record_btrace_target_info):
2288 (record_btrace_target) <shortname, longname, doc>: Delete.
2290 (record_btrace_target::open): Rename to ...
2291 (record_btrace_target_open): ... this. Adjust.
2292 * record-full.c (record_longname, record_doc): New.
2293 (record_full_base_target) <shortname, longname, doc>: Delete.
2295 (record_full_target_info): New.
2296 (record_full_target): <shortname>: Delete.
2298 (record_full_core_open_1, record_full_open_1): Update comments.
2299 (record_full_base_target::open): Rename to ...
2300 (record_full_open): ... this.
2301 (cmd_record_full_restore): Update.
2302 (_initialize_record_full): Update.
2303 * remote-sim.c (remote_sim_target_info): New.
2304 (gdbsim_target) <shortname, longname, doc>: Delete.
2306 (gdbsim_target::open): Rename to ...
2307 (gdbsim_target_open): ... this.
2308 (_initialize_remote_sim): Adjust.
2309 * remote.c (remote_doc): New.
2310 (remote_target_info): New.
2311 (remote_target) <shortname, longname, doc>: Delete.
2313 (extended_remote_target_info): New.
2314 (extended_remote_target) <shortname, longname, doc>: Delete.
2316 (remote_target::open_1): Make static. Adjust.
2317 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2318 * s390-linux-nat.c (_initialize_s390_nat): Use
2319 add_inf_child_target.
2320 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2321 add_inf_child_target.
2322 * sol-thread.c (thread_db_target_info): New.
2323 (sol_thread_target) <shortname, longname, doc>: Delete.
2325 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2326 add_inf_child_target.
2327 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2328 add_inf_child_target.
2329 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2330 add_inf_child_target.
2331 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2332 add_inf_child_target.
2333 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2334 add_inf_child_target.
2335 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2336 add_inf_child_target.
2337 * spu-linux-nat.c (_initialize_spu_nat): Use
2338 add_inf_child_target.
2339 * spu-multiarch.c (spu_multiarch_target_info): New.
2340 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2342 * target-delegates.c: Regenerate.
2343 * target.c: Include <unordered_map>.
2344 (target_ops_p): Delete.
2345 (DEF_VEC_P(target_ops_p)): Delete.
2346 (target_factories): New.
2347 (test_target_info): New.
2348 (test_target_ops::info): New.
2349 (open_target): Adjust to use target_factories.
2350 (add_target_with_completer): Rename to ...
2351 (add_target): ... this. Change prototype. Register target_info
2352 and open callback in target_factories. Register target_info in
2353 command context instead of target_ops.
2354 (add_target): Delete old implementation.
2355 (add_deprecated_target_alias): Change prototype. Adjust.
2356 (the_native_target): New.
2357 (set_native_target, get_native_target): New.
2358 (find_default_run_target): Use the_native_target.
2359 (find_attach_target, find_run_target): Simplify.
2360 (target_ops::open): Delete.
2361 (dummy_target_info): New.
2362 (dummy_target::shortname, dummy_target::longname)
2363 (dummy_target::doc): Delete.
2364 (dummy_target::info): New.
2365 (debug_target::shortname, debug_target::longname)
2366 (debug_target::doc): Delete.
2367 (debug_target::info): New.
2368 * target.h (struct target_info): New.
2369 (target_ops::~target_ops): Add comment.
2370 (target_ops::info): New.
2371 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2372 longer virtual. Implement in terms of target_info.
2373 (set_native_target, get_native_target): Declare.
2374 (target_open_ftype): New.
2375 (add_target, add_target_with_completer)
2376 (add_deprecated_target_alias): Change prototype.
2377 (test_target) <shortname, longname, doc>: Delete.
2379 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2380 add_inf_child_target.
2381 * tracefile-tfile.c (tfile_target_info): New.
2382 (tfile_target) <shortname, longname, doc>: Delete.
2384 (tfile_target::open): Rename to ...
2385 (tfile_target_open): ... this.
2386 (_initialize_tracefile_tfile): Adjust.
2387 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2388 add_inf_child_target.
2389 * windows-nat.c (_initialize_windows_nat): Use
2390 add_inf_child_target.
2391 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2392 add_inf_child_target.
2394 2018-05-02 Pedro Alves <palves@redhat.com>
2396 * linux-nat.h (linux_nat_target) <low_new_thread,
2397 low_delete_thread, low_new_fork, low_forget_process,
2398 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2399 New virtual methods.
2400 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2401 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2402 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2403 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2404 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2406 * linux-fork.c (delete_fork): Adjust to call low method.
2407 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2408 (linux_nat_new_fork, linux_nat_forget_process_hook)
2409 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2410 (linux_nat_status_is_event):
2411 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2412 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2414 (sigtrap_is_event): Rename to ...
2415 (linux_nat_target::low_status_is_event): ... this.
2416 (linux_nat_set_status_is_event): Delete.
2417 (save_stop_reason, linux_nat_wait_1)
2418 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2420 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2421 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2422 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2423 (linux_nat_set_prepare_to_resume): Delete.
2424 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2425 low virtual methods.
2426 * amd64-linux-nat.c: Likewise.
2427 * arm-linux-nat.c: Likewise.
2428 * i386-linux-nat.c: Likewise.
2429 * ia64-linux-nat.c: Likewise.
2430 * mips-linux-nat.c: Likewise.
2431 * ppc-linux-nat.c: Likewise.
2432 * s390-linux-nat.c: Likewise.
2433 * sparc64-linux-nat.c: Likewise.
2434 * x86-linux-nat.c: Likewise.
2435 * x86-linux-nat.h: Include "nat/x86-linux.h".
2436 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2437 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2440 2018-05-02 Pedro Alves <palves@redhat.com>
2442 * target.h (target_ops)
2443 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2444 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2445 stopped_by_watchpoint, have_continuable_watchpoint,
2446 stopped_data_address, watchpoint_addr_within_range,
2447 can_accel_watchpoint_condition, can_run, thread_alive,
2448 has_all_memory, has_memory, has_stack, has_registers,
2449 has_execution, can_async_p, is_async_p, supports_non_stop,
2450 always_non_stop_p, can_execute_reverse, supports_multi_process,
2451 supports_enable_disable_tracepoint,
2452 supports_disable_randomization, supports_string_tracing,
2453 supports_evaluation_of_breakpoint_conditions,
2454 can_run_breakpoint_commands, filesystem_is_local,
2455 can_download_tracepoint, get_trace_state_variable_value,
2456 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2457 record_is_replaying, record_will_replay,
2458 augmented_libraries_svr4_read>: Adjust to return bool.
2459 * aarch64-linux-nat.c: All implementations adjusted.
2460 * aix-thread.c: All implementations adjusted.
2461 * arm-linux-nat.c: All implementations adjusted.
2462 * breakpoint.c: All implementations adjusted.
2463 * bsd-kvm.c: All implementations adjusted.
2464 * bsd-uthread.c: All implementations adjusted.
2465 * corelow.c: All implementations adjusted.
2466 * ctf.c: All implementations adjusted.
2467 * darwin-nat.c: All implementations adjusted.
2468 * darwin-nat.h: All implementations adjusted.
2469 * exec.c: All implementations adjusted.
2470 * fbsd-nat.c: All implementations adjusted.
2471 * fbsd-nat.h: All implementations adjusted.
2472 * gnu-nat.c: All implementations adjusted.
2473 * gnu-nat.h: All implementations adjusted.
2474 * go32-nat.c: All implementations adjusted.
2475 * ia64-linux-nat.c: All implementations adjusted.
2476 * inf-child.c: All implementations adjusted.
2477 * inf-child.h: All implementations adjusted.
2478 * inf-ptrace.c: All implementations adjusted.
2479 * inf-ptrace.h: All implementations adjusted.
2480 * linux-nat.c: All implementations adjusted.
2481 * linux-nat.h: All implementations adjusted.
2482 * mips-linux-nat.c: All implementations adjusted.
2483 * nto-procfs.c: All implementations adjusted.
2484 * ppc-linux-nat.c: All implementations adjusted.
2485 * procfs.c: All implementations adjusted.
2486 * ravenscar-thread.c: All implementations adjusted.
2487 * record-btrace.c: All implementations adjusted.
2488 * record-full.c: All implementations adjusted.
2489 * remote-sim.c: All implementations adjusted.
2490 * remote.c: All implementations adjusted.
2491 * s390-linux-nat.c: All implementations adjusted.
2492 * sol-thread.c: All implementations adjusted.
2493 * spu-multiarch.c: All implementations adjusted.
2494 * target-delegates.c: All implementations adjusted.
2495 * target.c: All implementations adjusted.
2496 * target.h: All implementations adjusted.
2497 * tracefile-tfile.c: All implementations adjusted.
2498 * tracefile.c: All implementations adjusted.
2499 * tracefile.h: All implementations adjusted.
2500 * windows-nat.c: All implementations adjusted.
2501 * x86-linux-nat.h: All implementations adjusted.
2502 * x86-nat.h: All implementations adjusted.
2504 2018-05-02 Pedro Alves <palves@redhat.com>
2506 * make-target-delegates (scan_target_h): Don't trim lines here.
2507 Replace sequences of tabs and/or whitespace with a single
2509 (top level, parsing methods): Trim each line before processing it
2512 2018-05-02 Pedro Alves <palves@redhat.com>
2513 John Baldwin <jhb@freebsd.org>
2515 * target.h (enum strata) <debug_stratum>: New.
2516 (struct target_ops) <all delegation methods>: Replace by C++
2517 virtual methods, and drop "to_" prefix. All references updated
2519 <to_shortname, to_longname, to_doc, to_data,
2520 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2521 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2522 virtual methods. All references updated throughout.
2523 <can_attach, supports_terminal_ours, can_create_inferior,
2524 get_thread_control_capabilities, attach_no_wait>: New
2526 <insert_breakpoint, remove_breakpoint>: Now
2527 TARGET_DEFAULT_NORETURN methods.
2528 <info_proc>: Now returns bool.
2530 (OPS_MAGIC): Delete.
2531 (current_target): Delete. All references replaced by references
2533 (target_stack): ... this. New.
2534 (target_shortname, target_longname): Adjust.
2535 (target_can_run): Now a function declaration.
2536 (default_child_has_all_memory, default_child_has_memory)
2537 (default_child_has_stack, default_child_has_registers)
2538 (default_child_has_execution): Remove target_ops parameter.
2539 (complete_target_initialization): Delete.
2540 (memory_breakpoint_target): New template class.
2541 (test_target_ops): Refactor as a C++ class with virtual methods.
2542 * make-target-delegates (NAME_PART): Tighten.
2543 (POINTER_PART, CP_SYMBOL): New.
2544 (SIMPLE_RETURN_PART): Reimplement.
2545 (VEC_RETURN_PART): Expect less.
2546 (RETURN_PART, VIRTUAL_PART): New.
2547 (METHOD): Adjust to C++ virtual methods.
2548 (scan_target_h): Remove reference to C99.
2549 (dname): Output "target_ops::" prefix.
2550 (write_function_header): Adjust to output a C++ class method.
2551 (write_declaration): New.
2552 (write_delegator): Adjust to output a C++ class method.
2553 (tdname): Output "dummy_target::" prefix.
2554 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2556 (tdefault_names, debug_names): Delete.
2557 (return_types, tdefaults, styles, argtypes_array): New.
2558 (top level): All methods are delegators.
2560 (top level): Print dummy_target and debug_target classes.
2561 * target-delegates.c: Regenerate.
2562 * target-debug.h (target_debug_print_enum_info_proc_what)
2563 (target_debug_print_thread_control_capabilities)
2564 (target_debug_print_thread_info_p): New.
2565 * target.c (dummy_target): Delete.
2566 (the_dummy_target, the_debug_target): New.
2567 (target_stack): Now extern.
2568 (set_targetdebug): Push/unpush debug target.
2569 (default_child_has_all_memory, default_child_has_memory)
2570 (default_child_has_stack, default_child_has_registers)
2571 (default_child_has_execution): Remove target_ops parameter.
2572 (complete_target_initialization): Delete.
2573 (add_target_with_completer): No longer call
2574 complete_target_initialization.
2575 (target_supports_terminal_ours): Use regular delegation.
2576 (update_current_target): Delete.
2577 (push_target): No longer check magic number. Don't call
2578 update_current_target.
2579 (unpush_target): Don't call update_current_target.
2580 (target_is_pushed): No longer check magic number.
2581 (target_require_runnable): Skip for all stratums over
2583 (target_ops::info_proc): New.
2584 (target_info_proc): Use find_target_at and
2585 find_default_run_target.
2586 (target_supports_disable_randomization): Use regular delegation.
2587 (target_get_osdata): Use find_target_at.
2588 (target_ops::open, target_ops::close, target_ops::can_attach)
2589 (target_ops::attach, target_ops::can_create_inferior)
2590 (target_ops::create_inferior, target_ops::can_run)
2591 (target_can_run): New.
2592 (default_fileio_target): Use regular delegation.
2593 (target_ops::fileio_open, target_ops::fileio_pwrite)
2594 (target_ops::fileio_pread, target_ops::fileio_fstat)
2595 (target_ops::fileio_close, target_ops::fileio_unlink)
2596 (target_ops::fileio_readlink): New.
2597 (target_fileio_open_1, target_fileio_unlink)
2598 (target_fileio_readlink): Always call the target method. Handle
2600 (return_zero, return_zero_has_execution): Delete.
2601 (init_dummy_target): Delete.
2602 (dummy_target::dummy_target, dummy_target::shortname)
2603 (dummy_target::longname, dummy_target::doc)
2604 (debug_target::debug_target, debug_target::shortname)
2605 (debug_target::longname, debug_target::doc): New.
2606 (target_supports_delete_record): Use regular delegation.
2607 (setup_target_debug): Delete.
2608 (maintenance_print_target_stack): Skip debug_stratum.
2609 (initialize_targets): Instantiate the_dummy_target and
2611 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2613 (target_auxv_search, fprint_target_auxv): Adjust.
2614 (info_auxv_command): Adjust to use target_stack.
2615 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2616 * exceptions.c (print_flush): Handle a NULL target_stack.
2617 * regcache.c (target_ops_no_register): Refactor as class with
2620 * exec.c (exec_target): New class.
2621 (exec_ops): Now an exec_target.
2622 (exec_open, exec_close_1, exec_get_section_table)
2623 (exec_xfer_partial, exec_files_info, exec_has_memory)
2624 (exec_make_note_section): Refactor as exec_target methods.
2625 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2627 (exec_target::find_memory_regions): New.
2628 (_initialize_exec): Don't call init_exec_ops.
2629 * gdbcore.h (exec_file_clear): Delete.
2631 * corefile.c (core_target): Delete.
2632 (core_file_command): Adjust.
2633 * corelow.c (core_target): New class.
2634 (the_core_target): New.
2635 (core_close): Remove target_ops parameter.
2636 (core_close_cleanup): Adjust.
2637 (core_target::close): New.
2638 (core_open, core_detach, get_core_registers, core_files_info)
2639 (core_xfer_partial, core_thread_alive, core_read_description)
2640 (core_pid_to_str, core_thread_name, core_has_memory)
2641 (core_has_stack, core_has_registers, core_info_proc): Rework as
2642 core_target methods.
2643 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2644 (_initialize_corelow): Initialize the_core_target.
2645 * gdbcore.h (core_target): Delete.
2646 (the_core_target): New.
2648 * ctf.c: (ctf_target): New class.
2649 (ctf_ops): Now a ctf_target.
2650 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2651 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2652 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2654 (init_ctf_ops): Delete.
2655 (_initialize_ctf): Don't call it.
2656 * tracefile-tfile.c (tfile_target): New class.
2657 (tfile_ops): Now a tfile_target.
2658 (tfile_open, tfile_close, tfile_files_info)
2659 (tfile_get_tracepoint_status, tfile_trace_find)
2660 (tfile_fetch_registers, tfile_xfer_partial)
2661 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2662 Refactor as tfile_target methods.
2663 (tfile_xfer_partial_features): Remove target_ops parameter.
2664 (init_tfile_ops): Delete.
2665 (_initialize_tracefile_tfile): Don't call it.
2666 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2667 (tracefile_has_stack, tracefile_has_registers)
2668 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2669 tracefile_target methods.
2670 (init_tracefile_ops): Delete.
2671 (tracefile_target::tracefile_target): New.
2672 * tracefile.h: Include "target.h".
2673 (tracefile_target): New class.
2674 (init_tracefile_ops): Delete.
2676 * spu-multiarch.c (spu_multiarch_target): New class.
2677 (spu_ops): Now a spu_multiarch_target.
2678 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2679 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2680 (spu_search_memory, spu_mourn_inferior): Refactor as
2681 spu_multiarch_target methods.
2682 (init_spu_ops): Delete.
2683 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2684 complete_target_initialization.
2686 * ravenscar-thread.c (ravenscar_thread_target): New class.
2687 (ravenscar_ops): Now a ravenscar_thread_target.
2688 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2689 (ravenscar_thread_alive, ravenscar_pid_to_str)
2690 (ravenscar_fetch_registers, ravenscar_store_registers)
2691 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2692 (ravenscar_stopped_by_hw_breakpoint)
2693 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2694 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2695 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2697 (init_ravenscar_thread_ops): Delete.
2698 (_initialize_ravenscar): Remove references to
2699 init_ravenscar_thread_ops and complete_target_initialization.
2701 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2702 (bsd_uthread_target): New class.
2703 (bsd_uthread_ops): Now a bsd_uthread_target.
2704 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2705 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2706 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2707 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2708 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2709 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2710 (bsd_uthread_target): Delete function.
2711 (_initialize_bsd_uthread): Remove reference to
2712 complete_target_initialization.
2714 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2715 (target_bfd): ... this new class.
2716 (target_bfd_xfer_partial, target_bfd_get_section_table)
2717 (target_bfd_close): Refactor as target_bfd methods.
2718 (target_bfd::~target_bfd): New.
2719 (target_bfd_reopen): Adjust.
2720 (target_bfd::close): New.
2722 * record-btrace.c (record_btrace_target): New class.
2723 (record_btrace_ops): Now a record_btrace_target.
2724 (record_btrace_open, record_btrace_stop_recording)
2725 (record_btrace_disconnect, record_btrace_close)
2726 (record_btrace_async, record_btrace_info)
2727 (record_btrace_insn_history, record_btrace_insn_history_range)
2728 (record_btrace_insn_history_from, record_btrace_call_history)
2729 (record_btrace_call_history_range)
2730 (record_btrace_call_history_from, record_btrace_record_method)
2731 (record_btrace_is_replaying, record_btrace_will_replay)
2732 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2733 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2734 (record_btrace_store_registers, record_btrace_prepare_to_store)
2735 (record_btrace_to_get_unwinder)
2736 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2737 (record_btrace_commit_resume, record_btrace_wait)
2738 (record_btrace_stop, record_btrace_can_execute_reverse)
2739 (record_btrace_stopped_by_sw_breakpoint)
2740 (record_btrace_supports_stopped_by_sw_breakpoint)
2741 (record_btrace_stopped_by_hw_breakpoint)
2742 (record_btrace_supports_stopped_by_hw_breakpoint)
2743 (record_btrace_update_thread_list, record_btrace_thread_alive)
2744 (record_btrace_goto_begin, record_btrace_goto_end)
2745 (record_btrace_goto, record_btrace_stop_replaying_all)
2746 (record_btrace_execution_direction)
2747 (record_btrace_prepare_to_generate_core)
2748 (record_btrace_done_generating_core): Refactor as
2749 record_btrace_target methods.
2750 (init_record_btrace_ops): Delete.
2751 (_initialize_record_btrace): Remove reference to
2752 init_record_btrace_ops.
2753 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2754 the execution_direction global.
2755 (record_full_base_target, record_full_target)
2756 (record_full_core_target): New classes.
2757 (record_full_ops): Now a record_full_target.
2758 (record_full_core_ops): Now a record_full_core_target.
2759 (record_full_target::detach, record_full_target::disconnect)
2760 (record_full_core_target::disconnect)
2761 (record_full_target::mourn_inferior, record_full_target::kill):
2763 (record_full_open, record_full_close, record_full_async): Refactor
2764 as methods of the record_full_base_target class.
2765 (record_full_resume, record_full_commit_resume): Refactor
2766 as methods of the record_full_target class.
2767 (record_full_wait, record_full_stopped_by_watchpoint)
2768 (record_full_stopped_data_address)
2769 (record_full_stopped_by_sw_breakpoint)
2770 (record_full_supports_stopped_by_sw_breakpoint)
2771 (record_full_stopped_by_hw_breakpoint)
2772 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2773 methods of the record_full_base_target class.
2774 (record_full_store_registers, record_full_xfer_partial)
2775 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2776 Refactor as methods of the record_full_target class.
2777 (record_full_can_execute_reverse, record_full_get_bookmark)
2778 (record_full_goto_bookmark, record_full_execution_direction)
2779 (record_full_record_method, record_full_info, record_full_delete)
2780 (record_full_is_replaying, record_full_will_replay)
2781 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2782 (record_full_stop_replaying): Refactor as methods of the
2783 record_full_base_target class.
2784 (record_full_core_resume, record_full_core_kill)
2785 (record_full_core_fetch_registers)
2786 (record_full_core_prepare_to_store)
2787 (record_full_core_store_registers, record_full_core_xfer_partial)
2788 (record_full_core_insert_breakpoint)
2789 (record_full_core_remove_breakpoint)
2790 (record_full_core_has_execution): Refactor
2791 as methods of the record_full_core_target class.
2792 (record_full_base_target::supports_delete_record): New.
2793 (init_record_full_ops): Delete.
2794 (init_record_full_core_ops): Delete.
2795 (record_full_save): Refactor as method of the
2796 record_full_base_target class.
2797 (_initialize_record_full): Remove references to
2798 init_record_full_ops and init_record_full_core_ops.
2800 * remote.c (remote_target, extended_remote_target): New classes.
2801 (remote_ops): Now a remote_target.
2802 (extended_remote_ops): Now an extended_remote_target.
2803 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2804 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2805 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2806 (remote_pass_signals, remote_set_syscall_catchpoint)
2807 (remote_program_signals, )
2808 (remote_thread_always_alive): Remove target_ops parameter.
2809 (remote_thread_alive, remote_thread_name)
2810 (remote_update_thread_list, remote_threads_extra_info)
2811 (remote_static_tracepoint_marker_at)
2812 (remote_static_tracepoint_markers_by_strid)
2813 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2814 (remote_open): Refactor as methods of remote_target.
2815 (extended_remote_open, extended_remote_detach)
2816 (extended_remote_attach, extended_remote_post_attach):
2817 (extended_remote_supports_disable_randomization)
2818 (extended_remote_create_inferior): : Refactor as method of
2819 extended_remote_target.
2820 (remote_set_permissions, remote_open_1, remote_detach)
2821 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2822 (remote_resume, remote_commit_resume, remote_stop)
2823 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2824 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2825 (remote_prepare_to_store, remote_store_registers)
2826 (remote_flash_erase, remote_flash_done, remote_files_info)
2827 (remote_kill, remote_mourn, remote_insert_breakpoint)
2828 (remote_remove_breakpoint, remote_insert_watchpoint)
2829 (remote_watchpoint_addr_within_range)
2830 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2831 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2832 (remote_supports_stopped_by_sw_breakpoint)
2833 (remote_stopped_by_hw_breakpoint)
2834 (remote_supports_stopped_by_hw_breakpoint)
2835 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2836 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2837 (remote_verify_memory): Refactor as methods of remote_target.
2838 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2840 (remote_xfer_partial, remote_get_memory_xfer_limit)
2841 (remote_search_memory, remote_rcmd, remote_memory_map)
2842 (remote_pid_to_str, remote_get_thread_local_address)
2843 (remote_get_tib_address, remote_read_description): Refactor as
2844 methods of remote_target.
2845 (remote_target::fileio_open, remote_target::fileio_pwrite)
2846 (remote_target::fileio_pread, remote_target::fileio_close): New.
2847 (remote_hostio_readlink, remote_hostio_fstat)
2848 (remote_filesystem_is_local, remote_can_execute_reverse)
2849 (remote_supports_non_stop, remote_supports_disable_randomization)
2850 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2851 (remote_supports_enable_disable_tracepoint)
2852 (remote_supports_string_tracing)
2853 (remote_can_run_breakpoint_commands, remote_trace_init)
2854 (remote_download_tracepoint, remote_can_download_tracepoint)
2855 (remote_download_trace_state_variable, remote_enable_tracepoint)
2856 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2857 (remote_trace_start, remote_get_trace_status)
2858 (remote_get_tracepoint_status, remote_trace_stop)
2859 (remote_trace_find, remote_get_trace_state_variable_value)
2860 (remote_save_trace_data, remote_get_raw_trace_data)
2861 (remote_set_disconnected_tracing, remote_core_of_thread)
2862 (remote_set_circular_trace_buffer, remote_traceframe_info)
2863 (remote_get_min_fast_tracepoint_insn_len)
2864 (remote_set_trace_buffer_size, remote_set_trace_notes)
2865 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2866 (remote_disable_btrace, remote_teardown_btrace)
2867 (remote_read_btrace, remote_btrace_conf)
2868 (remote_augmented_libraries_svr4_read, remote_load)
2869 (remote_pid_to_exec_file, remote_can_do_single_step)
2870 (remote_execution_direction, remote_thread_handle_to_thread_info):
2871 Refactor as methods of remote_target.
2872 (init_remote_ops, init_extended_remote_ops): Delete.
2873 (remote_can_async_p, remote_is_async_p, remote_async)
2874 (remote_thread_events, remote_upload_tracepoints)
2875 (remote_upload_trace_state_variables): Refactor as methods of
2877 (_initialize_remote): Remove references to init_remote_ops and
2878 init_extended_remote_ops.
2880 * remote-sim.c (gdbsim_target): New class.
2881 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2882 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2883 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2884 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2885 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2886 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2887 Refactor as methods of gdbsim_target.
2888 (gdbsim_ops): Now a gdbsim_target.
2889 (init_gdbsim_ops): Delete.
2890 (gdbsim_cntrl_c): Adjust.
2891 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2893 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2894 (the_amd64_linux_nat_target): New.
2895 (amd64_linux_fetch_inferior_registers)
2896 (amd64_linux_store_inferior_registers): Refactor as methods of
2897 amd64_linux_nat_target.
2898 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2899 * i386-linux-nat.c: Don't include "linux-nat.h".
2900 (i386_linux_nat_target): New class.
2901 (the_i386_linux_nat_target): New.
2902 (i386_linux_fetch_inferior_registers)
2903 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2904 as methods of i386_linux_nat_target.
2905 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2906 * inf-child.c (inf_child_ops): Delete.
2907 (inf_child_fetch_inferior_registers)
2908 (inf_child_store_inferior_registers): Delete.
2909 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2910 methods of inf_child_target.
2911 (inf_child_target::supports_terminal_ours)
2912 (inf_child_target::terminal_init)
2913 (inf_child_target::terminal_inferior)
2914 (inf_child_target::terminal_ours_for_output)
2915 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2916 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2918 (inf_child_open, inf_child_disconnect, inf_child_close)
2919 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2920 (inf_child_post_startup_inferior, inf_child_can_run)
2921 (inf_child_pid_to_exec_file): Refactor as methods of
2923 (inf_child_follow_fork): Delete.
2924 (inf_child_target::can_create_inferior)
2925 (inf_child_target::can_attach): New.
2926 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2927 (inf_child_target::has_stack, inf_child_target::has_registers)
2928 (inf_child_target::has_execution): New.
2929 (inf_child_fileio_open, inf_child_fileio_pwrite)
2930 (inf_child_fileio_pread, inf_child_fileio_fstat)
2931 (inf_child_fileio_close, inf_child_fileio_unlink)
2932 (inf_child_fileio_readlink, inf_child_use_agent)
2933 (inf_child_can_use_agent): Refactor as methods of
2935 (return_zero, inf_child_target): Delete.
2936 (inf_child_target::inf_child_target): New.
2937 * inf-child.h: Include "target.h".
2938 (inf_child_target): Delete function prototype.
2939 (inf_child_target): New class.
2940 (inf_child_open_target, inf_child_mourn_inferior)
2941 (inf_child_maybe_unpush_target): Delete.
2942 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2943 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2944 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2945 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2946 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2947 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2948 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2949 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2950 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2951 methods of inf_ptrace_target.
2952 (inf_ptrace_target): Delete function.
2953 * inf-ptrace.h: Include "inf-child.h".
2954 (inf_ptrace_target): Delete function declaration.
2955 (inf_ptrace_target): New class.
2956 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2957 * linux-nat.c (linux_target): New.
2958 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2959 (linux_nat_target::~linux_nat_target): New.
2960 (linux_child_post_attach, linux_child_post_startup_inferior)
2961 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2962 (linux_child_remove_fork_catchpoint)
2963 (linux_child_insert_vfork_catchpoint)
2964 (linux_child_remove_vfork_catchpoint)
2965 (linux_child_insert_exec_catchpoint)
2966 (linux_child_remove_exec_catchpoint)
2967 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2968 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2969 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2970 (linux_nat_stopped_data_address)
2971 (linux_nat_stopped_by_sw_breakpoint)
2972 (linux_nat_supports_stopped_by_sw_breakpoint)
2973 (linux_nat_stopped_by_hw_breakpoint)
2974 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2975 (linux_nat_kill, linux_nat_mourn_inferior)
2976 (linux_nat_xfer_partial, linux_nat_thread_alive)
2977 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2978 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2979 (linux_child_static_tracepoint_markers_by_strid)
2980 (linux_nat_is_async_p, linux_nat_can_async_p)
2981 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2982 (linux_nat_supports_multi_process)
2983 (linux_nat_supports_disable_randomization, linux_nat_async)
2984 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2985 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2986 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2987 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2988 methods of linux_nat_target.
2989 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2990 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2992 (check_stopped_by_watchpoint): Adjust.
2993 (linux_xfer_partial): Delete.
2994 (linux_target_install_ops, linux_target, linux_nat_add_target):
2996 (linux_nat_target::linux_nat_target): New.
2997 * linux-nat.h: Include "inf-ptrace.h".
2998 (linux_nat_target): New.
2999 (linux_target, linux_target_install_ops, linux_nat_add_target):
3000 Delete function declarations.
3001 (linux_target): Declare global.
3002 * linux-thread-db.c (thread_db_target): New.
3003 (thread_db_target::thread_db_target): New.
3004 (thread_db_ops): Delete.
3005 (the_thread_db_target): New.
3006 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3007 (thread_db_update_thread_list, thread_db_pid_to_str)
3008 (thread_db_extra_thread_info)
3009 (thread_db_thread_handle_to_thread_info)
3010 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3011 (thread_db_resume): Refactor as methods of thread_db_target.
3012 (init_thread_db_ops): Delete.
3013 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3014 * x86-linux-nat.c: Don't include "linux-nat.h".
3015 (super_post_startup_inferior): Delete.
3016 (x86_linux_nat_target::~x86_linux_nat_target): New.
3017 (x86_linux_child_post_startup_inferior)
3018 (x86_linux_read_description, x86_linux_enable_btrace)
3019 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3020 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3021 methods of x86_linux_nat_target.
3022 (x86_linux_create_target): Delete. Bits folded ...
3023 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3025 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3026 (x86_linux_nat_target): New class.
3027 (x86_linux_create_target): Delete.
3028 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3029 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3030 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3031 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3032 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3033 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3035 (x86_use_watchpoints): Delete.
3036 * x86-nat.h: Include "breakpoint.h" and "target.h".
3037 (x86_use_watchpoints): Delete.
3038 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3039 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3040 (x86_insert_watchpoint, x86_remove_watchpoint)
3041 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3042 (x86_stopped_by_hw_breakpoint): New declarations.
3043 (x86_nat_target): New template class.
3045 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3046 (the_ppc_linux_nat_target): New.
3047 (ppc_linux_fetch_inferior_registers)
3048 (ppc_linux_can_use_hw_breakpoint)
3049 (ppc_linux_region_ok_for_hw_watchpoint)
3050 (ppc_linux_ranged_break_num_registers)
3051 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3052 (ppc_linux_insert_mask_watchpoint)
3053 (ppc_linux_remove_mask_watchpoint)
3054 (ppc_linux_can_accel_watchpoint_condition)
3055 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3056 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3057 (ppc_linux_watchpoint_addr_within_range)
3058 (ppc_linux_masked_watch_num_registers)
3059 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3060 (ppc_linux_read_description): Refactor as methods of
3061 ppc_linux_nat_target.
3062 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3064 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3065 (procfs_target): New class.
3066 (the_procfs_target): New.
3067 (procfs_target): Delete function.
3068 (procfs_auxv_parse, procfs_attach, procfs_detach)
3069 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3070 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3071 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3072 (procfs_create_inferior, procfs_update_thread_list)
3073 (procfs_thread_alive, procfs_pid_to_str)
3074 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3075 (procfs_stopped_data_address, procfs_insert_watchpoint)
3076 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3077 (proc_find_memory_regions, procfs_info_proc)
3078 (procfs_make_note_section): Refactor as methods of procfs_target.
3079 (_initialize_procfs): Adjust.
3080 * sol-thread.c (sol_thread_target): New class.
3081 (sol_thread_ops): Now a sol_thread_target.
3082 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
3083 (sol_thread_fetch_registers, sol_thread_store_registers)
3084 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
3085 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
3086 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
3087 (init_sol_thread_ops): Delete.
3088 (_initialize_sol_thread): Adjust. Remove references to
3089 init_sol_thread_ops and complete_target_initialization.
3091 * windows-nat.c (windows_nat_target): New class.
3092 (windows_fetch_inferior_registers)
3093 (windows_store_inferior_registers, windows_resume, windows_wait)
3094 (windows_attach, windows_detach, windows_pid_to_exec_file)
3095 (windows_files_info, windows_create_inferior)
3096 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
3097 (windows_close, windows_pid_to_str, windows_xfer_partial)
3098 (windows_get_tib_address, windows_get_ada_task_ptid)
3099 (windows_thread_name, windows_thread_alive): Refactor as
3100 windows_nat_target methods.
3101 (do_initial_windows_stuff): Adjust.
3102 (windows_target): Delete function.
3103 (_initialize_windows_nat): Adjust.
3105 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
3106 (darwin_mourn_inferior, darwin_kill_inferior)
3107 (darwin_create_inferior, darwin_attach, darwin_detach)
3108 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
3109 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
3110 (darwin_supports_multi_process): Refactor as darwin_nat_target
3112 (darwin_resume_to, darwin_files_info): Delete.
3113 (_initialize_darwin_inferior): Rename to ...
3114 (_initialize_darwin_nat): ... this. Adjust to C++ification.
3115 * darwin-nat.h: Include "inf-child.h".
3116 (darwin_nat_target): New class.
3117 (darwin_complete_target): Delete.
3118 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3119 (darwin_target): New.
3120 (i386_darwin_fetch_inferior_registers)
3121 (i386_darwin_store_inferior_registers): Refactor as methods of
3123 (darwin_complete_target): Delete, with ...
3124 (_initialize_i386_darwin_nat): ... bits factored out here.
3126 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3127 (the_alpha_linux_nat_target): New.
3128 (alpha_linux_register_u_offset): Refactor as
3129 alpha_linux_nat_target method.
3130 (_initialize_alpha_linux_nat): Adjust.
3131 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3132 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3133 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3134 methods of linux_nat_trad_target.
3135 (linux_trad_target): Delete.
3136 * linux-nat-trad.h (linux_trad_target): Delete function.
3137 (linux_nat_trad_target): New class.
3138 * mips-linux-nat.c (mips_linux_nat_target): New class.
3139 (super_fetch_registers, super_store_registers, super_close):
3141 (the_mips_linux_nat_target): New.
3142 (mips64_linux_regsets_fetch_registers)
3143 (mips64_linux_regsets_store_registers)
3144 (mips64_linux_fetch_registers, mips64_linux_store_registers)
3145 (mips_linux_register_u_offset, mips_linux_read_description)
3146 (mips_linux_can_use_hw_breakpoint)
3147 (mips_linux_stopped_by_watchpoint)
3148 (mips_linux_stopped_data_address)
3149 (mips_linux_region_ok_for_hw_watchpoint)
3150 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3151 (mips_linux_close): Refactor as methods of mips_linux_nat.
3152 (_initialize_mips_linux_nat): Adjust to C++ification.
3154 * aix-thread.c (aix_thread_target): New class.
3155 (aix_thread_ops): Now an aix_thread_target.
3156 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3157 (aix_thread_fetch_registers, aix_thread_store_registers)
3158 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3159 (aix_thread_thread_alive, aix_thread_pid_to_str)
3160 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3161 Refactor as methods of aix_thread_target.
3162 (init_aix_thread_ops): Delete.
3163 (_initialize_aix_thread): Remove references to init_aix_thread_ops
3164 and complete_target_initialization.
3165 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3166 (rs6000_nat_target): New class.
3167 (the_rs6000_nat_target): New.
3168 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3169 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3170 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3171 (super_create_inferior): Delete.
3172 (_initialize_rs6000_nat): Adjust to C++ification.
3174 * arm-linux-nat.c (arm_linux_nat_target): New class.
3175 (the_arm_linux_nat_target): New.
3176 (arm_linux_fetch_inferior_registers)
3177 (arm_linux_store_inferior_registers, arm_linux_read_description)
3178 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3179 (arm_linux_remove_hw_breakpoint)
3180 (arm_linux_region_ok_for_hw_watchpoint)
3181 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3182 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3183 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3184 arm_linux_nat_target.
3185 (_initialize_arm_linux_nat): Adjust to C++ification.
3187 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3188 (the_aarch64_linux_nat_target): New.
3189 (aarch64_linux_fetch_inferior_registers)
3190 (aarch64_linux_store_inferior_registers)
3191 (aarch64_linux_child_post_startup_inferior)
3192 (aarch64_linux_read_description)
3193 (aarch64_linux_can_use_hw_breakpoint)
3194 (aarch64_linux_insert_hw_breakpoint)
3195 (aarch64_linux_remove_hw_breakpoint)
3196 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3197 (aarch64_linux_region_ok_for_hw_watchpoint)
3198 (aarch64_linux_stopped_data_address)
3199 (aarch64_linux_stopped_by_watchpoint)
3200 (aarch64_linux_watchpoint_addr_within_range)
3201 (aarch64_linux_can_do_single_step): Refactor as methods of
3202 aarch64_linux_nat_target.
3203 (super_post_startup_inferior): Delete.
3204 (_initialize_aarch64_linux_nat): Adjust to C++ification.
3206 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
3207 (the_hppa_linux_nat_target): New.
3208 (hppa_linux_fetch_inferior_registers)
3209 (hppa_linux_store_inferior_registers): Refactor as methods of
3210 hppa_linux_nat_target.
3211 (_initialize_hppa_linux_nat): Adjust to C++ification.
3213 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3214 (the_ia64_linux_nat_target): New.
3215 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3216 (ia64_linux_stopped_data_address)
3217 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3218 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3219 ia64_linux_nat_target methods.
3220 (super_xfer_partial): Delete.
3221 (_initialize_ia64_linux_nat): Adjust to C++ification.
3223 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3224 (the_m32r_linux_nat_target): New.
3225 (m32r_linux_fetch_inferior_registers)
3226 (m32r_linux_store_inferior_registers): Refactor as
3227 m32r_linux_nat_target methods.
3228 (_initialize_m32r_linux_nat): Adjust to C++ification.
3230 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
3231 (the_m68k_linux_nat_target): New.
3232 (m68k_linux_fetch_inferior_registers)
3233 (m68k_linux_store_inferior_registers): Refactor as
3234 m68k_linux_nat_target methods.
3235 (_initialize_m68k_linux_nat): Adjust to C++ification.
3237 * s390-linux-nat.c (s390_linux_nat_target): New class.
3238 (the_s390_linux_nat_target): New.
3239 (s390_linux_fetch_inferior_registers)
3240 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
3241 (s390_insert_watchpoint, s390_remove_watchpoint)
3242 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
3243 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
3244 (s390_auxv_parse, s390_read_description): Refactor as methods of
3245 s390_linux_nat_target.
3246 (_initialize_s390_nat): Adjust to C++ification.
3248 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
3249 (the_sparc_linux_nat_target): New.
3250 (_initialize_sparc_linux_nat): Adjust to C++ification.
3251 * sparc-nat.c (sparc_fetch_inferior_registers)
3252 (sparc_store_inferior_registers): Remove target_ops parameter.
3253 * sparc-nat.h (sparc_fetch_inferior_registers)
3254 (sparc_store_inferior_registers): Remove target_ops parameter.
3255 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
3256 (the_sparc64_linux_nat_target): New.
3257 (_initialize_sparc64_linux_nat): Adjust to C++ification.
3259 * spu-linux-nat.c (spu_linux_nat_target): New class.
3260 (the_spu_linux_nat_target): New.
3261 (spu_child_post_startup_inferior, spu_child_post_attach)
3262 (spu_child_wait, spu_fetch_inferior_registers)
3263 (spu_store_inferior_registers, spu_xfer_partial)
3264 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
3266 (_initialize_spu_nat): Adjust to C++ification.
3268 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
3269 (the_tilegx_linux_nat_target): New.
3270 (fetch_inferior_registers, store_inferior_registers):
3271 Refactor as methods.
3272 (_initialize_tile_linux_nat): Adjust to C++ification.
3274 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
3275 (the_xtensa_linux_nat_target): New.
3276 (xtensa_linux_fetch_inferior_registers)
3277 (xtensa_linux_store_inferior_registers): Refactor as
3278 xtensa_linux_nat_target methods.
3279 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3281 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3282 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3283 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3284 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3285 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3286 (fbsd_stopped_by_sw_breakpoint)
3287 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3288 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3289 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3290 (fbsd_post_startup_inferior, fbsd_post_attach)
3291 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3292 (fbsd_set_syscall_catchpoint)
3293 (super_xfer_partial, super_resume, super_wait)
3294 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3295 (fbsd_handle_debug_trap): Remove target_ops parameter.
3296 (fbsd_nat_add_target): Delete.
3297 * fbsd-nat.h: Include "inf-ptrace.h".
3298 (fbsd_nat_add_target): Delete.
3299 (USE_SIGTRAP_SIGINFO): Define.
3300 (fbsd_nat_target): New class.
3302 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3303 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3304 (amd64bsd_target): Delete.
3305 * amd64-bsd-nat.h: New file.
3306 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3308 (amd64_fbsd_nat_target): New class.
3309 (the_amd64_fbsd_nat_target): New.
3310 (amd64fbsd_read_description): Refactor as method of
3311 amd64_fbsd_nat_target.
3312 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3313 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3314 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3315 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3316 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3317 (i386bsd_target): Delete.
3318 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3319 (i386bsd_fetch_inferior_registers)
3320 (i386bsd_store_inferior_registers): Declare.
3321 (i386_bsd_nat_target): New class.
3322 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3323 (the_i386_fbsd_nat_target): New.
3324 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3325 i386_fbsd_nat_target methods.
3326 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3327 (_initialize_i386fbsd_nat): Adjust to C++ification.
3328 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3329 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3330 (_initialize_x86_bsd_nat): Adjust to C++ification.
3331 * x86-bsd-nat.h: Include "x86-nat.h".
3332 (x86bsd_target): Delete declaration.
3333 (x86bsd_nat_target): New class.
3335 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3336 (the_aarch64_fbsd_nat_target): New.
3337 (aarch64_fbsd_fetch_inferior_registers)
3338 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3339 aarch64_fbsd_nat_target.
3340 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3341 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3342 (the_alpha_bsd_nat_target): New.
3343 (alphabsd_fetch_inferior_registers)
3344 (alphabsd_store_inferior_registers): Refactor as
3345 alpha_bsd_nat_target methods.
3346 (_initialize_alphabsd_nat): Refactor as methods of
3347 alpha_bsd_nat_target.
3348 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3349 (the_amd64_nbsd_nat_target): New.
3350 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3351 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3352 (the_amd64_obsd_nat_target): New.
3353 (_initialize_amd64obsd_nat): Adjust to C++ification.
3354 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3355 (the_arm_fbsd_nat_target): New.
3356 (arm_fbsd_fetch_inferior_registers)
3357 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3358 (_initialize_arm_fbsd_nat): Refactor as methods of
3359 arm_fbsd_nat_target.
3360 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3361 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3362 (the_arm_netbsd_nat_target): New.
3363 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3364 arm_netbsd_nat_target.
3365 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3366 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3367 (the_hppa_nbsd_nat_target): New.
3368 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3369 hppa_nbsd_nat_target methods.
3370 (_initialize_hppanbsd_nat): Adjust to C++ification.
3371 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3372 (the_hppa_obsd_nat_target): New.
3373 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3374 methods of hppa_obsd_nat_target.
3375 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3377 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3378 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3380 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3381 (_initialize_i386obsd_nat): Use add_target.
3382 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3383 (the_m68k_bsd_nat_target): New.
3384 (m68kbsd_fetch_inferior_registers)
3385 (m68kbsd_store_inferior_registers): Refactor as methods of
3386 m68k_bsd_nat_target.
3387 (_initialize_m68kbsd_nat): Adjust to C++ification.
3388 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3389 (the_mips_fbsd_nat_target): New.
3390 (mips_fbsd_fetch_inferior_registers)
3391 (mips_fbsd_store_inferior_registers): Refactor as methods of
3392 mips_fbsd_nat_target.
3393 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3395 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3396 (the_mips_nbsd_nat_target): New.
3397 (mipsnbsd_fetch_inferior_registers)
3398 (mipsnbsd_store_inferior_registers): Refactor as methods of
3399 mips_nbsd_nat_target.
3400 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3401 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3402 (the_mips64_obsd_nat_target): New.
3403 (mips64obsd_fetch_inferior_registers)
3404 (mips64obsd_store_inferior_registers): Refactor as methods of
3405 mips64_obsd_nat_target.
3406 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3408 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3410 * nbsd-nat.h: Include "inf-ptrace.h".
3411 (nbsd_nat_target): New class.
3412 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3413 (obsd_wait): Refactor as methods of obsd_nat_target.
3414 (obsd_add_target): Delete.
3415 * obsd-nat.h: Include "inf-ptrace.h".
3416 (obsd_nat_target): New class.
3417 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3418 (the_ppc_fbsd_nat_target): New.
3419 (ppcfbsd_fetch_inferior_registers)
3420 (ppcfbsd_store_inferior_registers): Refactor as methods of
3421 ppc_fbsd_nat_target.
3422 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3424 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3425 (the_ppc_nbsd_nat_target): New.
3426 (ppcnbsd_fetch_inferior_registers)
3427 (ppcnbsd_store_inferior_registers): Refactor as methods of
3428 ppc_nbsd_nat_target.
3429 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3430 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3431 (the_ppc_obsd_nat_target): New.
3432 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3433 methods of ppc_obsd_nat_target.
3434 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3436 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3437 (the_sh_nbsd_nat_target): New.
3438 (shnbsd_fetch_inferior_registers)
3439 (shnbsd_store_inferior_registers): Refactor as methods of
3441 (_initialize_shnbsd_nat): Adjust to C++ification.
3442 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3443 (inf_ptrace_xfer_partial): Delete.
3444 (sparc_xfer_partial, sparc_target): Delete.
3445 * sparc-nat.h (sparc_fetch_inferior_registers)
3446 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3447 (sparc_target): Delete function declaration.
3448 (sparc_target): New template class.
3449 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3450 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3451 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3452 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3454 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3455 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3456 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3457 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3459 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3460 (the_vax_bsd_nat_target): New.
3461 (vaxbsd_fetch_inferior_registers)
3462 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3464 (_initialize_vaxbsd_nat): Adjust to C++ification.
3466 * bsd-kvm.c (bsd_kvm_target): New class.
3467 (bsd_kvm_ops): Now a bsd_kvm_target.
3468 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3469 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3470 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3472 (bsd_kvm_return_one): Delete.
3473 (bsd_kvm_add_target): Adjust to C++ification.
3475 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3476 (nto_procfs_target_procfs): New classes.
3477 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3478 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3479 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3480 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3481 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3482 (procfs_remove_hw_breakpoint, procfs_resume)
3483 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3484 (procfs_kill_inferior, procfs_store_registers)
3485 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3486 as methods of nto_procfs_target.
3487 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3488 (nto_native_ops): Delete.
3489 (procfs_open, procfs_native_open): Delete.
3490 (nto_native_ops): Now an nto_procfs_target_native.
3491 (init_procfs_targets): Adjust to C++ification.
3492 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3493 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3494 Refactor as methods of nto_procfs_target.
3496 * go32-nat.c (go32_nat_target): New class.
3497 (the_go32_nat_target): New.
3498 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3499 (go32_store_registers, go32_xfer_partial, go32_files_info)
3500 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3501 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3502 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3503 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3504 (go32_target): Delete.
3505 (_initialize_go32_nat): Adjust to C++ification.
3507 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3508 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3509 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3510 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3512 (gnu_target): Delete.
3513 * gnu-nat.h (gnu_target): Delete.
3514 (gnu_nat_target): New class.
3515 * i386-gnu-nat.c (gnu_base_target): New.
3516 (i386_gnu_nat_target): New class.
3517 (the_i386_gnu_nat_target): New.
3518 (_initialize_i386gnu_nat): Adjust to C++ification.
3520 2018-05-02 Pedro Alves <palves@redhat.com>
3522 * bfd-target.c (target_bfd_xclose): Rename to ...
3523 (target_bfd_close): ... this.
3524 (target_bfd_reopen): Adjust.
3525 * target.c (target_close): Remove references to to_xclose.
3526 * target.h (target_ops::to_xclose): Delete.
3527 (target_ops::to_close): Update comments.
3529 2018-05-02 Pedro Alves <palves@redhat.com>
3531 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3533 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3534 * inf-ptrace.c (inf_ptrace_register_u_offset)
3535 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3536 (inf_ptrace_store_register, inf_ptrace_store_registers)
3537 (inf_ptrace_trad_target): Move to ...
3538 * linux-nat-trad.c: ... this new file.
3539 * linux-nat-trad.h: New file.
3540 * linux-nat.c (linux_target_install_ops): Make extern.
3541 (linux_trad_target): Delete.
3542 * linux-nat.h (linux_trad_target): Delete declaration.
3543 (linux_target_install_ops): Declare.
3544 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3547 2018-05-02 Pedro Alves <palves@redhat.com>
3549 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3550 procfs_target/add_target here.
3551 * procfs.c (procfs_target): Make static.
3552 (_initialize_procfs): Call add_target here.
3553 * procfs.h (struct target_ops): Remove forward declaration.
3554 (procfs_target): Remove declaration.
3555 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3557 2018-05-02 Pedro Alves <palves@redhat.com>
3559 * procfs.c (procfs_stopped_by_watchpoint)
3560 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3561 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3563 (procfs_use_watchpoints): Delete, move contents...
3564 (procfs_target): ... here.
3565 * procfs.h (procfs_use_watchpoints): Delete declaration.
3566 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3567 procfs_use_watchpoints.
3568 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3569 procfs_use_watchpoints.
3571 2018-05-02 Tom Tromey <tom@tromey.com>
3574 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3575 and var_zuinteger_unlimited.
3576 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3577 and PARAM_ZUINTEGER_UNLIMITED.
3578 (set_parameter_value): Handle var_zuinteger and
3579 var_zuinteger_unlimited.
3580 (add_setshow_generic): Likewise.
3581 (parmpy_init): Likewise.
3583 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3586 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3587 pointer is not null before dereferencing it.
3589 2018-04-30 Tom Tromey <tom@tromey.com>
3591 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3594 2018-04-30 Tom Tromey <tom@tromey.com>
3596 * breakpoint.c (mention): Remove use of is_mi_like_p.
3597 (print_mention_ranged_breakpoint): Likewise.
3598 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3601 2018-04-30 Tom Tromey <tom@tromey.com>
3603 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3605 2018-04-30 Tom Tromey <tom@tromey.com>
3607 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3608 (info_spu_event_command): Remove some uses of is_mi_like_p.
3610 2018-04-30 Tom Tromey <tom@tromey.com>
3612 * python/py-framefilter.c (py_print_single_arg)
3613 (enumerate_locals, py_print_args, py_print_frame): Remove some
3614 uses of is_mi_like_p.
3616 2018-04-30 Tom Tromey <tom@tromey.com>
3619 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3620 * ui-out.h (ui_out::is_mi_like_p): Now const.
3621 (ui_out::do_is_mi_like_p): Now const.
3622 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3624 2018-04-30 Tom Tromey <tom@tromey.com>
3626 * varobj.c (varobj_set_visualizer): Use new_reference.
3627 * python/python.c (gdbpy_decode_line): Use new_reference.
3628 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3631 2018-04-30 Tom Tromey <tom@tromey.com>
3633 * varobj.c (install_new_value): Use new_reference.
3634 * value.h (value_incref): Return void. Swap intro comment with
3636 * value.c (set_value_parent): Use new_reference.
3637 (value_incref): Return void. Update intro comment.
3638 (release_value): Use new_reference.
3639 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3641 2018-04-30 Tom Tromey <tom@tromey.com>
3643 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3644 * gdb_bfd.h (new_bfd_ref): Remove.
3645 (gdb_bfd_open): Update comment.
3646 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3647 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3648 (gdb_bfd_fdopenr): Use new_reference.
3649 * exec.c (exec_file_attach): Use new_reference.
3651 2018-04-30 Tom Tromey <tom@tromey.com>
3653 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3656 2018-04-30 Tom Tromey <tom@tromey.com>
3658 * jit.c (jit_read_code_entry): Use type_align.
3659 * i386-tdep.c (i386_gdbarch_init): Don't call
3660 set_gdbarch_long_long_align_bit.
3661 * gdbarch.sh: Remove long_long_align_bit.
3662 * gdbarch.c, gdbarch.h: Rebuild.
3663 * arc-tdep.c (arc_type_align): New function.
3664 (arc_gdbarch_init): Use arc_type_align. Don't call
3665 set_gdbarch_long_long_align_bit.
3667 2018-04-30 Tom Tromey <tom@tromey.com>
3669 * rust-lang.c (rust_type_alignment): Remove.
3670 (rust_composite_type): Use type_align.
3672 2018-04-30 Tom Tromey <tom@tromey.com>
3674 * NEWS: Mention Type.align.
3675 * python/py-type.c (typy_get_alignof): New function.
3676 (type_object_getset): Add "alignof".
3678 2018-04-30 Tom Tromey <tom@tromey.com>
3682 * std-operator.def (UNOP_ALIGNOF): New operator.
3683 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3685 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3686 * c-lang.c (c_op_print_tab): Add alignof.
3687 * c-exp.y (ALIGNOF): New token.
3688 (exp): Add "ALIGNOF" production.
3689 (ident_tokens): Add _Alignof and alignof.
3691 2018-04-30 Tom Tromey <tom@tromey.com>
3693 * i386-tdep.c (i386_type_align): New function.
3694 (i386_gdbarch_init): Update.
3695 * gdbarch.sh (type_align): New method.
3696 * gdbarch.c, gdbarch.h: Rebuild.
3697 * arch-utils.h (default_type_align): Declare.
3698 * arch-utils.c (default_type_align): New function.
3699 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3700 (struct type) <align_log2>: New field.
3701 <instance_flags>: Now a bitfield.
3702 (TYPE_RAW_ALIGN): New macro.
3703 (type_align, type_raw_align, set_type_align): Declare.
3704 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3706 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3707 (get_alignment, maybe_set_alignment): New functions.
3708 (read_structure_type, read_enumeration_type, read_array_type)
3709 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3710 (read_subrange_type, read_base_type): Set type alignment.
3712 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3714 * dwarf2read.c (read_index_from_section): Use bool.
3716 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3719 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3722 2018-04-29 John Reiser <jreiser@BitWagon.com>
3725 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3726 last step, and do it atomically.
3728 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3730 * compile/compile-c-types.c (convert_int, convert_float):
3733 2018-04-27 Tom Tromey <tom@tromey.com>
3736 * rust-lang.c (rust_inclusive_range_type_p): New function.
3737 (rust_range): Handle inclusive ranges.
3738 (rust_compute_range): Likewise.
3739 * rust-exp.y (struct rust_op) <inclusive>: New field.
3740 (DOTDOTEQ): New constant.
3741 (range_expr): Add "..=" productions.
3742 (operator_tokens): Add "..=" token.
3743 (ast_range): Add "inclusive" parameter.
3744 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3746 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3748 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3749 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3751 * expprint.c (print_subexp_standard): Handle new bounds values.
3752 (dump_subexp_body_standard): Likewise.
3754 2018-04-27 Tom Tromey <tom@tromey.com>
3756 * configure: Rebuild.
3757 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3758 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3760 (class symbol_needs_eval_context): Likewise.
3761 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3762 (mock_mapped_index::symbol_name_at): Use "override". Remove
3764 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3766 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3767 * aarch64-tdep.c (instruction_reader::read): Use "override".
3768 (instruction_reader_test::read): Likewise.
3769 * arm-tdep.c (instruction_reader::read): Use "override".
3770 (instruction_reader_thumb::read): Likewise.
3772 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3775 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3776 instead of remote_send.
3777 (remote_send): Remove.
3779 2018-04-26 Pedro Alves <palves@redhat.com>
3781 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3782 find_function_start_sal instead of find_pc_line.
3784 2018-04-26 Pedro Alves <palves@redhat.com>
3786 * breakpoint.c (set_breakpoint_location_function): Handle
3788 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3789 * elfread.c (elf_symtab_read): Give data symbols with
3790 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3791 (elf_rel_plt_read): Update comment.
3792 * linespec.c (convert_linespec_to_sals): Handle
3794 (minsym_found): Handle mst_data_gnu_ifunc.
3795 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3796 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3797 * parse.c (find_minsym_type_and_address): Handle
3799 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3800 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3801 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3803 <mst_data_gnu_ifunc>: New enumerator.
3805 2018-04-26 Pedro Alves <palves@redhat.com>
3807 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3808 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3809 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3811 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3812 (lookup_minimal_symbol_by_pc): Adjust.
3813 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3814 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3815 * minsyms.h (lookup_msym_prefer): New enum.
3816 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3817 parameter by a lookup_msym_prefer parameter.
3819 2018-04-26 Pedro Alves <palves@redhat.com>
3821 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3822 ends in "@plt" instead of looking at the symbol's section.
3824 2018-04-26 Pedro Alves <palves@redhat.com>
3826 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3828 (find_pc_partial_function_gnu_ifunc): Rename to ...
3829 (find_pc_partial_function): ... this, and remove references to
3831 (find_pc_partial_function): Delete old implementation.
3832 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3834 2018-04-26 Pedro Alves <palves@redhat.com>
3836 * linespec.c (struct bound_minimal_symbol_search_key): New.
3837 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3838 skip first line if we found a GNU ifunc minimal symbol by name.
3839 (compare_msymbols): Change parameters to work with a destructured
3841 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3844 2018-04-26 Pedro Alves <palves@redhat.com>
3846 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3847 ifunc targets here. Instead, if we have an ifunc minsym, use its
3849 (add_location_to_breakpoint): Store the minsym and the objfile in
3850 the breakpoint location.
3851 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3852 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3853 Record the minsym in the sal.
3854 * symtab.h (symtab_and_line) <msymbol>: New field.
3856 2018-04-26 Pedro Alves <palves@redhat.com>
3858 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3859 unless we actually resolved the ifunc.
3861 2018-04-26 Pedro Alves <palves@redhat.com>
3863 * c-exp.y (variable production): Prefer ifunc minsyms over
3864 regular function symbols.
3865 * symtab.c (find_gnu_ifunc): New function.
3866 * minsyms.h (lookup_msym_prefer): New enum.
3867 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3868 parameter by a lookup_msym_prefer parameter.
3869 * symtab.h (find_gnu_ifunc): New declaration.
3871 2018-04-26 Pedro Alves <palves@redhat.com>
3873 * blockframe.c (find_gnu_ifunc_target_type): New function.
3874 (find_function_type): New.
3875 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3876 return a value with a memory address.
3877 (eval_call): For calls to GNU ifunc functions, try to find the
3878 type of the target function from the type that the resolver
3880 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3882 * infcall.c (find_function_return_type): Delete.
3883 (find_function_addr): Add 'function_type' parameter. For calls to
3884 GNU ifunc functions, try to find the type of the target function
3885 from the type that the resolver returns, and return it via
3887 (call_function_by_hand_dummy): Adjust to use the function type
3888 returned by find_function_addr.
3889 (find_function_addr): Add 'function_type' parameter and move
3891 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3894 2018-04-26 Pedro Alves <palves@redhat.com>
3896 * c-exp.y (variable production): Skip finding an alias for ifunc
3899 2018-04-26 Pedro Alves <palves@redhat.com>
3901 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3903 2018-04-25 Pedro Alves <palves@redhat.com>
3905 * infcmd.c (kill_command): Print the pid as string, not the whole
3906 thread's ptid. Add comment. s/has been killed/killed/ in output
3908 * remote.c (remote_detach_1): Print the pid as string, not the
3909 whole thread's ptid.
3911 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3912 Sergio Durigan Junior <sergiodj@redhat.com>
3913 Pedro Alves <palves@redhat.com>
3915 * infcmd.c (kill_command): Print message when inferior has
3917 * inferior.c (print_inferior_events): Remove 'static'. Set as
3919 (add_inferior): Improve message printed when
3920 'print_inferior_events' is on.
3921 (exit_inferior): Remove message printed when
3922 'print_inferior_events' is on.
3923 (detach_inferior): Improve message printed when
3924 'print_inferior_events' is on.
3925 (initialize_inferiors): Use 'add_inferior_silent' to set
3926 'current_inferior_'.
3927 * inferior.h (print_inferior_events): Declare here as
3929 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3930 '[Detaching...]' messages when 'print_inferior_events' is on.
3931 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3932 as prefix/suffix for messages. Remove periods. Fix erroneous
3933 'Detaching after fork from child...', replace it by '... from
3935 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3936 prefix/suffix when printing 'Detaching...' messages. Print
3937 them when 'print_inferior_events' is on.
3938 * remote.c (remote_detach_1): Print message when detaching
3939 from inferior and '!is_fork_parent'.
3941 2018-04-24 Tom Tromey <tom@tromey.com>
3943 * cli-out.h: Reindent.
3945 2018-04-24 Tom Tromey <tom@tromey.com>
3947 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3948 (cli_ui_out::do_field_string): Use fputs_filtered.
3949 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3951 2018-04-23 Tom Tromey <tom@tromey.com>
3953 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3954 gdb::unique_xmalloc_ptr.
3956 2018-04-23 Tom Tromey <tom@tromey.com>
3958 * configure: Rebuild.
3960 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3963 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3964 prepare_for_testing. Set normal_bp to r_debug_state if target
3967 2018-04-21 Pedro Alves <palves@redhat.com>
3968 Rajendra SY <rajendra.sy@gmail.com>
3970 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3971 * remote.c (extended_remote_attach): In all-stop mode, mark the
3972 thread as executing.
3974 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3976 * thread.c (thread_apply_all_command): Fix comment.
3977 (thread_command): Fix comment.
3979 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3981 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3983 * features/aarch64-core.c (create_feature_aarch64_core):
3985 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3987 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3989 * features/i386/32bit-avx512.c
3990 (create_feature_i386_32bit_avx512): Likewise.
3991 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3993 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3995 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3997 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3999 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4001 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4003 * features/i386/64bit-avx512.c
4004 (create_feature_i386_64bit_avx512): Likewise.
4005 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4007 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4009 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4011 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4013 * features/i386/64bit-segments.c
4014 (create_feature_i386_64bit_segments): Likewise.
4015 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4017 * features/i386/x32-core.c
4018 (create_feature_i386_x32_core): Likewise.
4019 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4020 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4021 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4022 * target-descriptions.c: In generated code, don't pass xml
4025 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4027 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4028 (print_xml_feature::visit_post): Likewise.
4029 (print_xml_feature::visit): Likewise.
4030 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4031 (print_xml_feature): Add new class.
4032 * regformats/regdat.sh: Null xmltarget on feature targets.
4033 * target-descriptions.c (struct target_desc): Add xmltarget.
4034 (maintenance_check_tdesc_xml_convert): Add unittest function.
4035 (tdesc_get_features_xml): Add function to get xml.
4036 (maintenance_check_xml_descriptions): Test xml generation.
4037 * xml-tdesc.c (string_read_description_xml): Add function.
4038 * xml-tdesc.h (string_read_description_xml): Add declaration.
4040 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4042 * features/Makefile: Add feature marker to targets with new style
4043 target descriptions.
4044 * regformats/aarch64.dat: Regenerate.
4045 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4046 * regformats/i386/amd64-avx-linux.dat: Likewise.
4047 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4048 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4049 * regformats/i386/amd64-linux.dat: Likewise.
4050 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4051 * regformats/i386/amd64.dat: Likewise.
4052 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4053 * regformats/i386/i386-avx-linux.dat: Likewise.
4054 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4055 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4056 * regformats/i386/i386-linux.dat: Likewise.
4057 * regformats/i386/i386-mmx-linux.dat: Likewise.
4058 * regformats/i386/i386-mpx-linux.dat: Likewise.
4059 * regformats/i386/i386.dat: Likewise.
4060 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4061 * regformats/i386/x32-avx-linux.dat: Likewise.
4062 * regformats/i386/x32-linux.dat: Likewise.
4063 * regformats/tic6x-c62x-linux.dat: Likewise.
4064 * regformats/tic6x-c64x-linux.dat: Likewise.
4065 * regformats/tic6x-c64xp-linux.dat: Likewise.
4066 * regformats/regdat.sh: Parse feature marker.
4068 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4070 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4071 (tdesc_osabi_name): Likewise.
4072 * target-descriptions.c (tdesc_architecture_name): Add new
4074 (tdesc_osabi_name): Likewise.
4076 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4078 * common/tdesc.c (tdesc_predefined_type): Move to here.
4079 (tdesc_named_type): Likewise.
4080 (tdesc_create_vector): Likewise.
4081 (tdesc_create_struct): Likewise.
4082 (tdesc_set_struct_size): Likewise.
4083 (tdesc_create_union): Likewise.
4084 (tdesc_create_flags): Likewise.
4085 (tdesc_create_enum): Likewise.
4086 (tdesc_add_field): Likewise.
4087 (tdesc_add_typed_bitfield): Likewise.
4088 (tdesc_add_bitfield): Likewise.
4089 (tdesc_add_flag): Likewise.
4090 (tdesc_add_enum_value): Likewise.
4091 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
4092 (struct tdesc_type_vector): Likewise.
4093 (struct tdesc_type_field): Likewise.
4094 (struct tdesc_type_with_fields): Likewise.
4095 (tdesc_create_enum): Add declaration.
4096 (tdesc_add_typed_bitfield): Likewise.
4097 (tdesc_add_enum_value): Likewise.
4098 * target-descriptions.c (tdesc_type_field): Move from here.
4099 (tdesc_type_builtin): Likewise.
4100 (tdesc_type_vector): Likewise.
4101 (tdesc_type_with_fields): Likewise.
4102 (tdesc_predefined_types): Likewise.
4103 (tdesc_named_type): Likewise.
4104 (tdesc_create_vector): Likewise.
4105 (tdesc_create_struct): Likewise.
4106 (tdesc_set_struct_size): Likewise.
4107 (tdesc_create_union): Likewise.
4108 (tdesc_create_flags): Likewise.
4109 (tdesc_create_enum): Likewise.
4110 (tdesc_add_field): Likewise.
4111 (tdesc_add_typed_bitfield): Likewise.
4112 (tdesc_add_bitfield): Likewise.
4113 (tdesc_add_flag): Likewise.
4114 (tdesc_add_enum_value): Likewise.
4115 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4116 (tdesc_add_typed_bitfield): Likewise.
4117 (tdesc_add_enum_value): Likewise.
4119 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4121 * common/tdesc.c (tdesc_feature::accept): Move to here.
4122 (tdesc_feature::operator==): Likewise.
4123 (tdesc_create_reg): Likewise.
4124 * common/tdesc.h (tdesc_type_kind): Likewise.
4125 (struct tdesc_type): Likewise.
4126 (struct tdesc_feature): Likewise.
4127 * regformats/regdat.sh: Create a feature.
4128 * target-descriptions.c (tdesc_type_kind): Move from here.
4129 (tdesc_type): Likewise.
4130 (tdesc_type_up): Likewise.
4131 (tdesc_feature): Likewise.
4132 (tdesc_create_reg): Likewise.
4134 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4136 * Makefile.in: Add arch/tdesc.c
4137 * common/tdesc.c: New file.
4138 * common/tdesc.h (tdesc_element_visitor): Move to here.
4139 (tdesc_element): Likewise.
4140 (tdesc_reg): Likewise.
4141 (tdesc_reg_up): Likewise.
4142 * regformats/regdef.h (reg): Add offset to constructors.
4143 * target-descriptions.c (tdesc_element_visitor): Move from here.
4144 (tdesc_element): Likewise.
4145 (tdesc_reg): Likewise.
4146 (tdesc_reg_up): Likewise.
4148 2018-04-17 Tom Tromey <tom@tromey.com>
4150 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4153 2018-04-17 Tom Tromey <tom@tromey.com>
4155 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4157 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
4159 * symtab.c (print_symbol_info): Skip printing filename and line
4160 number when `last' is NULL.
4161 (symtab_symbol_info): Use empty string instead of NULL for first
4162 invocation of print_symbol_info.
4163 (rbreak_command): Pass NULL to `last' parameter of
4166 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
4168 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4171 2018-04-16 Pedro Alves <palves@redhat.com>
4173 * MAINTAINERS (sh): Remove.
4174 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4175 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4176 (ALLDEPFILES): Remove sh64-tdep.c.
4177 * NEWS: Mentions that support for SH-5/SH64 is removed.
4178 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4179 (sh*-*-openbsd*): Ditto.
4180 (sh64-*-elf*): Remove.
4182 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4183 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4184 * sh-tdep.c: No longer include "sh64-tdep.h".
4185 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4186 * sh64-tdep.c, sh64-tdep.h: Remove files.
4188 2018-04-16 Pedro Alves <palves@redhat.com>
4190 * MAINTAINERS: Remove m88k.
4191 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4192 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4193 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4194 * NEWS: Mention that support for m88k was removed.
4195 * configure.host (m88*-*-*): Remove support.
4196 * configure.nat (m88k-*-*): Remove support.
4197 * configure.tgt (m88*-*-openbsd*): Remove.
4198 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
4200 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
4202 * configure.tgt (x86_tobjs): New variable.
4203 (amd64_tobjs, i386_tobjs): Use it.
4205 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4207 * symtab.c (print_symbol_info): Precede the symbol definition by
4208 the line number when available.
4209 * NEWS: Advertise this enhancement.
4211 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4213 * NEWS (New options): announce set/show record btrace cpu.
4214 * btrace.c: Include record-btrace.h.
4215 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4216 the vendor is unknown.
4217 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
4218 Maybe overwrite the btrace configuration's cpu.
4219 (btrace_compute_ftrace): Add cpu parameter. Update callers.
4220 (btrace_fetch): Add cpu parameter. Update callers.
4221 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4222 Maybe overwrite the btrace configuration's cpu. Skip enabling
4223 errata workarounds if the vendor is unknown.
4224 * python/py-record-btrace.c: Include record-btrace.h.
4225 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4226 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4227 * record-btrace.c (record_btrace_cpu_state_kind): New.
4228 (record_btrace_cpu): New.
4229 (set_record_btrace_cpu_cmdlist): New.
4230 (record_btrace_get_cpu): New.
4231 (require_btrace_thread, record_btrace_info)
4232 (record_btrace_resume_thread): Call record_btrace_get_cpu.
4233 (cmd_set_record_btrace_cpu_none): New.
4234 (cmd_set_record_btrace_cpu_auto): New.
4235 (cmd_set_record_btrace_cpu): New.
4236 (cmd_show_record_btrace_cpu): New.
4237 (_initialize_record_btrace): Initialize set/show record btrace cpu
4239 * record-btrace.h (record_btrace_get_cpu): New.
4241 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4243 * record.c (set_record_command): Fix typo in message.
4245 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4247 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4249 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4251 * infrun.c (process_event_stop_test): Call
4252 gdbarch_in_indirect_branch_thunk.
4253 * gdbarch.sh (in_indirect_branch_thunk): New.
4254 * gdbarch.c: Regenerated.
4255 * gdbarch.h: Regenerated.
4258 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
4259 (HFILES_NO_SRCDIR): Add x86-tdep.h.
4260 (ALLDEPFILES): Add x86-tdep.c.
4261 * arch-utils.h (default_in_indirect_branch_thunk): New.
4262 * arch-utils.c (default_in_indirect_branch_thunk): New.
4263 * i386-tdep: Include x86-tdep.h.
4264 (i386_in_indirect_branch_thunk): New.
4265 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
4267 * amd64-tdep: Include x86-tdep.h.
4268 (amd64_in_indirect_branch_thunk): New.
4269 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
4271 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4274 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
4275 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
4276 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4279 2018-04-12 Tom Tromey <tom@tromey.com>
4281 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4282 (rust_evaluate_subexp): Likewise.
4284 2018-04-12 Pedro Alves <palves@redhat.com>
4286 * procfs.c (procfs_detach): Make forward declaration's prototype
4287 match definition's protototype.
4288 (proc_get_LDT_entry): Remove stale do_cleanups call.
4290 2018-04-12 Pedro Alves <palves@redhat.com>
4292 * target.h (target_ops::to_has_exited): Delete.
4293 (target_has_exited): Delete.
4294 * target-delegates.c: Regenerate.
4296 2018-04-11 Pedro Alves <palves@redhat.com>
4298 * target.c (fileio_fh_t::t): Add comment.
4299 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4300 (target_fileio_close): Handle a NULL target.
4301 (invalidate_fileio_fh): New.
4302 (target_close): Call it.
4303 * remote.c (remote_hostio_send_command): No longer check whether
4304 remote_desc is open.
4306 2018-04-11 Pedro Alves <palves@redhat.com>
4308 * target.c (fileio_fh_t): Make it a named struct instead of a
4310 (fileio_fh_t::is_closed): New method.
4311 (DEF_VEC_O (fileio_fh_t)): Remove.
4312 (fileio_fhandles): Now a std::vector.
4313 (is_closed_fileio_fh): Delete.
4314 (acquire_fileio_fd): Adjust. Rename parameters.
4315 (release_fileio_fd): Adjust.
4316 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4317 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4318 (target_fileio_close): Adjust.
4320 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4322 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4325 2018-04-10 Pedro Alves <palves@redhat.com>
4327 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4328 (scoped_finish_thread_state): New class.
4329 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4331 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4332 (fetch_inferior_event, normal_stop): Likewise.
4333 * thread.c (finish_thread_state_cleanup): Delete.
4335 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4336 Pedro Alves <palves@redhat.com>
4338 * value.c: Include "selftest.h" and "common/array-view.h".
4339 (struct range) <operator ==>: New.
4340 (test_ranges_contain): New.
4341 (check_ranges_vector): New.
4342 (test_insert_into_bit_range_vector): New.
4343 (_initialize_values): Register selftests.
4344 * common/array-view.h (operator==, operator!=): New.
4346 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4348 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4350 * inline-frame.c: Include <algorithm>.
4351 (struct inline_state): Add constructor.
4352 (inline_state_s): Remove.
4353 (DEF_VEC_O(inline_state_s)): Remove.
4354 (inline_states): Change type to std::vector.
4355 (find_inline_frame_state): Adjust to std::vector.
4356 (allocate_inline_frame_state): Remove.
4357 (clear_inline_frame_state): Adjust to std::vector.
4358 (skip_inline_frames): Adjust to std::vector.
4360 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4362 * tracepoint.h (struct trace_state_variable): Add constructor.
4363 <name>: Change type to std::string.
4364 * tracepoint.c (tsv_s): Remove.
4365 (DEF_VEC_O(tsv_s)): Remove.
4366 (tvariables): Change to std::vector.
4367 (create_trace_state_variable): Adjust to std::vector.
4368 (find_trace_state_variable): Likewise.
4369 (find_trace_state_variable_by_number): Likewise.
4370 (delete_trace_state_variable): Likewise.
4371 (trace_variable_command): Adjust to std::string.
4372 (delete_trace_variable_command): Likewise.
4373 (tvariables_info_1): Adjust to std::vector.
4374 (save_trace_state_variables): Likewise.
4375 (start_tracing): Likewise.
4376 (merge_uploaded_trace_state_variables): Adjust to std::vector
4378 * target.h (struct target_ops)
4379 <to_download_trace_state_variable>: Pass reference to
4380 trace_state_variable.
4381 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4382 * target-delegates.c: Re-generate.
4383 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4384 (mi_tsv_deleted): Likewise.
4385 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4386 * remote.c (remote_download_trace_state_variable): Change
4387 pointer to reference and adjust.
4388 * make-target-delegates (parse_argtypes): Handle references.
4389 (write_function_header): Likewise.
4390 (munge_type): Likewise.
4392 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4394 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4395 string_view-selftests.c.
4396 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4398 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4399 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4400 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4401 * unittests/basic_string_view/element_access/char/1.cc:
4403 * unittests/basic_string_view/element_access/char/empty.cc:
4405 * unittests/basic_string_view/element_access/char/front_back.cc:
4407 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4408 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4410 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4412 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4414 * unittests/basic_string_view/operations/compare/char/1.cc:
4416 * unittests/basic_string_view/operations/compare/char/13650.cc:
4418 * unittests/basic_string_view/operations/copy/char/1.cc:
4420 * unittests/basic_string_view/operations/data/char/1.cc:
4422 * unittests/basic_string_view/operations/find/char/1.cc:
4424 * unittests/basic_string_view/operations/find/char/2.cc:
4426 * unittests/basic_string_view/operations/find/char/3.cc:
4428 * unittests/basic_string_view/operations/find/char/4.cc:
4430 * unittests/basic_string_view/operations/rfind/char/1.cc:
4432 * unittests/basic_string_view/operations/rfind/char/2.cc:
4434 * unittests/basic_string_view/operations/rfind/char/3.cc:
4436 * unittests/basic_string_view/operations/substr/char/1.cc:
4438 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4439 * unittests/string_view-selftests.c: New file.
4441 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4443 * unittests/basic_string_view/capacity/1.cc: New file.
4444 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4445 * unittests/basic_string_view/cons/char/1.cc: New file.
4446 * unittests/basic_string_view/cons/char/2.cc: New file.
4447 * unittests/basic_string_view/cons/char/3.cc: New file.
4448 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4449 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4450 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4451 * unittests/basic_string_view/element_access/char/1.cc: New file.
4452 * unittests/basic_string_view/element_access/char/2.cc: New file.
4453 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4454 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4455 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4456 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4457 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4458 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4459 * unittests/basic_string_view/include.cc: New file.
4460 * unittests/basic_string_view/inserters/char/1.cc: New file.
4461 * unittests/basic_string_view/inserters/char/2.cc: New file.
4462 * unittests/basic_string_view/inserters/char/3.cc: New file.
4463 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4464 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4465 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4466 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4467 * unittests/basic_string_view/literals/types.cc: New file.
4468 * unittests/basic_string_view/literals/values.cc: New file.
4469 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4470 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4471 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4472 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4473 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4474 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4475 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4476 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4477 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4478 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4479 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4480 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4481 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4482 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4483 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4484 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4485 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4486 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4487 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4488 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4489 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4490 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4491 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4492 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4493 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4494 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4495 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4496 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4497 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4498 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4499 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4500 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4501 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4502 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4503 * unittests/basic_string_view/operators/char/2.cc: New file.
4504 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4505 * unittests/basic_string_view/range_access/char/1.cc: New file.
4506 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4507 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4508 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4509 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4510 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4511 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4512 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4513 * unittests/basic_string_view/typedefs.cc: New file.
4514 * unittests/basic_string_view/types/1.cc: New file.
4516 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4518 * common/gdb_string_view.h: Remove libstdc++ implementation
4519 details, adjust to gdb reality.
4520 * common/gdb_string_view.tcc: Likewise.
4521 * cli/cli-script.c (struct string_view): Remove.
4522 (user_args) <m_args>: Change element type to gdb::string_view.
4523 (user_args::insert_args): Adjust.
4525 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4527 * common/gdb_string_view.h: New file.
4528 * common/gdb_string_view.tcc: New file.
4530 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4532 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4533 * configure: Re-generate.
4535 2018-04-09 Pedro Alves <palves@redhat.com>
4537 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4538 (set_target_gdbarch): Call
4539 gdb::observers::architecture_changed.notify instead of
4540 observer_notify_architecture_changed.
4542 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4544 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4545 (do_restore_current_traceframe_cleanup): Remove.
4546 (restore_current_traceframe_cleanup_dtor): Remove.
4547 (make_cleanup_restore_current_traceframe): Remove.
4548 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4550 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4551 * infrun.c (fetch_inferior_event): Use
4552 scoped_restore_current_traceframe.
4554 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4556 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4558 <n_allocated_type_units>: Remove.
4559 <all_type_units>: Change to std::vector.
4560 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4561 to std::vector change.
4562 (dwarf2_per_objfile::get_cutu): Likewise.
4563 (dwarf2_per_objfile::get_tu): Likewise.
4564 (create_signatured_type_table_from_index): Likewise.
4565 (create_signatured_type_table_from_debug_names): Likewise.
4566 (dw2_symtab_iter_next): Likewise.
4567 (dw2_print_stats): Likewise.
4568 (dw2_expand_all_symtabs): Likewise.
4569 (dw2_expand_marked_cus): Likewise.
4570 (dw2_debug_names_iterator::next): Likewise.
4571 (dwarf2_initialize_objfile): Likewise.
4572 (add_signatured_type_cu_to_table): Likewise.
4573 (create_all_type_units): Likewise.
4574 (add_type_unit): Likewise.
4575 (struct tu_abbrev_offset): Add constructor.
4576 (build_type_psymtabs_1): Adjust to std::vector change.
4577 (print_tu_stats): Likewise.
4578 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4579 (write_debug_names): Likewise.
4581 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4583 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4584 Make an std::vector.
4585 <n_comp_units>: Remove.
4586 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4587 to std::vector change.
4588 (dwarf2_per_objfile::get_cutu): Likewise.
4589 (dwarf2_per_objfile::get_cu): Likewise.
4590 (create_cus_from_index): Likewise.
4591 (create_addrmap_from_index): Likewise.
4592 (create_addrmap_from_aranges): Likewise.
4593 (dwarf2_read_index): Likewise.
4594 (dw2_find_last_source_symtab): Likewise.
4595 (dw2_map_symtabs_matching_filename): Likewise.
4596 (dw2_symtab_iter_next): Likewise.
4597 (dw2_print_stats): Likewise.
4598 (dw2_expand_all_symtabs): Likewise.
4599 (dw2_expand_symtabs_with_fullname): Likewise.
4600 (dw2_expand_marked_cus): Likewise.
4601 (dw2_map_symbol_filenames): Likewise.
4602 (create_cus_from_debug_names): Likewise.
4603 (dwarf2_read_debug_names): Likewise.
4604 (dw2_debug_names_iterator::next): Likewise.
4605 (dwarf2_initialize_objfile): Likewise.
4606 (set_partial_user): Likewise.
4607 (dwarf2_build_psymtabs_hard): Likewise.
4608 (read_comp_units_from_section): Remove arguments, adjust to
4610 (create_all_comp_units): Adjust to std::vector and
4611 read_comp_units_from_section changes.
4612 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4614 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4615 (psyms_seen_size): Likewise.
4616 (write_gdbindex): Likewise.
4617 (write_debug_names): Likewise.
4619 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4621 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4622 with dwarf2_per_objfile.
4623 (create_cus_from_index): Likewise.
4624 (create_signatured_type_table_from_index): Likewise.
4625 (dwarf2_read_index): Likewise.
4626 (dwarf2_initialize_objfile): Likewise.
4627 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4628 per_cu rather than get_dwarf2_per_objfile.
4630 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4632 * dwarf2read.h (struct signatured_type): Forward declare.
4633 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4635 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4636 (dw2_get_cutu): ...this.
4637 (dwarf2_per_objfile::get_cu): Rename from...
4638 (dw2_get_cu): ...this.
4639 (dwarf2_per_objfile::get_tu): New.
4640 (create_addrmap_from_index): Adjust.
4641 (create_addrmap_from_aranges): Adjust.
4642 (dw2_find_last_source_symtab): Adjust.
4643 (dw2_map_symtabs_matching_filename): Adjust.
4644 (dw2_symtab_iter_next): Adjust.
4645 (dw2_print_stats): Adjust.
4646 (dw2_expand_all_symtabs): Adjust.
4647 (dw2_expand_symtabs_with_fullname): Adjust.
4648 (dw2_expand_marked_cus): Adjust.
4649 (dw_expand_symtabs_matching_file_matcher): Adjust.
4650 (dw2_map_symbol_filenames): Adjust.
4651 (dw2_debug_names_iterator::next): Adjust.
4652 (dwarf2_initialize_objfile): Adjust.
4653 (set_partial_user): Adjust.
4654 (dwarf2_build_psymtabs_hard): Adjust.
4656 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4658 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4659 Remove unused variables.
4660 (dw2_map_symtabs_matching_filename): Likewise.
4661 (dwarf2_record_block_ranges): Likewise.
4662 (dwarf2_read_addr_index): Likewise.
4663 (follow_die_offset): Likewise.
4665 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4667 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4668 to symbol_file_add_main.
4670 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4673 * mi/mi-console.c (do_fputc_async_safe): New.
4674 (mi_console_file::write_async_safe): New.
4675 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4676 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4678 * ui-file.c (ui_file::putstrn): Adjust call to
4679 fputstrn_unfiltered.
4680 * utils.c (printchar): Replace do_fputs and do_fprintf
4681 parameters by do_fputc.
4682 (fputstr_filtered): Adjust call to printchar.
4683 (fputstr_unfiltered): Likewise.
4684 (fputstrn_filtered): Likewise.
4685 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4687 * utils.h (do_fputc_ftype): New typedef.
4688 (fputstrn_unfiltered): Add do_fputc parameter.
4690 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4692 * regformats/i386/i386-avx.dat: Remove.
4694 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4697 * amd64-tdep.c (amd64_none_init_abi): New function.
4698 (amd64_x32_none_init_abi): New function.
4699 (_initialize_amd64_tdep): Register handlers for x86-64 and
4700 x64_32 with GDB_OSABI_NONE.
4701 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4702 GDB_OSABI_NONE osabi.
4704 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4707 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4709 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4710 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4712 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4714 * common/byte-vector.h (char_vector): New type.
4715 * target.h (target_read_alloc): Return
4716 gdb::optional<byte_vector>.
4717 (target_read_stralloc): Return gdb::optional<char_vector>.
4718 (target_get_osdata): Return gdb::optional<char_vector>.
4719 * target.c (target_read_alloc_1): Templatize. Replacement
4720 manual memory management with vector.
4721 (target_read_alloc): Change return type, adjust.
4722 (target_read_stralloc): Change return type, adjust.
4723 (target_get_osdata): Change return type, adjust.
4724 * auxv.c (struct auxv_info) <length>: Remove.
4725 <data>: Change type to gdb::optional<byte_vector>.
4726 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4727 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4728 (target_auxv_search): Adjust.
4729 (fprint_target_auxv): Adjust.
4730 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4731 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4732 (linux_make_corefile_notes): Adjust.
4733 * osdata.c (get_osdata): Adjust.
4734 * remote.c (remote_get_threads_with_qxfer): Adjust.
4735 (remote_memory_map): Adjust.
4736 (remote_traceframe_info): Adjust.
4737 (btrace_read_config): Adjust.
4738 (remote_read_btrace): Adjust.
4739 (remote_pid_to_exec_file): Adjust.
4740 * solib-aix.c (solib_aix_get_library_list): Adjust.
4741 * solib-dsbt.c (decode_loadmap): Don't free buf.
4742 (dsbt_get_initial_loadmaps): Adjust.
4743 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4744 * solib-target.c (solib_target_current_sos): Adjust.
4745 * tracepoint.c (sdata_make_value): Adjust.
4746 * xml-support.c (xinclude_start_include): Adjust.
4747 (xml_fetch_content_from_file): Adjust.
4748 * xml-support.h (xml_fetch_another): Change return type.
4749 (xml_fetch_content_from_file): Change return type.
4750 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4751 * xml-tdesc.c (file_read_description_xml): Adjust.
4752 (fetch_available_features_from_target): Change return type.
4753 (target_fetch_description_xml): Adjust.
4754 (target_read_description_xml): Adjust.
4756 2018-04-06 Tom Tromey <tom@tromey.com>
4758 * value.c (~value): Update.
4759 (struct value) <contents>: Now unique_xmalloc_ptr.
4760 (value_contents_bits_eq, allocate_value_contents)
4761 (value_contents_raw, value_contents_all_raw)
4762 (value_contents_for_printing, value_contents_for_printing_const)
4763 (set_value_enclosing_type): Update.
4765 2018-04-06 Tom Tromey <tom@tromey.com>
4767 * value.c (range_s): Remove typedef, VEC.
4768 (struct range): Add operator<.
4769 (range_lessthan): Remove.
4770 (ranges_contain): Change type.
4772 (struct value) <unavailable, optimized_out>: Now std::vector.
4773 (value_entirely_available)
4774 (value_entirely_covered_by_range_vector)
4775 (value_entirely_unavailable, value_entirely_optimized_out):
4777 (insert_into_bit_range_vector): Change argument type.
4778 (find_first_range_overlap): Likewise.
4779 (struct ranges_and_idx, value_contents_bits_eq)
4780 (require_not_optimized_out, require_available): Update.
4781 (ranges_copy_adjusted): Change argument types.
4782 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4784 2018-04-06 Tom Tromey <tom@tromey.com>
4786 * value.c (~value): Update.
4787 (struct value) <parent>: Now a value_ref_ptr.
4788 (value_parent, set_value_parent, value_address, value_copy):
4791 2018-04-06 Tom Tromey <tom@tromey.com>
4793 * value.c (struct value): Add constructor, destructor, and member
4795 (allocate_value_lazy, value_decref): Update.
4797 2018-04-06 Tom Tromey <tom@tromey.com>
4799 * value.c (struct value) <released, next>: Remove.
4800 (all_values): Now a std::vector.
4801 (allocate_value_lazy): Update.
4802 (value_next): Remove.
4803 (value_mark, value_free_to_mark, release_value)
4804 (value_release_to_mark): Update.
4806 2018-04-06 Tom Tromey <tom@tromey.com>
4808 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4809 (free_value_chain): Remove.
4810 * value.c (free_value_chain): Remove.
4811 (value_release_to_mark): Return a std::vector.
4812 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4814 (check_condition): Update.
4815 * eval.c (fetch_subexp_value): Change "val_chain" to a
4817 * breakpoint.c (update_watchpoint): Update.
4818 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4820 2018-04-06 Tom Tromey <tom@tromey.com>
4822 * value.h (free_all_values): Remove.
4823 * value.c (free_all_values): Remove.
4825 2018-04-06 Tom Tromey <tom@tromey.com>
4827 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4828 (value_history_chain, value_history_count): Remove.
4829 (value_history): New global.
4830 (record_latest_value, access_value_history, show_values)
4831 (preserve_values): Update.
4833 2018-04-06 Tom Tromey <tom@tromey.com>
4835 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4836 * varobj.c (varobj_set_display_format, varobj_set_value)
4837 (install_default_visualizer, construct_visualizer)
4838 (install_new_value, ~varobj, varobj_get_value_type)
4839 (my_value_of_variable, varobj_editable_p): Update.
4840 * c-varobj.c (c_describe_child, c_value_of_variable)
4841 (cplus_number_of_children, cplus_describe_child): Update.
4842 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4843 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4844 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4846 2018-04-06 Tom Tromey <tom@tromey.com>
4848 * printcmd.c (last_examine_address): Change type to
4850 (do_examine, x_command): Update.
4852 2018-04-06 Tom Tromey <tom@tromey.com>
4854 * value.c (release_value): Update.
4855 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4856 (struct bpstats) <val>: Now a value_ref_ptr.
4857 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4858 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4859 (~watchpoint, print_it_watchpoint, watch_command_1)
4860 (invalidate_bp_value_on_memory_change): Update.
4862 2018-04-06 Tom Tromey <tom@tromey.com>
4864 * varobj.c (varobj_clear_saved_item)
4865 (update_dynamic_varobj_children, install_new_value, ~varobj):
4867 * value.h (value_incref): Move declaration earlier.
4868 (value_decref): Rename from value_free.
4869 (struct value_ref_policy): New.
4870 (value_ref_ptr): New typedef.
4871 (struct value_deleter): Remove.
4872 (gdb_value_up): Remove typedef.
4873 (release_value): Change return type.
4874 (release_value_or_incref): Remove.
4875 * value.c (set_value_parent): Update.
4876 (value_incref): Change return type.
4877 (value_decref): Rename from value_free.
4878 (value_free_to_mark, free_all_values, free_value_chain): Update.
4879 (release_value): Return value_ref_ptr.
4880 (release_value_or_incref): Remove.
4881 (record_latest_value, set_internalvar, clear_internalvar):
4883 * stack.c (info_frame_command): Don't call value_free.
4884 * python/py-value.c (valpy_dealloc, valpy_new)
4885 (value_to_value_object): Update.
4886 * printcmd.c (do_examine): Update.
4887 * opencl-lang.c (lval_func_free_closure): Update.
4888 * mi/mi-main.c (register_changed_p): Don't call value_free.
4889 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4890 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4891 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4893 * guile/scm-value.c (vlscm_free_value_smob)
4894 (vlscm_scm_from_value): Update.
4895 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4896 (frame_unwind_register_unsigned, get_frame_register_bytes)
4897 (put_frame_register_bytes): Don't call value_free.
4898 * findvar.c (address_from_register): Don't call value_free.
4899 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4900 * dwarf2loc.c (entry_data_value_free_closure)
4901 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4902 (dwarf2_evaluate_loc_desc_full): Update.
4903 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4904 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4905 (~watchpoint, watch_command_1)
4906 (invalidate_bp_value_on_memory_change): Update.
4907 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4909 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4912 * warning.m4: Add -Wno-error=deprecated-register.
4913 * configure: Re-generate.
4915 2018-04-05 Tom Tromey <tom@tromey.com>
4917 * linespec.h: Remove include of "vec.h".
4919 2018-04-05 Tom Tromey <tom@tromey.com>
4921 * linespec.c (typep): Remove typedef.
4922 (find_methods, find_superclass_methods): Take a std::vector.
4923 (find_method): Use std::vector.
4925 2018-04-05 Tom Tromey <tom@tromey.com>
4927 * utils.c (compare_strings): Remove.
4928 * utils.h (compare_strings): Remove.
4929 * objc-lang.h (find_imps): Update.
4930 * objc-lang.c (find_methods): Take a std::vector.
4931 (uniquify_strings, find_imps): Likewise.
4932 * linespec.c (find_methods): Take a std::vector.
4933 (decode_objc): Use std::vector.
4934 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4936 (find_method, find_function_symbols): Use std::vector.
4938 2018-04-05 Tom Tromey <tom@tromey.com>
4940 * completer.c (completion_tracker::completion_tracker): Remove
4942 (completion_tracker::discard_completions): Likewise.
4943 * breakpoint.c (ambiguous_names_p): Remove cast.
4944 * ada-lang.c (_initialize_ada_language): Remove cast.
4945 * utils.h (streq): Update.
4946 (streq_hash): Add new declaration.
4947 * utils.c (streq): Return bool.
4948 (streq_hash): New function.
4950 2018-04-05 Tom Tromey <tom@tromey.com>
4952 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4953 Remove a string copy.
4955 2018-04-05 Tom Tromey <tom@tromey.com>
4957 * linespec.c (filter_results): Use std::vector.
4958 (decode_line_2, decode_line_full): Update.
4960 2018-04-05 Tom Tromey <tom@tromey.com>
4962 * linespec.c (canonical_to_fullform): Return std::string.
4963 (filter_results): Update.
4964 (struct decode_line_2_item): Add constructor.
4965 <fullform, displayform>: Now std::string.
4966 (decode_line_2_compare_items): Now a std::sort comparator.
4967 (decode_line_2): Update.
4969 2018-04-05 Tom Tromey <tom@tromey.com>
4971 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4972 (unexpected_linespec_error): Update.
4973 (linespec_parse_basic, parse_linespec): Update.
4975 2018-04-05 Tom Tromey <tom@tromey.com>
4977 * linespec.c (linespec_parse_basic): Reindent.
4979 2018-04-05 Tom Tromey <tom@tromey.com>
4981 * minsyms.h (iterate_over_minimal_symbols): Update.
4982 * minsyms.c (iterate_over_minimal_symbols): Take a
4984 * linespec.c (struct collect_minsyms): Remove.
4985 (compare_msyms): Now a std::sort comparator.
4986 (add_minsym): Add parameters.
4987 (search_minsyms_for_name): Update. Use std::vector.
4989 2018-04-03 Tom Tromey <tom@tromey.com>
4991 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4994 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4996 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4998 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5001 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5002 printing static type.
5004 2018-04-01 Tom Tromey <tom@tromey.com>
5006 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5007 (rs6000_xfer_shared_libraries): Update.
5009 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5011 * common/gdb_vecs.h (char_ptr): Remove.
5012 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5014 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5016 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5018 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5020 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5022 * tracepoint.h (struct uploaded_tp): Initialize fields.
5023 <actions, step_actions, cmd_strings>: Change type to
5024 std::vector<char *>.
5025 * tracepoint.c (get_uploaded_tp): Allocate with new.
5026 (free_uploaded_tps): Free with delete.
5027 (parse_tracepoint_definition): Adjust to std::vector change.
5028 * breakpoint.c (read_uploaded_action): Likewise.
5029 (create_tracepoint_from_upload): Likewise.
5030 * ctf.c (ctf_write_uploaded_tp): Likewise.
5031 (SET_ARRAY_FIELD): Likewise.
5032 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5034 2018-03-30 Tom Tromey <tom@tromey.com>
5036 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5038 (svr4_keep_data_in_core): Update.
5039 (svr4_read_so_list): Update.
5041 2018-03-30 Tom Tromey <tom@tromey.com>
5043 * windows-nat.c (handle_output_debug_string, handle_exception):
5045 * target.h (target_read_string): Update.
5046 * target.c (target_read_string): Change "string" to
5048 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5050 * solib-frv.c (frv_current_sos): Update.
5051 * solib-dsbt.c (dsbt_current_sos): Update.
5052 * solib-darwin.c (darwin_current_sos): Update.
5053 * linux-thread-db.c (inferior_has_bug): Update.
5054 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5055 Update. Remove alloca.
5056 * ada-lang.c (ada_main_name): Update.
5058 2018-03-30 Tom Tromey <tom@tromey.com>
5060 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5061 (struct dwo_file_deleter): New.
5062 (dwo_file_up): New typedef.
5063 (open_and_init_dwo_file): Use dwo_file_up.
5064 (free_dwo_file_cleanup): Remove.
5066 2018-03-30 Tom Tromey <tom@tromey.com>
5068 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5069 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5071 2018-03-30 Tom Tromey <tom@tromey.com>
5073 * dwarf2read.c (class free_cached_comp_units): New class.
5074 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5075 (free_cached_comp_units): Remove function.
5077 2018-03-30 Tom Tromey <tom@tromey.com>
5079 * utils.h (make_cleanup_unpush_target): Remove.
5080 * inf-ptrace.c (struct target_unpusher): New.
5081 (target_unpush_up) New typedef.
5082 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
5084 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
5086 2018-03-27 Tom Tromey <tom@tromey.com>
5088 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
5090 2018-03-27 Pedro Alves <palves@redhat.com>
5091 Tom Tromey <tom@tromey.com>
5093 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
5094 destructor. Now a class.
5095 (gdb_readline_wrapper_cleanup): Remove function.
5096 (gdb_readline_wrapper): Remove cleanups.
5098 2018-03-27 Tom Tromey <tom@tromey.com>
5100 * typeprint.h (struct type_print_options) <local_typedefs,
5101 global_typedefs>: Remove "struct" keyword.
5102 (class typedef_hash_table): New class.
5103 (recursively_update_typedef_hash, add_template_parameters)
5104 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
5105 (find_typedef_in_hash): Don't declare.
5106 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
5107 (typedef_hash_table::recursively_update): Rename from
5108 recursively_update_typedef_hash. Now a member.
5109 (typedef_hash_table::add_template_parameters): Rename from
5110 add_template_parameters. Now a member.
5111 (typedef_hash_table::typedef_hash_table): Now a constructor;
5112 rename from create_typedef_hash.
5113 (typedef_hash_table::~typedef_hash_table): Now a destructor;
5114 rename from free_typedef_hash.
5115 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5116 (do_free_global_table): Remove.
5117 (typedef_hash_table::typedef_hash_table): New constructor; renamed
5118 from copy_type_recursive.
5119 (create_global_typedef_table): Remove.
5120 (typedef_hash_table::find_global_typedef): Now a member of
5122 (typedef_hash_table::find_typedef): Rename from
5123 find_typedef_in_hash; now a member.
5124 (whatis_exp): Update.
5125 * extension.h (struct ext_lang_type_printers): Add constructor and
5127 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5129 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5130 Now a constructor; rename from start_ext_lang_type_printers.
5131 (ext_lang_type_printers): Now a destructor; rename from
5132 free_ext_lang_type_printers.
5133 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5135 (c_type_print_base_struct_union): Update. Remove cleanups.
5137 2018-03-27 Tom Tromey <tom@tromey.com>
5139 * dwarf-index-write.c: Include <cmath>.
5141 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5143 * NEWS: Add entry describing new "set|show varsize-limit" command.
5144 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5146 * printcmd.c (_initialize_printcmd): Add "set var" alias of
5149 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
5151 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5153 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5154 * dwarf-index-common.c: New file.
5155 * dwarf-index-common.h: New file.
5156 * dwarf-index-write.c: New file.
5157 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5158 (struct dwarf2_section_info): Move from here.
5159 (dwarf2_section_info_def): Likewise.
5160 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5161 (offset_type): Likewise.
5162 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5163 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5164 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5165 (byte_swap): Likewise.
5166 (MAYBE_SWAP): Likewise.
5167 (dwarf2_per_cu_ptr): Likewise.
5168 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5169 (struct tu_stats): Likewise.
5170 (struct dwarf2_per_objfile): Likewise.
5171 (struct dwarf2_per_cu_data): Likewise.
5172 (struct signatured_type): Likewise.
5173 (sig_type_ptr): Likewise.
5174 (DEF_VEC_P (sig_type_ptr)): Likewise.
5175 (INDEX4_SUFFIX): Likewise.
5176 (INDEX5_SUFFIX): Likewise.
5177 (DEBUG_STR_SUFFIX): Likewise.
5178 (dwarf2_read_section): Make non-static.
5179 (mapped_index_string_hash): Move from here.
5180 (dwarf5_djb_hash): Likewise.
5181 (file_write): Likewise.
5182 (class data_buf): Likewise.
5183 (struct symtab_index_entry): Likewise.
5184 (struct mapped_symtab): Likewise.
5185 (find_slot): Likewise.
5186 (hash_expand): Likewise.
5187 (add_index_entry): Likewise.
5188 (uniquify_cu_indices): Likewise.
5189 (class c_str_view): Likewise.
5190 (class c_str_view_hasher): Likewise.
5191 (class vector_hasher): Likewise.
5192 (write_hash_table): Likewise.
5193 (psym_index_map): Likewise.
5194 (struct addrmap_index_data): Likewise.
5195 (add_address_entry): Likewise.
5196 (add_address_entry_worker): Likewise.
5197 (write_address_map): Likewise.
5198 (symbol_kind): Likewise.
5199 (write_psymbols): Likewise.
5200 (struct signatured_type_index_data): Likewise.
5201 (write_one_signatured_type): Likewise.
5202 (recursively_count_psymbols): Likewise.
5203 (recursively_write_psymbols): Likewise.
5204 (class debug_names): Likewise.
5205 (check_dwarf64_offsets): Likewise.
5206 (psyms_seen_size): Likewise.
5207 (write_gdbindex): Likewise.
5208 (write_debug_names): Likewise.
5209 (assert_file_size): Likewise.
5210 (write_psymtabs_to_index): Likewise.
5211 (save_gdb_index_command): Likewise.
5212 (_initialize_dwarf2_read): Don't register the "save gdb-index"
5214 * dwarf2read.h: New file.
5216 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5219 * dwarf2read.c (dwarf2_physname): Do not return the demangled
5220 symbol name if the CU's language stores symbol names in linkage
5222 * language.h (struct language_defn)
5223 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
5224 all instances of this struct.
5226 2018-03-26 Tom Tromey <tom@tromey.com>
5228 * stack.c (backtrace_command_1): Remove verbose code.
5230 2018-03-26 Tom Tromey <tom@tromey.com>
5232 * python/py-framefilter.c (py_print_type): Don't catch
5233 exceptions. Return void.
5234 (py_print_value): Likewise.
5235 (py_print_single_arg): Likewise.
5236 (enumerate_args): Don't catch exceptions.
5237 (py_print_args): Likewise.
5238 (py_print_frame): Likewise.
5239 (gdbpy_apply_frame_filter): Catch exceptions here.
5241 2018-03-26 Tom Tromey <tom@tromey.com>
5243 * stack.c (_initialize_stack): Remove trailing newlines from help
5244 text. Add "Usage" line to "backtrace" help.
5246 2018-03-26 Tom Tromey <tom@tromey.com>
5249 * python/py-framefilter.c (py_print_args): Call wrap_hint.
5251 2018-03-26 Tom Tromey <tom@tromey.com>
5253 * python/py-framefilter.c (py_print_single_arg): Return
5254 EXT_LANG_BT_ERROR from catch.
5256 2018-03-26 Tom Tromey <tom@tromey.com>
5259 * stack.c (backtrace_command_1): Move some code into no-filters
5262 2018-03-26 Tom Tromey <tom@tromey.com>
5264 * python/py-framefilter.c (throw_quit_or_print_exception): New
5266 (gdbpy_apply_frame_filter): Use it.
5268 2018-03-26 Tom Tromey <tom@tromey.com>
5271 * python/py-framefilter.c (py_print_type, py_print_value)
5272 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
5275 2018-03-26 Tom Tromey <tom@tromey.com>
5277 * python/py-framefilter.c (enumerate_args): Use
5278 gdb::unique_xmalloc_ptr.
5280 2018-03-26 Tom Tromey <tom@tromey.com>
5282 * python/py-framefilter.c (py_print_frame): Return
5284 (gdbpy_apply_frame_filter): Update comment.
5285 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5287 <EXT_LANG_BT_NO_FILTERS>: Change value.
5289 2018-03-26 Tom Tromey <tom@tromey.com>
5292 * stack.c (backtrace_command): Parse "hide" argument.
5293 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5294 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5297 2018-03-26 Tom Tromey <tom@tromey.com>
5299 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5301 (backtrace_command): Remove "fulltrace", add "flags".
5303 2018-03-26 Tom Tromey <tom@tromey.com>
5305 * stack.c (backtrace_command): Rewrite command line parsing.
5307 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5309 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5311 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5313 * filename-seen-cache.h: Add include guard.
5315 2018-03-26 Keith Seitz <keiths@redhat.com>
5317 * symfile.c (place_section): Remove "struct" from section_addr_info
5319 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5320 "struct" keyword from section_addr_info.
5322 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5324 * regformats/regdef.h (reg): Add constructors.
5326 2018-03-25 Pedro Alves <palves@redhat.com>
5328 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5329 if then/else bodies in var_func_name extraction.
5331 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5333 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5334 lookup_minimal_symbol() to find symbol entry.
5335 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5337 2018-03-23 Keith Seitz <keiths@redhat.com>
5340 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5341 nested type definitions for C++, too.
5343 2018-03-23 Tom Tromey <tom@tromey.com>
5345 * machoread.c (struct oso_el): Add a constructor. Don't define as
5347 (macho_register_oso): Remove.
5348 (macho_symtab_read): Take a std::vector.
5349 (oso_el_compare_name): Now a std::sort comparator.
5350 (macho_symfile_read_all_oso): Take a std::vector.
5351 (macho_symfile_read): Use std::vector. Remove cleanups.
5353 2018-03-22 Tom Tromey <tom@tromey.com>
5355 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5356 (record_full_goto_bookmark): Use std::string.
5358 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5361 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5364 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5366 * rs6000-tdep.c (store_insn_p): New function.
5367 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5368 and cr_reg to their unshifted values. Use store_insn_p to
5369 match LR saves using either R1 or fdata->alloca_reg. Use
5370 store_insn_p to match CR saves. Set alloca_reg_offset
5371 when alloca_reg and framep are set. Remove lr_reg shift
5372 when assigning to fdata->lr_register.
5374 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5376 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5377 command line args instead of emitting a warning.
5379 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5381 * tracepoint.h (struct static_tracepoint_marker): Initialize
5382 fields, define default constructor, move constructor and move
5383 assignment, disable the rest.
5384 <str_id, extra>: Make std::string.
5385 (release_static_tracepoint_marker): Remove.
5386 (free_current_marker): Remove.
5387 * tracepoint.c (free_current_marker): Remove.
5388 (parse_static_tracepoint_marker_definition): Adjust to
5389 std::string, use new hex2str overload.
5390 (release_static_tracepoint_marker): Remove.
5391 (print_one_static_tracepoint_marker): Get marker by reference
5392 and adjust to std::string.
5393 (info_static_tracepoint_markers_command): Adjust to std::vector
5395 * target.h (static_tracepoint_marker_p): Remove typedef.
5396 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5397 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5399 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5401 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5402 (target_debug_print_std_vector_static_tracepoint_marker): New.
5403 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5405 (target_debug_print_static_tracepoint_marker_p): ... this.
5406 * target-delegates.c: Re-generate.
5407 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5409 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5410 (decode_static_tracepoint_spec): Adjust to std::vector.
5411 (tracepoint_print_one_detail): Adjust to std::string.
5412 (strace_marker_decode_location): Adjust to std::string.
5413 (update_static_tracepoint): Adjust to std::string, remove call
5414 to release_static_tracepoint_marker.
5415 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5416 Adjust to std::vector.
5417 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5418 (remote_static_tracepoint_markers_by_strid): Adjust to
5420 * common/rsp-low.h (hex2str): New overload with explicit count
5422 * common/rsp-low.c (hex2str): New overload with explicit count
5424 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5425 (_initialize_rsp_low_selftests): Add test_hex2str test.
5426 * unittests/tracepoint-selftests.c
5427 (test_parse_static_tracepoint_marker_definition): Adjust to
5430 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5432 * tracepoint.c (parse_static_tracepoint_marker_definition):
5433 Consider case where the definition is followed by more
5435 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5436 tracepoint-selftests.c.
5437 * unittests/tracepoint-selftests.c: New.
5439 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5441 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5444 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5446 * symtab.c (find_pc_sect_line): fixed indentation.
5448 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5450 * symtab.c (find_pc_sect_line): now uses binary search.
5452 2018-03-19 Tom Tromey <tom@tromey.com>
5454 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5457 2018-03-19 Pedro Alves <palves@redhat.com>
5458 Tom Tromey <tom@tromey.com>
5460 * unittests/observable-selftests.c: New file.
5461 * common/observable.h: New file.
5462 * observable.h: New file.
5463 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5464 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5465 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5466 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5467 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5468 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5469 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5470 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5471 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5472 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5473 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5474 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5475 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5476 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5477 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5478 tui/tui-interp.c, valops.c: Update all users.
5479 * tui/tui-hooks.c (tui_bp_created_observer)
5480 (tui_bp_deleted_observer, tui_bp_modified_observer)
5481 (tui_inferior_exit_observer, tui_before_prompt_observer)
5482 (tui_normal_stop_observer, tui_register_changed_observer):
5484 (tui_observers_token): New global.
5485 (attach_or_detach, tui_attach_detach_observers): New functions.
5486 (tui_install_hooks, tui_remove_hooks): Use
5487 tui_attach_detach_observers.
5488 * record-btrace.c (record_btrace_thread_observer): Remove.
5489 (record_btrace_thread_observer_token): New global.
5490 * observer.sh: Remove.
5491 * observer.c: Rename to observable.c.
5492 * observable.c (namespace gdb_observers): Define new objects.
5493 (observer_debug): Move into gdb_observers namespace.
5494 (struct observer, struct observer_list, xalloc_observer_list_node)
5495 (xfree_observer_list_node, generic_observer_attach)
5496 (generic_observer_detach, generic_observer_notify): Remove.
5497 (_initialize_observer): Update.
5498 Don't include observer.inc.
5499 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5500 (clean mostlyclean): Likewise.
5501 (observer.h, observer.inc): Remove targets.
5502 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5503 (COMMON_SFILES): Use observable.c, not observer.c.
5504 * .gitignore: Remove observer.h.
5506 2018-03-18 Tom Tromey <tom@tromey.com>
5508 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5510 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5512 2018-03-17 Tom Tromey <tom@tromey.com>
5514 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5516 2018-03-17 Tom Tromey <tom@tromey.com>
5518 * target.c (class scoped_target_fd): New.
5519 (target_fileio_close_cleanup): Remove.
5520 (target_fileio_read_alloc_1): Use scoped_target_fd.
5522 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5524 * silent-rules.mk: New.
5525 * Makefile.in: Include silent-rules.mk
5526 (srcdir, VPATH, top_srcdir): Move up.
5527 (COMPILE): Add ECHO_CXX.
5528 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5529 (init.c): Add ECHO_INIT_C.
5530 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5531 (version.c): Add ECHO_GEN.
5532 (printcmd.o): Add ECHO_CXX.
5533 (target-float.o): Add ECHO_CXX.
5534 (ada-exp.o): Add ECHO_CXX.
5535 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5536 (insight$(EXEEXT)): Add ECHO_CXXLD.
5537 * gnulib/configure.ac: Add AM_SILENT_RULES.
5538 * gnulib/aclocal.m4: Re-generate.
5539 * gnulib/configure: Re-generate.
5540 * gnulib/import/Makefile.in: Re-generate.
5542 2018-03-16 Tom Tromey <tom@tromey.com>
5544 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5545 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5546 * utils.c (do_free_section_addr_info)
5547 (make_cleanup_free_section_addr_info): Remove.
5548 * symfile.h (struct other_sections): Add constructor.
5549 (struct section_addr_info): Remove.
5550 (section_addr_info): New typedef.
5551 (struct sym_fns) <sym_offsets>: Change type of parameter.
5552 (build_section_addr_info_from_objfile)
5553 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5554 (default_symfile_offsets, symbol_file_add)
5555 (symbol_file_add_from_bfd)
5556 (build_section_addr_info_from_section_table): Update.
5557 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5558 * symfile.c (alloc_section_addr_info): Remove.
5559 (build_section_addr_info_from_section_table): Change return type.
5561 (build_section_addr_info_from_bfd)
5562 (build_section_addr_info_from_objfile): Likewise.
5563 (free_section_addr_info): Remove.
5564 (relative_addr_info_to_section_offsets): Change type of "addrs".
5565 (addrs_section_compar): Now a std::sort comparator.
5566 (addrs_section_sort): Change return type.
5567 (addr_info_make_relative): Change type of "addrs". Update.
5568 (default_symfile_offsets, syms_from_objfile_1)
5569 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5570 (symbol_file_add_separate): Update.
5571 (symbol_file_add): Change type of "addrs". Update.
5572 (add_symbol_file_command): Update. Remove cleanups.
5573 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5575 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5576 * solib.c (solib_read_symbols): Update.
5577 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5578 * machoread.c (macho_symfile_offsets): Update.
5579 * jit.c (jit_bfd_try_read_symtab): Update.
5581 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5583 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5584 unittests/utils-selftests.c.
5585 * unittests/utils-selftests.c: New file.
5587 2018-03-14 Tom Tromey <tom@tromey.com>
5590 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5593 2018-03-14 Tom Tromey <tom@tromey.com>
5596 * printcmd.c (printf_pointer): Allow "-" in format.
5598 2018-03-14 Tom Tromey <tom@tromey.com>
5600 * printcmd.c (_initialize_printcmd): Add usage to printf.
5602 2018-03-14 Yao Qi <qiyao@sourceware.org>
5604 * MAINTAINERS: Update my email address.
5606 2018-03-13 Tom Tromey <tom@tromey.com>
5608 * machoread.c (macho_check_dsym): Change filenamep to a
5610 (macho_symfile_read): Update.
5611 * symfile.c (load_command): Use std::string.
5613 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5615 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5616 to error message string.
5617 (riscv_register_name): Use xsnprintf instead of sprintf.
5618 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5620 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5622 (riscv_push_dummy_call): Likewise.
5624 2018-03-12 Tom Tromey <tom@tromey.com>
5626 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5627 Use gdb::byte_vector.
5628 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5630 2018-03-12 Yao Qi <yao.qi@linaro.org>
5632 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5633 parameter type to readable_regcache.
5634 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5637 2018-03-11 Tom Tromey <tom@tromey.com>
5639 * dwarf2read.c (struct nextfield): Add initializers.
5640 (struct nextfnfield): Remove.
5641 (struct fnfieldlist): Add initializers. Remove "length" and
5642 "head", use std::vector.
5643 (struct decl_field_list): Remove.
5644 (struct field_info): Add initializers.
5645 <fields, baseclasses>: Now std::vector.
5646 <nbaseclasses, nfnfields, typedef_field_list_count,
5647 nested_types_list_count>: Remove.
5648 (dwarf2_add_field, dwarf2_add_type_defn)
5649 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5650 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5651 (process_structure_scope): Update.
5653 2018-03-11 Tom Tromey <tom@tromey.com>
5655 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5656 for use by std::sort.
5657 (build_type_psymtabs_1): Use std::vector.
5659 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5661 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5662 and LIBMPFR in the printed configuration.
5664 2018-03-08 Tom Tromey <tom@tromey.com>
5666 * source.c (get_filename_and_charpos): Use scoped_fd.
5667 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5668 (procfs_pidlist): Likewise.
5669 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5670 (iterate_over_mappings): Likewise.
5672 2018-03-08 Tom Tromey <tom@tromey.com>
5674 * infcall.c (struct call_return_meta_info)
5675 <stack_temporaries_enabled>: Remove.
5676 (get_call_return_value, call_function_by_hand_dummy): Update.
5677 * thread.c (disable_thread_stack_temporaries): Remove.
5678 (enable_thread_stack_temporaries): Remove.
5679 (thread_stack_temporaries_enabled_p): Return bool.
5680 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5681 (get_last_thread_stack_temporary): Update.
5682 * eval.c (evaluate_subexp): Update.
5683 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5684 class, not a function.
5685 (value_ptr, value_vec): Remove typedefs.
5686 (class thread_info) <stack_temporaries_enabled>: Now bool.
5687 <stack_temporaries>: Now a std::vector.
5688 (thread_stack_temporaries_enabled_p)
5689 (value_in_thread_stack_temporaries): Return bool.
5691 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5693 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5694 (getpkt_or_notif_sane_1): Likewise.
5696 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5698 * build-id.c (build_id_to_debug_bfd): Use std::string.
5700 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5702 * build-id.c (find_separate_debug_file_by_buildid): Return
5704 * build-id.h (find_separate_debug_file_by_buildid): Return
5706 * coffread.c (coff_symfile_read): Adjust to std::string.
5707 * elfread.c (elf_symfile_read): Adjust to std::string.
5708 * symfile.c (separate_debug_file_exists): Change parameter to
5710 (find_separate_debug_file): Return std::string.
5711 (find_separate_debug_file_by_debuglink): Return std::string.
5712 * symfile.h (find_separate_debug_file_by_debuglink): Return
5715 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5717 * common/xml-utils.c (xml_escape_text): Move code to...
5718 (xml_escape_text_append): ... this new function.
5719 * common/xml-utils.h (xml_escape_text_append): New declaration.
5720 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5722 (_initialize_xml_utils): register test_xml_escape_text_append as
5725 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5727 * defs.h: Remove MAX_REGISTER_SIZE.
5728 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5730 * python/py-unwind.c (pyuw_sniffer): Likewise.
5732 2018-03-07 Tom Tromey <tom@tromey.com>
5734 * linux-tdep.c (linux_info_proc): Update.
5735 * target.h (struct target_ops) <to_fileio_readlink>: Return
5737 (target_fileio_readlink): Return optional<string>.
5738 * remote.c (remote_hostio_readlink): Return optional<string>.
5739 * inf-child.c (inf_child_fileio_readlink): Return
5741 * target.c (target_fileio_readlink): Return optional<string>.
5743 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5745 * regcache.c (cooked_read_test): Add riscv to the list of
5746 architectures that have a save_reggroup.
5748 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5750 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5751 value is not a dynamic class object.
5753 2018-03-06 Tom Tromey <tom@tromey.com>
5755 * rust-exp.y: Formatting fixes.
5757 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5759 * riscv-tdep.c (riscv_register_name): Remove target description
5761 (riscv_gdbarch_init): Remove target description check.
5763 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5765 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5767 * riscv-tdep.h: Likewise.
5769 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5771 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5772 (riscv_pseudo_register_write): Delete.
5773 (riscv_gdbarch_init): Remove all use of pseudo registers.
5775 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5777 * record-btrace.c (btrace_print_lines): Replace cleanup
5778 parameter with RAII equivalents.
5779 (btrace_insn_history): Replace cleanup with RAII equivalents.
5780 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5781 make_cleanup_ui_out_tuple_begin_end): Remove.
5782 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5783 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5784 make_cleanup_ui_out_list_begin_end): Remove.
5786 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5788 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5789 parameter types to std::vector. Use bool.
5790 (record_btrace_wait): Replace VEC(tp_t) with
5791 std::vector<thread_info *>.
5792 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5794 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5796 * record-btrace.c (record_btrace_disable_callback): Remove.
5797 (struct scoped_btrace_disable): New.
5798 (record_btrace_open): Use scoped_btrace_disable.
5800 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5802 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5803 reading values from registers.
5805 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5807 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5810 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5812 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5813 change parameter type. Use GDB's print functions, and use
5814 core_addr_to_string where appropriate.
5815 (riscv_push_dummy_call): Use core_addr_to_string where
5816 appropriate, update call to riscv_print_arg_location, and reindent
5818 (riscv_return_value): Update call to riscv_print_arg_location.
5820 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5821 Tim Newsome <tim@sifive.com>
5822 Albert Ou <a0u@eecs.berkeley.edu>
5823 Darius Rad <darius@bluespec.com>
5825 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5826 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5827 (ALLDEPFILES): Add riscv-tdep.c
5828 * configure.tgt: Add riscv support.
5829 * riscv-tdep.c: New file.
5830 * riscv-tdep.h: New file.
5831 * NEWS: Mention new target.
5832 * MAINTAINERS: Add entry for riscv.
5834 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5836 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5837 fields within aggregates.
5839 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5841 * record-btrace.c (btrace_print_lines): Change type of flags to
5842 gdb_disassembly_flags.
5844 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5846 * fbsd-nat.c: Include "inf-ptrace.h".
5847 (USE_SIGTRAP_SIGINFO): Conditionally define.
5848 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5849 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5850 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5852 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5854 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5856 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5857 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5858 "supports_stopped_by_hw_breakpoint" target methods.
5860 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5862 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5863 * fbsd-nat.c (debug_fbsd_nat): New variable.
5864 (show_fbsd_nat_debug): New function.
5865 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5866 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5868 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5870 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5871 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5873 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5874 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5877 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5879 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5880 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5882 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5884 * charset.c (struct charset_vector): New.
5885 (charsets): Change type to charset_vector.
5886 (find_charset_names): Adjust.
5888 (_initialize_charset): Adjust.
5890 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5892 * progspace.h (struct program_space) <deleted_solibs>: Change
5893 type to std::vector<std::string>.
5894 * progspace.c (clear_program_space_solib_cache): Adjust.
5895 * breakpoint.c (print_solib_event): Adjust.
5896 (check_status_catch_solib): Adjust.
5897 * solib.c (update_solib_list): Adjust.
5898 * ui-out.h (class ui_out) <field_string>: New overload.
5899 * ui-out.c (ui_out::field_string): New overload.
5901 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5903 * progspace.h (struct program_space): Add constructor and
5904 destructor, initialize fields.
5905 (add_program_space): Remove.
5906 * progspace.c (add_program_space): Rename to...
5907 (program_space::program_space): ... this.
5908 (release_program_space): Rename to...
5909 (program_space::~program_space): ... this.
5910 (delete_program_space): Use delete to delete program_space.
5911 (initialize_progspace): Use new to allocate program_space.
5912 * inferior.c (add_inferior_with_spaces): Likewise.
5913 (clone_inferior_command): Likewise.
5914 * infrun.c (follow_fork_inferior): Likewise.
5915 (handle_vfork_child_exec_or_exit): Likewise.
5917 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5919 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5920 (delim_string_to_char_ptr_vec): Return std::vector of
5921 gdb::unique_xmalloc_ptr.
5922 (dirnames_to_char_ptr_vec_append): Take std::vector of
5923 gdb::unique_xmalloc_ptr.
5924 (dirnames_to_char_ptr_vec): Return std::vector of
5925 gdb::unique_xmalloc_ptr.
5926 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5927 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5928 (delim_string_to_char_ptr_vec): Return an std::vector of
5929 gdb::unique_xmalloc_ptr, adjust the code.
5930 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5931 gdb::unique_xmalloc_ptr, adjust the code.
5932 (dirnames_to_char_ptr_vec): Return an std::vector of
5933 gdb::unique_xmalloc_ptr, adjust the code.
5934 * auto-load.c (auto_load_safe_path_vec): Change type to
5935 std::vector of gdb::unique_xmalloc_ptr.
5936 (auto_load_expand_dir_vars): Return an std::vector of
5937 gdb::unique_xmalloc_ptr, adjust the code.
5938 (auto_load_safe_path_vec_update): Adjust.
5939 (filename_is_in_auto_load_safe_path_vec): Adjust.
5940 (auto_load_objfile_script_1): Adjust.
5941 * build-id.c (build_id_to_debug_bfd): Adjust.
5942 * linux-thread-db.c (thread_db_load_search): Adjust.
5943 * source.c (add_path): Adjust.
5945 * symfile.c (find_separate_debug_file): Adjust.
5946 * utils.c (do_free_char_ptr_vec): Remove.
5947 (make_cleanup_free_char_ptr_vec): Remove.
5949 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5952 * common/pathstuff.c: Conditionally include "<windows.h>".
5954 2018-03-01 Georg Sauthoff <mail@georg.so>
5957 * gcore.in: Quote variables and switch interpreter to bash.
5959 2018-03-01 Tom Tromey <tom@tromey.com>
5961 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5962 assertion. Add assertion for discriminant_index.
5963 (quirk_rust_enum): Use correct base type name in univariant case.
5965 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5967 * record.c (get_call_history_modifiers): Return a
5969 (cmd_record_call_history): Adjust.
5970 * record-btrace.c (record_btrace_call_history): Adjust.
5971 (record_btrace_call_history_range): Adjust.
5972 (record_btrace_call_history_from): Adjust.
5973 * target-debug.h (target_debug_print_record_print_flags): New.
5974 * target-delegates.c: Re-generate.
5975 * target.c (target_call_history): Change flags type.
5976 (target_call_history_from): Likewise.
5977 (target_call_history_range): Likewise.
5978 * target.h (struct target_ops) <target_call_history>: Likewise.
5979 (target_call_history_from): Likewise.
5980 (target_call_history_range): Likewise.
5982 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5983 Simon Marchi <simon.marchi@polymtl.ca>
5985 * common/common-utils.c: Include "sys/stat.h".
5986 (is_regular_file): Move here from "source.c"; change return
5988 * common/common-utils.h (is_regular_file): New prototype.
5989 * common/pathstuff.c (contains_dir_separator): New function.
5990 * common/pathstuff.h (contains_dir_separator): New prototype.
5991 * source.c: Don't include "sys/stat.h".
5992 (is_regular_file): Move to "common/common-utils.c".
5994 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5996 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5997 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5998 * auto-load.c: Include "common/pathstuff.h".
5999 * common/common-def.h (current_directory): Move here.
6000 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6002 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6004 * common/pathstuff.c: New file.
6005 * common/pathstuff.h: New file.
6006 * compile/compile.c: Include "common/pathstuff.h".
6007 * defs.h (current_directory): Move to "common/common-defs.h".
6008 * dwarf2read.c: Include "common/pathstuff.h".
6010 * guile/scm-safe-call.c: Likewise.
6011 * linux-thread-db.c: Likewise.
6013 * nto-tdep.c: Likewise.
6014 * objfiles.c: Likewise.
6015 * source.c: Likewise.
6016 * symtab.c: Likewise.
6017 * utils.c: Include "common/pathstuff.h".
6018 (gdb_realpath): Move to "common/pathstuff.c".
6019 (gdb_realpath_keepfile): Likewise.
6020 (gdb_abspath): Likewise.
6021 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6022 (gdb_realpath_keepfile): Likewise.
6023 (gdb_abspath): Likewise.
6025 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6027 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6028 wildcard process pid for super_resume for kernels with a
6031 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6033 * compile/compile.c (get_args): Add additional comments
6034 explaining function.
6036 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6037 Tom Tromey <tom@tromey.com>
6039 * target.h (memory_write_request_s): Remove typedef. Don't define
6041 (target_write_memory_blocks): Change argument to std::vector.
6042 (struct memory_write_request): Add constructor.
6043 * target-memory.c (compare_block_starting_address): Return bool.
6044 Change argument types.
6045 (claim_memory): Change arguments to use std::vector.
6046 (split_regular_and_flash_blocks, blocks_to_erase)
6047 (compute_garbled_blocks): Likewise.
6048 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6049 (target_write_memory_blocks): Change argument to std::vector.
6050 * symfile.c (struct load_section_data): Add constructor and
6051 destructor. Use std::vector for "requests".
6052 (struct load_progress_data): Add initializers.
6053 (load_section_callback): Update. Use "new".
6054 (clear_memory_write_data): Remove.
6055 (generic_load): Update.
6057 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6059 * arch/aarch64.h: Use common/tdesc.h.
6061 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6063 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6064 architecture with a 64-bit ABI.
6066 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6068 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6069 ahead of target description loading.
6071 2018-02-26 Tom Tromey <tom@tromey.com>
6073 * stack.c (backtrace_command_1): Update.
6074 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6076 * python/py-framefilter.c (py_print_frame)
6077 (gdbpy_apply_frame_filter): Change type of "flags".
6078 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
6080 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
6081 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
6082 * extension.h (enum frame_filter_flag): Rename from
6084 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
6085 (apply_ext_lang_frame_filter): Change type of "flags".
6086 * extension.c (apply_ext_lang_frame_filter): Change type of
6088 * extension-priv.h (struct extension_language_ops)
6089 <apply_frame_filter>: Change type of "flags".
6091 2018-02-26 Tom Tromey <tom@tromey.com>
6094 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
6095 off-by-one in py_end computation.
6096 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
6098 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
6101 2018-02-26 Tom Tromey <tom@tromey.com>
6103 * dwarf2read.c (struct variant_field): New.
6104 (struct nextfield) <variant>: New field.
6105 (dwarf2_add_field): Handle DW_TAG_variant_part.
6106 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
6107 discriminated union.
6108 (read_structure_type): Handle DW_TAG_variant_part.
6109 (handle_struct_member_die): New function, extracted from
6110 process_structure_scope. Handle DW_TAG_variant.
6111 (process_structure_scope): Handle discriminated unions. Call
6112 handle_struct_member_die.
6114 2018-02-26 Tom Tromey <tom@tromey.com>
6116 * rust-lang.h (rust_last_path_segment): Declare.
6117 * rust-lang.c (rust_last_path_segment): Now public. Change
6119 (struct disr_info): Remove.
6120 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6121 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6122 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6123 (rust_enum_p, rust_enum_variant): New function.
6124 (rust_underscore_fields): Remove "offset" parameter.
6125 (rust_print_enum): New function.
6126 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6127 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6128 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
6130 (rust_internal_print_type): New function, from rust_print_type.
6132 (rust_print_type): Call rust_internal_print_type.
6133 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6134 Update enum handling.
6135 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6136 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6137 (rust_union_quirks): New functions.
6138 (process_full_comp_unit, process_full_type_unit): Call
6140 (process_structure_scope): Update rust_unions if necessary.
6142 2018-02-26 Tom Tromey <tom@tromey.com>
6144 * value.h (value_union_variant): Declare.
6145 * valops.c (value_union_variant): New function.
6146 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6147 (struct discriminant_info): New.
6148 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6150 (struct main_type) <flag_discriminated_union>: New field.
6152 2018-02-26 Tom Tromey <tom@tromey.com>
6154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6155 unittests/unpack-selftests.c.
6156 * unittests/unpack-selftests.c: New file.
6157 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6159 2018-02-26 Yao Qi <yao.qi@linaro.org>
6161 * dwarf2read.c (struct partial_die_info) <read>: New method.
6162 (read_partial_die): Remove the declaration.
6163 (load_partial_dies): Update.
6164 (partial_die_info::partial_die_info):
6165 (read_partial_die): Change it to partial_die_info::read.
6167 2018-02-26 Yao Qi <yao.qi@linaro.org>
6169 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6170 (fixup_partial_die): Remove declaration.
6171 (scan_partial_symbols): Update.
6172 (partial_die_parent_scope): Likewise.
6173 (partial_die_full_name): Likewise.
6174 (fixup_partial_die): Change it to partial_die_info::fixup.
6176 2018-02-26 Yao Qi <yao.qi@linaro.org>
6178 * dwarf2read.c (read_partial_die): Update the declaration.
6179 (load_partial_dies): Caller update.
6180 (read_partial_die): Remove one argument abbrev_len.
6182 2018-02-26 Yao Qi <yao.qi@linaro.org>
6184 * dwarf2read.c (struct partial_die_info): Add ctor, delete
6185 assignment operator.
6186 (load_partial_dies): Use ctor and copy ctor.
6187 (read_partial_die): Update.
6188 (dwarf2_cu::find_partial_die): Use ctor.
6190 2018-02-26 Yao Qi <yao.qi@linaro.org>
6192 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6193 (find_partial_die_in_comp_unit): Change it to
6194 dwarf2_cu::find_partial_die.
6195 (find_partial_die): Update.
6197 2018-02-26 Yao Qi <yao.qi@linaro.org>
6199 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
6202 2018-02-26 Yao Qi <yao.qi@linaro.org>
6204 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
6206 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6208 * arch/amd64.h: Use common/tdesc.h.
6209 * arch/i386.c: Likewise.
6210 * arch/i386.h: Likewise.
6211 * arch/tic6x.c: Likewise.
6212 * arch/tdesc.h: Move file from here...
6213 * common/tdesc.h: ...to here.
6214 * features/aarch64-core.c: Regenerate.
6215 * features/aarch64-fpu.c: Regenerate.
6216 * features/i386/32bit-avx.c: Regenerate.
6217 * features/i386/32bit-avx512.c: Regenerate.
6218 * features/i386/32bit-core.c: Regenerate.
6219 * features/i386/32bit-linux.c: Regenerate.
6220 * features/i386/32bit-mpx.c: Regenerate.
6221 * features/i386/32bit-pkeys.c: Regenerate.
6222 * features/i386/32bit-sse.c: Regenerate.
6223 * features/i386/64bit-avx.c: Regenerate.
6224 * features/i386/64bit-avx512.c: Regenerate.
6225 * features/i386/64bit-core.c: Regenerate.
6226 * features/i386/64bit-linux.c: Regenerate.
6227 * features/i386/64bit-mpx.c: Regenerate.
6228 * features/i386/64bit-pkeys.c: Regenerate.
6229 * features/i386/64bit-segments.c: Regenerate.
6230 * features/i386/64bit-sse.c: Regenerate.
6231 * features/i386/x32-core.c: Regenerate.
6232 * features/tic6x-c6xp.c: Regenerate.
6233 * features/tic6x-core.c: Regenerate.
6234 * features/tic6x-gp.c: Regenerate.
6235 * target-descriptions.c: Use common/tdesc.h.
6236 * target-descriptions.h: Likewise.
6238 2018-02-24 Tom Tromey <tom@tromey.com>
6240 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
6241 (try_thread_db_load_from_dir, thread_db_load_search): Use
6243 (info_auto_load_libthread_db_compare): Return bool. Change
6245 (info_auto_load_libthread_db): Use std::vector, std::string.
6248 2018-02-24 Tom Tromey <tom@tromey.com>
6250 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
6252 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
6254 * gdbarch.c: Rebuild.
6255 * gdbarch.h: Rebuild.
6256 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
6257 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
6258 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
6261 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
6263 * gdbtypes.h (sect_offset): Change type to uint64_t.
6264 (sect_offset_str): New function.
6265 * dwarf2read.c (create_addrmap_from_aranges): Use
6267 (error_check_comp_unit_head): Likewise.
6268 (create_debug_type_hash_table): Likewise.
6269 (read_cutu_die_from_dwo): Likewise.
6270 (init_cutu_and_read_dies): Likewise.
6271 (init_cutu_and_read_dies_no_follow): Likewise.
6272 (process_psymtab_comp_unit_reader): Likewise.
6273 (partial_die_parent_scope): Likewise.
6274 (peek_die_abbrev): Likewise.
6275 (process_queue): Likewise.
6276 (dwarf2_physname): Likewise.
6277 (read_namespace_alias): Likewise.
6278 (read_import_statement): Likewise.
6279 (create_dwo_cu_reader): Likewise.
6280 (create_cus_hash_table): Likewise.
6281 (lookup_dwo_cutu): Likewise.
6282 (inherit_abstract_dies): Likewise.
6283 (read_func_scope): Likewise.
6284 (read_call_site_scope): Likewise.
6285 (dwarf2_add_member_fn): Likewise.
6286 (read_common_block): Likewise.
6287 (read_module_type): Likewise.
6288 (read_typedef): Likewise.
6289 (read_subrange_type): Likewise.
6290 (load_partial_dies): Likewise.
6291 (read_partial_die): Likewise.
6292 (find_partial_die): Likewise.
6293 (read_str_index): Likewise.
6294 (dwarf2_string_attr): Likewise.
6295 (build_error_marker_type): Likewise.
6296 (lookup_die_type): Likewise.
6297 (dump_die_shallow): Likewise.
6298 (follow_die_ref): Likewise.
6299 (dwarf2_fetch_die_loc_sect_off): Likewise.
6300 (dwarf2_fetch_constant_bytes): Likewise.
6301 (follow_die_sig): Likewise.
6302 (get_signatured_type): Likewise.
6303 (get_DW_AT_signature_type): Likewise.
6304 (dwarf2_find_containing_comp_unit): Likewise.
6305 (set_die_type): Likewise.
6307 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6309 * arch/aarch64.c: Include "common-defs.h".
6310 * arch/amd64.c: Likewise.
6311 * arch/i386.c: Likewise.
6313 2018-02-21 Tom Tromey <tom@tromey.com>
6315 * value.h: (extract_field_op): Update.
6316 * eval.c (extract_field_op): Return a const char *.
6317 * expression.h (parse_expression_for_completion): Update.
6318 * completer.c (complete_expression): Update.
6319 (add_struct_fields): Make fieldname const.
6320 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6321 (mark_completion_tag, parse_exp_in_context_1): Update.
6322 (parse_expression_for_completion): Change "name" to
6323 unique_xmalloc_ptr*.
6325 2018-02-21 Tom Tromey <tom@tromey.com>
6327 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6329 2018-02-21 Yao Qi <yao.qi@linaro.org>
6331 * avr-tdep.c (avr_read_pc): Change parameter type to
6333 * gdbarch.sh (read_pc): Likewise.
6334 * gdbarch.c: Re-generated.
6335 * gdbarch.h: Re-generated.
6336 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6338 * ia64-tdep.c (ia64_read_pc): Likewise.
6339 * mips-tdep.c (mips_read_pc): Likewise.
6340 * spu-tdep.c (spu_read_pc): Likewise.
6342 2018-02-21 Yao Qi <yao.qi@linaro.org>
6344 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6345 * regcache-dump.c: New file.
6346 * regcache.c: Move register_dump to regcache-dump.c.
6347 (maintenance_print_registers): Likewise.
6348 (maintenance_print_raw_registers): Likewise.
6349 (maintenance_print_cooked_registers): Likewise.
6350 (maintenance_print_register_groups): Likewise.
6351 (maintenance_print_remote_registers): Likewise.
6352 (_initialize_regcache): Likewise.
6353 * regcache.h (register_dump): Moved from regcache.c.
6355 2018-02-21 Yao Qi <yao.qi@linaro.org>
6357 * regcache.c (regcache::regcache): Update.
6358 (regcache::invalidate): Move it to detached_regcache::invalidate.
6359 (get_thread_arch_aspace_regcache): Update.
6360 (regcache::raw_update): Update.
6361 (regcache::cooked_read): Remove some code.
6362 (regcache::cooked_read_value): Likewise.
6363 (regcache::raw_write): Remove assert on m_readonly_p.
6364 (regcache::raw_supply_integer): Move it to
6365 detached_regcache::raw_supply_integer.
6366 (regcache::raw_supply_zeroed): Likewise.
6367 * regcache.h (detached_regcache) <raw_supply_integer>: New
6369 <raw_supply_zeroed, invalidate>: Likewise.
6370 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6371 <invalidate>: Likewise.
6372 <m_readonly_p>: Removed.
6374 2018-02-21 Yao Qi <yao.qi@linaro.org>
6376 * infcmd.c (get_return_value): Let stop_regs point to
6377 get_current_regcache.
6378 * regcache.c (regcache::regcache): Remove.
6379 (register_dump_reg_buffer): New class.
6380 (regcache_print): Adjust.
6381 * regcache.h (regcache): Remove constructors.
6383 2018-02-21 Yao Qi <yao.qi@linaro.org>
6385 * regcache.c (class register_dump): New class.
6386 (register_dump_regcache, register_dump_none): New class.
6387 (register_dump_remote, register_dump_groups): New class.
6388 (regcache_print): Update.
6389 * regcache.h (regcache_dump_what): Move it to regcache.c.
6390 (regcache) <dump>: Remove.
6392 2018-02-21 Yao Qi <yao.qi@linaro.org>
6394 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6396 (jit_unwind_reg_set_impl): Call raw_supply.
6397 (jit_frame_sniffer): Use reg_buffer_rw.
6398 * record-full.c (record_full_core_regbuf): Change its type.
6399 (record_full_core_open_1): Use reg_buffer_rw.
6400 (record_full_close): Likewise.
6401 (record_full_core_fetch_registers): Use regcache->raw_supply.
6402 (record_full_core_store_registers): Likewise.
6403 * regcache.c (regcache::get_register_status): Move it to
6405 (regcache_raw_set_cached_value): Remove.
6406 (regcache::raw_set_cached_value): Remove.
6407 (regcache::raw_write): Call raw_supply.
6408 (regcache::raw_supply): Move it to reg_buffer_rw.
6409 * regcache.h (regcache_raw_set_cached_value): Remove.
6410 (reg_buffer_rw): New class.
6412 2018-02-21 Yao Qi <yao.qi@linaro.org>
6414 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6415 readonly_detached_regcache.
6416 (dummy_frame_prev_register): Use regcache->cooked_read.
6417 * frame.c (frame_save_as_regcache): Change return type.
6418 (frame_pop): Update.
6419 * frame.h (frame_save_as_regcache): Update declaration.
6420 * inferior.h (get_infcall_suspend_state_regcache): Update
6422 * infrun.c (infcall_suspend_state) <registers>: use
6423 readonly_detached_regcache.
6424 (save_infcall_suspend_state): Don't use regcache_dup.
6425 (get_infcall_suspend_state_regcache): Change return type.
6426 * linux-fork.c (struct fork_info) <savedregs>: Change to
6427 readonly_detached_regcache.
6429 (fork_save_infrun_state): Don't use regcache_dup.
6430 (info_checkpoints_command): Adjust.
6431 * mi/mi-main.c (register_changed_p): Update declaration.
6432 (mi_cmd_data_list_changed_registers): Use
6433 readonly_detached_regcache.
6434 (register_changed_p): Change parameter type to
6435 readonly_detached_regcache.
6436 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6437 readonly_detached_regcache.
6438 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6439 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6441 (regcache::save): Move it to reg_buffer.
6442 (regcache::restore): Change parameter type.
6443 (regcache_dup): Remove.
6444 * regcache.h (reg_buffer) <save>: New method.
6445 (readonly_detached_regcache): New class.
6446 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6447 readonly_detached_regcache.
6448 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6450 2018-02-21 Yao Qi <yao.qi@linaro.org>
6452 * frame.c (frame_save_as_regcache): Use regcache method save.
6453 (frame_pop): Use regcache method restore.
6454 * infrun.c (restore_infcall_suspend_state): Likewise.
6455 * linux-fork.c (fork_load_infrun_state): Likewise.
6456 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6458 * regcache.c (regcache_save): Remove.
6459 (regcache::restore): More asserts.
6460 (regcache_cpy): Remove.
6461 * regcache.h (regcache_save): Remove the declaration.
6462 (regcache::restore): Move from private to public.
6463 Remove the friend declaration of regcache_cpy.
6464 (regcache_cpy): Remove declaration.
6466 2018-02-21 Yao Qi <yao.qi@linaro.org>
6468 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6469 parameter type to 'readable_regcache *'.
6470 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6471 * arm-tdep.c (arm_neon_quad_read): Likewise.
6472 (arm_pseudo_read): Likewise.
6473 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6474 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6475 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6476 * gdbarch.c: Re-generated.
6477 * gdbarch.h: Re-generated.
6478 * gdbarch.sh (pseudo_register_read): Change parameter type to
6479 'readable_regcache *'.
6480 (pseudo_register_read_value): Likewise.
6481 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6482 (h8300_pseudo_register_read): Likewise.
6483 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6484 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6485 (i386_pseudo_register_read_into_value): Likewise.
6486 (i386_pseudo_register_read_value): Likewise.
6487 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6489 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6490 * m32c-tdep.c (m32c_raw_read): Likewise.
6491 (m32c_read_flg): Likewise.
6492 (m32c_banked_register): Likewise.
6493 (m32c_banked_read): Likewise.
6494 (m32c_sb_read): Likewise.
6495 (m32c_part_read): Likewise.
6496 (m32c_cat_read): Likewise.
6497 (m32c_r3r2r1r0_read): Likewise.
6498 (m32c_pseudo_register_read): Likewise.
6499 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6500 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6501 (mep_pseudo_cr64_read): Likewise.
6502 (mep_pseudo_register_read): Likewise.
6503 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6504 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6505 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6506 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6507 (regcache::cooked_read): Likewise.
6508 (regcache::cooked_read_value): Likewise.
6509 (regcache_cooked_read_signed):
6510 (regcache::cooked_read): Likewise.
6511 * regcache.h (readable_regcache): New class.
6512 (regcache): Inherit readable_regcache. Move some methods to
6514 * rl78-tdep.c (rl78_pseudo_register_read): Change
6515 parameter type to 'readable_regcache *'.
6516 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6517 (e500_pseudo_register_read): Change parameter type to
6518 'readable_regcache *'.
6519 (dfp_pseudo_register_read): Likewise.
6520 (vsx_pseudo_register_read): Likewise.
6521 (efpr_pseudo_register_read): Likewise.
6522 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6523 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6524 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6525 (sh64_pseudo_register_read): Likewise.
6526 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6527 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6528 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6529 (spu_pseudo_register_read): Likewise.
6530 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6531 (xtensa_pseudo_register_read): Likewise.
6533 2018-02-21 Yao Qi <yao.qi@linaro.org>
6535 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6536 (regcache::arch): Move it to reg_buffer::arch.
6537 (regcache::register_buffer): Likewise.
6538 (regcache::assert_regnum): Likewise.
6539 (regcache::num_raw_registers): Likewise.
6540 * regcache.h (reg_buffer): New class.
6541 (regcache): Inherit reg_buffer.
6543 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6545 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6546 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6548 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6550 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6552 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6554 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6555 (SFILES): Remove common/*.c files.
6556 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6557 * common/common.host: Add common reference.
6558 * configure.ac: Likewise.
6559 * configure: Regenerate.
6561 2018-02-16 Yao Qi <yao.qi@linaro.org>
6563 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6564 (block_initialize_namespace): Use new.
6565 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6566 (dwarf2_free_objfile): Use delete.
6567 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6568 (copy_type_recursive): Use new.
6569 * gdb_obstack.h (allocate_on_obstack): New.
6571 2018-02-15 Yao Qi <yao.qi@linaro.org>
6574 * inferior.c (exit_inferior_1): Reset inf->control.
6576 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6578 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6581 2018-02-14 Pedro Alves <palves@redhat.com>
6583 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6584 frame_cleanup_after_sniffer on exception.
6586 2018-02-14 Tom Tromey <tom@tromey.com>
6588 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6590 (solib_bfd_open): Make pathname const.
6591 * solib.c (solib_bfd_open): Make pathname const.
6592 * solib-spu.c (spu_bfd_fopen): Make name const.
6593 (spu_bfd_open): Make pathname const.
6594 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6595 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6597 2018-02-14 Tom Tromey <tom@tromey.com>
6599 * symfile.c (symfile_bfd_open): Update.
6600 * source.h (openp, source_full_path_of, find_and_open_source):
6601 Change argument type to unique_xmalloc_ptr.
6602 * source.c (openp): Take a unique_xmalloc_ptr.
6603 (source_full_path_of, find_and_open_source): Likewise.
6604 (open_source_file, symtab_to_fullname): Update.
6605 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6607 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6608 (exec_file_find): Update.
6609 * psymtab.c (psymtab_to_fullname): Update.
6610 * nto-tdep.h (nto_find_and_open_solib): Update.
6611 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6613 * exec.c (exec_file_attach): Update.
6614 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6615 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6617 2018-02-14 Tom Tromey <tom@tromey.com>
6619 * solib.c: Include source.h.
6620 * nto-tdep.c: Include source.h.
6621 * mi/mi-cmd-env.c: Include source.h.
6622 * infcmd.c: Include source.h.
6623 * exec.c: Include source.h.
6624 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6625 (add_path, directory_switch, source_path, init_source_path): Move
6627 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6628 (add_path, directory_switch, source_path, init_source_path):
6631 2018-02-14 Tom Tromey <tom@tromey.com>
6633 * solist.h (exec_file_find, solib_find): Return
6635 (solib_bfd_fopen): Take a const char *.
6636 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6637 (exec_file_find, solib_find): Likewise.
6638 (solib_bfd_fopen): Do not take ownership of "pathname".
6639 (solib_bfd_open): Use unique_xmalloc_ptr.
6640 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6641 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6642 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6643 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6645 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6647 * ada-lang.c (name_match_type_from_name): Remove reference to
6648 ada_name_for_lookup in function's documentation.
6649 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6651 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6653 * defs.h (enum openp_flags): New enum.
6654 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6655 Move to enum openp_flags.
6656 (openp_flags): New enum flags.
6657 (openp): Change parameter type to openp_flags.
6658 * source.c (openp): Change parameter type to openp_flags.
6659 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6660 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6662 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6664 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6667 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6669 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6671 (class dwarf2_queue_guard): ...the destructor of this new class.
6672 (dw2_do_instantiate_symtab): Create instance of the new class
6673 dwarf2_queue_guard, remove cleanup.
6675 2018-02-09 Tom Tromey <tom@tromey.com>
6677 * source.c (find_source_lines): Don't reference past the end of
6680 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6682 * remote.c (remote_btrace_maybe_reopen): Change error message.
6683 * btrace.c (btrace_enable): Likewise.
6684 (parse_xml_btrace): Likewise.
6685 (parse_xml_btrace_conf): Likewise.
6687 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6689 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6690 (linux_enable_pt, linux_enable_bts): Call
6691 diagnose_perf_event_open_fail.
6693 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6695 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6696 Remove parameter and change return type. Update callers. Move it.
6697 (linux_enable_bts, linux_enable_pt): Improve error message.
6698 (linux_enable_pt): Remove zero buffer size check.
6699 (linux_enable_btrace): Improve error messages. Remove NULL return
6702 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6704 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6705 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6706 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6707 (linux_supports_pt, linux_supports_btrace): Remove.
6708 (linux_enable_bts): Call cpu_supports_bts.
6709 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6710 * remote.c (remote_supports_btrace): Remove.
6711 (init_remote_ops): Remove remote_supports_btrace.
6712 * target-delegates.c: Regenerated.
6713 * target.c (target_supports_btrace): Remove.
6714 * target.h (target_ops) <to_supports_btrace>: Remove
6715 (target_supports_btrace): Remove.
6716 * x86-linux-nat.c (x86_linux_create_target): Remove
6717 linux_supports_btrace.
6719 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6721 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6723 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6724 exception and use message in own exception.
6726 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6728 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6729 (perf_event_pt_event_type): Use gdb_file_up.
6730 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6731 scoped_fd, and scoped_mmap.
6733 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6735 * common/scoped_mmap.h: New.
6736 * unittests/scoped_mmap-selftest.c: New.
6737 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6738 unittests/scoped_mmap-selftest.c.
6740 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6742 * common/scoped_fd.h: New.
6743 * unittests/scoped_fd-selftest.c: New.
6744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6745 unittests/scoped_fd-selftest.c.
6747 2018-02-09 Tom Tromey <tom@tromey.com>
6749 * auto-load.c (auto_load_section_scripts): Use
6750 gdb::unique_xmalloc_ptr.
6752 2018-02-09 Tom Tromey <tom@tromey.com>
6754 * auto-load.c (execute_script_contents): Use std::string.
6756 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6758 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6759 Python function, rather than a new command.
6761 2018-02-08 Tom Tromey <tom@tromey.com>
6763 * solib.c (solib_find_1): Use std::string.
6764 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6766 2018-02-08 Tom Tromey <tom@tromey.com>
6768 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6770 2018-02-08 Tom Tromey <tom@tromey.com>
6772 * source.c (find_source_lines): Use gdb::def_vector.
6774 2018-02-08 Tom Tromey <tom@tromey.com>
6776 * macrocmd.c (struct temporary_macro_definition): New.
6777 (macro_define_command): Use temporary_macro_definition. Remove
6779 (free_macro_definition_ptr): Remove.
6781 2018-02-08 Tom Tromey <tom@tromey.com>
6783 * macroexp.c (maybe_expand): Use std::string.
6785 2018-02-08 Tom Tromey <tom@tromey.com>
6787 * macroexp.c (struct macro_buffer): Add initializers for some
6789 (init_buffer, init_shared_buffer, free_buffer)
6790 (free_buffer_return_text): Remove.
6791 (macro_buffer): New constructors.
6792 (~macro_buffer): New destructor.
6793 (macro_buffer::set_shared): New method.
6794 (macro_buffer::resize_buffer, macro_buffer::appendc)
6795 (macro_buffer::appendmem): Now methods, not free functions.
6796 (set_token, append_tokens_without_splicing, stringify)
6797 (macro_stringify): Update.
6798 (gather_arguments): Change return type. Remove argc_p argument,
6799 add args_ptr argument. Use std::vector.
6800 (substitute_args): Remove argc argument. Accept std::vector.
6801 (expand): Update. Use std::vector.
6802 (scan, macro_expand, macro_expand_next): Update.
6804 2018-02-08 Tom Tromey <tom@tromey.com>
6806 * symtab.c (default_collect_symbol_completion_matches_break_on):
6807 Use unique_xmalloc_ptr.
6808 * macroscope.h: (sal_macro_scope, user_macro_scope)
6809 (default_macro_scope): Return unique_xmalloc_ptr.
6810 * macroscope.c (sal_macro_scope, user_macro_scope)
6811 (default_macro_scope): Return unique_xmalloc_ptr.
6812 * macroexp.h (macro_expand, macro_expand_once): Return
6814 * macroexp.c (macro_expand, macro_expand_once): Return
6816 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6817 (info_macro_command, info_macros_command): Use
6819 * compile/compile-c-support.c (write_macro_definitions): Use
6821 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6823 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6825 * value.c (value_static_field): Assign field type instead of
6826 containing type when returning an optimized out value.
6828 2018-02-06 Yao Qi <yao.qi@linaro.org>
6830 * ft32-tdep.c (ft32_read_pc): Remove.
6831 (ft32_write_pc): Remove.
6832 (ft32_gdbarch_init): Update.
6833 * m32r-tdep.c (m32r_read_pc): Remove.
6834 (m32r_gdbarch_init): Update.
6835 * mep-tdep.c (mep_read_pc): Remove.
6836 (mep_gdbarch_init): Update.
6837 * microblaze-tdep.c (microblaze_write_pc): Remove.
6838 (microblaze_gdbarch_init): Update.
6839 * mn10300-tdep.c (mn10300_read_pc): Remove.
6840 (mn10300_write_pc): Remove.
6841 (mn10300_gdbarch_init): Update.
6842 * moxie-tdep.c (moxie_read_pc): Remove.
6843 (moxie_write_pc): Remove.
6844 (moxie_gdbarch_init): Update.
6846 2018-02-06 Yao Qi <yao.qi@linaro.org>
6848 * expprint.c (print_subexp_standard): Handle
6849 OP_F77_UNDETERMINED_ARGLIST.
6850 (dump_subexp_body_standard): Likewise.
6852 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6854 * target-descriptions.c (tdesc_element_visitor) Add empty
6856 (tdesc_type): Move make_gdb_type from here.
6857 (tdesc_type_builtin): Likewise.
6858 (tdesc_type_vector): Likewise.
6859 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6860 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6861 (make_gdb_type_union): Likewise.
6862 (make_gdb_type_flags): Likewise.
6863 (make_gdb_type_enum): Likewise.
6864 (make_gdb_type): New function.
6865 (tdesc_register_type): Use static make_gdb_type.
6867 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6869 * infcmd.c (default_print_one_register_info): Align natural-format
6870 column values consistently one under another.
6871 (pad_to_column): New function.
6873 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6875 * dwarf2read.c (dwarf2_physname): Move commment.
6877 2018-02-01 Leszek Swirski <leszeks@google.com>
6879 * varobj.c (varobj_formatted_print_options): Allow recursive
6880 pretty printing if pretty printing is enabled.
6882 2018-02-01 Leszek Swirski <leszeks@google.com>
6884 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6885 names after a structop as a filename.
6887 2018-02-01 Yao Qi <yao.qi@linaro.org>
6889 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6890 (arm_record_coproc_data_proc): Likewise.
6892 2018-02-01 Yao Qi <yao.qi@linaro.org>
6894 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6896 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6898 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6899 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6901 2018-01-31 Pedro Alves <palves@redhat.com>
6903 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6904 * inflow.c (child_terminal_save_inferior): Wrap reference to
6905 tcgetpgrp in HAVE_TERMIOS_H.
6906 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6908 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6909 always iterate over all inferiors.
6910 (gdbsim_cntrl_c): Adjust.
6911 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6913 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6915 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6916 index type is objfile-owned if the element type is as well.
6918 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6922 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6924 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6925 "features/s390x-linux64.c".
6926 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6927 s390_linux32 and s390x_linux64.
6928 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6930 * s390-tdep.c: Include "features/s390-linux32.c" and
6931 "features/s390x-linux64.c".
6932 (s390_tdesc_valid): Add check for tdesc_has_registers.
6933 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6934 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6935 tdesc_s390x_linux64.
6936 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6937 tdesc_s390x_linux64 to...
6938 * s390-tdep.h: ...here.
6940 2018-01-30 Pedro Alves <palves@redhat.com>
6943 * config.in, configure: Regenerate.
6944 * configure.ac: Check for getpgid.
6945 * go32-nat.c (go32_pass_ctrlc): New.
6946 (go32_target): Install it.
6947 * inf-child.c (inf_child_target): Install
6948 child_terminal_save_inferior, child_pass_ctrlc and
6950 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6951 (inf_ptrace_target): No longer install it.
6952 * infcmd.c (interrupt_target_1): Adjust.
6953 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6954 (child_interrupt): Declare.
6955 (inferior::terminal_state): New.
6956 * inflow.c (struct terminal_info): Update comments.
6957 (inferior_process_group): Delete.
6958 (terminal_is_ours): Delete.
6959 (gdb_tty_state): New.
6960 (child_terminal_init): Adjust.
6961 (is_gdb_terminal, sharing_input_terminal_1)
6962 (sharing_input_terminal): New functions.
6963 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6964 Set the process's actual process group in the foreground if
6965 possible. Handle is_ours_for_output/is_ours distinction. Don't
6966 mark terminal as the inferior's if not sharing GDB's terminal.
6967 Don't check attach_flag.
6968 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6969 pass down a target_terminal_state.
6970 (child_terminal_save_inferior): New, factored out from ...
6971 (child_terminal_ours_1): ... this. Handle
6972 target_terminal_state::is_ours_for_output.
6973 (child_interrupt, child_pass_ctrlc): New.
6974 (inflow_inferior_exit): Clear the inferior's terminal_state.
6975 (copy_terminal_info): Copy the inferior's terminal state.
6976 (_initialize_inflow): Remove reference to terminal_is_ours.
6977 * inflow.h (inferior_process_group): Delete.
6978 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6979 * procfs.c (procfs_target): Don't install procfs_interrupt.
6980 (procfs_interrupt): Delete.
6981 * remote.c (remote_serial_quit_handler): Adjust.
6982 (remote_interrupt): Remove ptid parameter. Adjust.
6983 * target-delegates.c: Regenerate.
6984 * target.c: Include "terminal.h".
6985 (target_terminal::terminal_state): Rename to ...
6986 (target_terminal::m_terminal_state): ... this.
6987 (target_terminal::init): Adjust.
6988 (target_terminal::inferior): Adjust to per-inferior
6990 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6991 (target_terminal::ours, target_terminal::ours_for_output): Use
6992 target_terminal_is_ours_kind.
6993 (target_interrupt): Remove ptid parameter. Adjust.
6994 (default_target_pass_ctrlc): Adjust.
6995 * target.h (target_ops::to_terminal_save_inferior): New field.
6996 (target_ops::to_interrupt): Remove ptid_t parameter.
6997 (target_interrupt): Remove ptid_t parameter. Update comment.
6998 (target_pass_ctrlc): Update comment.
6999 * target/target.h (target_terminal_state): New scoped enum,
7001 (target_terminal::terminal_state): ... here.
7002 (target_terminal::inferior): Update comments.
7003 (target_terminal::restore_inferior): New.
7004 (target_terminal::is_inferior, target_terminal::is_ours)
7005 (target_terminal::is_ours_for_output): Adjust.
7006 (target_terminal::scoped_restore_terminal_state): Adjust to
7007 rename, and call restore_inferior() instead of inferior().
7008 (target_terminal::scoped_restore_terminal_state::m_state): Change
7010 (target_terminal::terminal_state): Rename to ...
7011 (target_terminal::m_terminal_state): ... this and change type.
7013 2018-01-30 Pedro Alves <palves@redhat.com>
7015 * linux-nat.c (wait_for_signal): New function.
7016 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7018 (async_terminal_is_ours)
7019 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7020 (linux_nat_add_target): Don't override
7021 to_terminal_inferior/to_terminal_ours.
7023 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7025 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7027 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7029 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7030 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7031 dwarf2_per_objfile_free here.
7032 (dwarf2_per_objfile_free): Remove.
7033 (_initialize_dwarf2_read): Don't register
7034 dwarf2_per_objfile_free as a registry cleanup.
7036 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7038 Avoid compilation errors in MinGW native builds
7040 The error is triggered by including python-internal.h, and the
7043 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7044 from build-gnulib/import/math.h:27,
7045 from d:/usr/Python26/include/pyport.h:235,
7046 from d:/usr/Python26/include/Python.h:58,
7047 from python/python-internal.h:94,
7048 from python/py-arch.c:24:
7049 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7053 This happens because Python headers define 'hypot' to expand t
7054 '_hypot' in the Windows builds.
7055 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7056 'hypoth'. This avoids a compilation error.
7058 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7060 * MAINTAINERS (Write After Approval): Fix ordering.
7062 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7064 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7066 2018-01-26 Alan Modra <amodra@gmail.com>
7068 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7069 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7070 Remove nop. Make const. Comment.
7071 (powerpc32_plt_stub_so_2): New.
7072 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7073 Correct count. Update uses.
7074 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7075 Move common code reading PLT entry word. Correct
7076 powerpc32_plt_stub PLT address calculation.
7077 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7078 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
7079 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
7080 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
7081 (ppc64_standard_linkage8): Likewise.
7082 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
7083 Correct insns description.
7084 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
7086 2018-01-24 Pedro Alves <palves@redhat.com>
7088 GCC PR libstdc++/83906
7089 * gdbtypes.c (operator==(const dynamic_prop &,
7090 const dynamic_prop &)): New.
7091 (operator==(const range_bounds &, const range_bounds &)): New.
7092 (check_types_equal): Use them instead of memcmp.
7093 * gdbtypes.h (operator==(const dynamic_prop &,
7094 const dynamic_prop &)): Declare.
7095 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
7096 (operator==(const range_bounds &, const range_bounds &)): Declare.
7097 (operator!=(const range_bounds &, const range_bounds &)): Declare.
7099 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7101 * s390-linux-tdep.c (s390_record_address_mask)
7102 (s390_record_calc_disp_common, s390_record_calc_disp)
7103 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7104 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7105 (s390_process_record): Move to s390-tdep.c.
7106 (s390_linux_init_abi_any): Adjust.
7107 * s390-tdep.c (s390_record_address_mask)
7108 (s390_record_calc_disp_common, s390_record_calc_disp)
7109 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7110 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7111 (s390_process_record): Moved from s390-linux-tdep.c
7112 (s390_gdbarch_init): Adjust.
7114 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7116 * s390-linux-nat.c (s390-tdep.h): New include.
7117 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7118 (HFILES_NO_SRCDIR): Add s390-tdep.h.
7119 (ALLDEPFILES): Add s390-tdep.c.
7120 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7121 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7122 * s390-tdep.h: ...this. New file.
7123 * s390-linux-tdep.c (s390-tdep.h): New include.
7124 (_initialize_s390_tdep): Rename to...
7125 (_initialize_s390_linux_tdep): ...this and adjust.
7126 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7127 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7129 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7130 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7131 (s390_is_partial_instruction, s390_software_single_step)
7132 (is_non_branch_ril, s390_displaced_step_copy_insn)
7133 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7134 (s390_prologue_data, s390_addr, s390_store, s390_load)
7135 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7136 (s390_register_call_saved, s390_guess_tracepoint_registers)
7137 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7138 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7139 (s390_pseudo_register_name, s390_pseudo_register_type)
7140 (s390_pseudo_register_read, s390_pseudo_register_write)
7141 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7142 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7143 (s390_addr_bits_remove, s390_address_class_type_flags)
7144 (s390_address_class_type_flags_to_name)
7145 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7146 (s390_function_arg_float, s390_function_arg_vector)
7147 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7148 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7149 (s390_frame_align, s390_register_return_value, s390_return_value)
7150 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7151 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7152 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7153 (s390_trad_frame_prev_register, s390_unwind_cache)
7154 (s390_prologue_frame_unwind_cache)
7155 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7156 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7157 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7158 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7159 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7160 (s390_frame_base_address, s390_local_base_address)
7161 (s390_frame_base, s390_gcc_target_options)
7162 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7163 (s390_validate_reg_range, s390_tdesc_valid)
7164 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7165 * s390-tdep.c: ...this. New file.
7167 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7169 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7170 (s390_process_record, s390_gdbarch_tdep_alloc)
7171 (s390_linux_init_abi_any): Use/set new hook.
7173 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7175 * s390-linux-tdep.c (osabi.h): New include.
7176 (s390_linux_init_abi_31, s390_linux_init_abi_64)
7177 (s390_linux_init_abi_any): New functions.
7178 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7180 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7182 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7183 tdesc_has_registers check
7185 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7187 * s390-linux-tdep.c (s390_tdesc_valid): New function.
7188 (s390_validate_reg_range): New macro.
7189 (s390_gdbarch_init): Adjust.
7191 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7193 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7194 (s390_gdbarch_tdep_alloc): Adjust.
7195 (s390_gdbarch_init): Adjust.
7197 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7199 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
7200 <have_tdb>: Change type to bool.
7201 (s390_gdbarch_tdep_alloc): Adjust.
7202 (s390_gdbarch_init): Adjust.
7204 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7206 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
7207 (gdbarch_tdep) <have_upper, have_vx>: New fields.
7208 (s390_gdbarch_tdep_alloc): New function.
7209 (s390_gdbarch_init): Allocate tdep at start and use its fields
7210 instead of separate variables.
7212 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7214 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7215 when looking for cached gdbarch and add comment for remaining.
7217 2018-01-22 Pedro Alves <palves@redhat.com>
7218 Sergio Durigan Junior <sergiodj@redhat.com>
7220 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7223 2018-01-22 Maciej W. Rozycki <macro@mips.com>
7225 * MAINTAINERS: Update my company e-mail address.
7227 2018-01-22 Yao Qi <yao.qi@linaro.org>
7229 * regcache.c (cooked_write_test): New function.
7230 (_initialize_regcache): Register the test.
7232 2018-01-22 Yao Qi <yao.qi@linaro.org>
7234 * ia64-tdep.c (ia64_pseudo_register_read): Call
7235 regcache->cooked_read instead of regcache_cooked_read_unsigned.
7236 * m32c-tdep.c (m32c_cat_read): Likewise.
7237 (m32c_r3r2r1r0_read): Likewise.
7238 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7239 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7241 2018-01-22 Yao Qi <yao.qi@linaro.org>
7243 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
7244 method raw_read instead of regcache_raw_read.
7245 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7246 * arm-tdep.c (arm_neon_quad_read): Likewise.
7247 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7248 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7249 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7250 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
7251 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7252 (i386_pseudo_register_read_into_value): Likewise.
7253 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7254 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7255 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7256 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
7257 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
7258 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7259 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7260 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7261 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
7263 2018-01-22 Yao Qi <yao.qi@linaro.org>
7265 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
7266 * configure.tgt: Remove target mt.
7267 * mt-tdep.c: Remove.
7268 * regcache.c (cooked_read_test): Remove the check for mt.
7270 2018-01-22 Yao Qi <yao.qi@linaro.org>
7272 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
7273 instead of gdbarch_pseudo_register_read_value.
7275 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7277 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7280 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7282 * linespec.c (create_sals_line_offset): Remove code that preserved
7283 the symtab_and_line's line number.
7285 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7287 * varobj.c (varobj_create): Don't set valid_block when creating a
7290 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7292 * varobj.c (varobj_create): Remove out of date comment.
7294 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7297 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7298 updating innermost block.
7299 * parse.c (innermost_block_tracker::update): Take extra type
7300 parameter, and check types match before updating innermost block.
7301 (write_dollar_variable): Update innermost block for registers.
7302 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7303 (innermost_block_tracker::innermost_block_tracker): Initialise
7305 (innermost_block_tracker::reset): Take type parameter.
7306 (innermost_block_tracker::update): Take type parameter, and pass
7307 type through as needed.
7308 (innermost_block_tracker::m_types): New member.
7309 * varobj.c (varobj_create): Pass type when reseting innermost
7312 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7314 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7315 * ada-lang.c (resolve_subexp): Likewise.
7316 * breakpoint.c (set_breakpoint_condition) Likewise.
7317 (watch_command_1) Likewise.
7318 * c-exp.y (variable): Likewise.
7319 * d-exp.y (PrimaryExpression): Likewise.
7320 * f-exp.y (variable): Likewise.
7321 * go-exp.y (variable): Likewise.
7322 * m2-exp.y (variable): Likewise.
7323 * objfiles.c (objfile::~objfile): Likewise.
7324 * p-exp.y (variable): Likewise.
7325 * parse.c (innermost_block): Change type.
7326 * parser-defs.h (class innermost_block_tracker): New.
7327 (innermost_block): Change to innermost_block_tracker.
7328 * printcmd.c (display_command): Switch to innermost_block API.
7329 (do_one_display): Likewise.
7330 * rust-exp.y (do_one_display): Likewise.
7331 * symfile.c (clear_symtab_users): Likewise.
7332 * varobj.c (varobj_create): Switch to innermost_block API, replace
7333 use of innermost_block with block stored on varobj object.
7335 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7337 * expression.h (innermost_block): Remove declaration.
7338 * varobj.c: Add 'parser-defs.h' include.
7340 2018-01-19 Tom Tromey <tom@tromey.com>
7342 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7343 symbols in the static and global blocks.
7345 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7347 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7348 gdb_ptrace.h, and move including gdb_wait.h ...
7349 * nat/linux-ptrace.h: ... to here.
7351 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7353 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7354 inf_ptrace_detach_success.
7355 (inf_ptrace_detach_success): Add inferior parameter, use it
7356 instead of inferior_ptid, pass it to detach_inferior.
7357 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7359 * inferior.c (detach_inferior): Add overload that takes an
7361 * inferior.h (detach_inferior): Likewise.
7362 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7363 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7364 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7366 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7368 * target.h (struct target_ops) <to_detach>: Add inferior
7370 (target_detach): Likewise.
7371 * target.c (dispose_inferior): Pass inferior down.
7372 (target_detach): Pass inferior down. Assert that it is equal to
7373 the current inferior.
7374 * aix-thread.c (aix_thread_detach): Pass inferior down.
7375 * corefile.c (core_file_command): Pass current_inferior() down.
7376 * corelow.c (core_detach): Add inferior parameter.
7377 * darwin-nat.c (darwin_detach): Likewise.
7378 * gnu-nat.c (gnu_detach): Likewise.
7379 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7380 * infcmd.c (detach_command): Pass current_inferior() down to
7382 * infrun.c (follow_fork_inferior): Pass parent_inf to
7384 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7386 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7387 * linux-thread-db.c (thread_db_detach): Likewise.
7388 * nto-procfs.c (procfs_detach): Likewise.
7389 * procfs.c (procfs_detach): Likewise.
7390 * record.c (record_detach): Likewise.
7391 * record.h (struct inferior): Forward-declare.
7392 (record_detach): Add inferior parameter.
7393 * remote-sim.c (gdbsim_detach): Likewise.
7394 * remote.c (remote_detach_1): Likewise.
7395 (remote_detach): Likewise.
7396 (extended_remote_detach): Likewise.
7397 * sol-thread.c (sol_thread_detach): Likewise.
7398 * target-debug.h (target_debug_print_inferior_p): New macro.
7399 * target-delegates.c: Re-generate.
7400 * top.c (kill_or_detach): Pass inferior down to target_detach.
7401 * windows-nat.c (windows_detach): Add inferior parameter.
7403 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7405 * target.h (struct target_ops) <to_detach>: Remove args
7407 (target_detach): Likewise.
7408 * target.c (dispose_inferior): Adjust.
7409 (target_detach): Remove args parameter, adjust.
7410 * aix-thread.c (aix_thread_detach): Adjust.
7411 * corefile.c (core_file_command): Adjust.
7412 * corelow.c (core_detach): Adjust.
7413 * darwin-nat.c (darwin_detach): Adjust.
7414 * gnu-nat.c (gnu_detach): Adjust.
7415 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7416 * infcmd.c (detach_command): Adjust
7417 * infrun.c (follow_fork_inferior): Adjust.
7418 (handle_vfork_child_exec_or_exit): Adjust.
7419 * linux-fork.c (linux_fork_detach): Remove args parameter.
7420 * linux-fork.h (linux_fork_detach): Likewise.
7421 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7422 * linux-thread-db.c (thread_db_detach): Likewise.
7423 * nto-procfs.c (procfs_detach): Likewise.
7424 * procfs.c (procfs_detach): Likewise.
7425 (do_detach): Remove signo parameter.
7426 * record.c (record_detach): Remove args parameter.
7427 * record.h (record_detach): Likewise.
7428 * remote-sim.c (gdbsim_detach): Likewise.
7429 * remote.c (remote_detach_1): Likewise.
7430 (remote_detach): Likewise.
7431 (extended_remote_detach): Likewise.
7432 * sol-thread.c (sol_thread_detach): Likewise.
7433 * target-delegates.c: Re-generate.
7434 * top.c (struct qt_args) <args>: Remove field.
7435 (kill_or_detach): Don't pass args.
7436 (quit_force): Don't set args.
7437 * windows-nat.c (windows_detach): Remove args parameter.
7439 2018-01-19 Yao Qi <yao.qi@linaro.org>
7441 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7442 (arm_linux_init_abi): Install it.
7444 2018-01-19 Yao Qi <yao.qi@linaro.org>
7446 * osabi.c (gdb_osabi_names): Extend the regexp for
7447 arm-linux-gnueabihf.
7449 2018-01-18 Yao Qi <yao.qi@linaro.org>
7451 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7453 (abbrev_table::add_abbrev): Update.
7454 (abbrev_table::lookup_abbrev): Update.
7456 2018-01-18 Yao Qi <yao.qi@linaro.org>
7458 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7460 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7462 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7465 2018-01-17 Tom Tromey <tom@tromey.com>
7467 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7469 2018-01-17 Tom Tromey <tom@tromey.com>
7471 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7472 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7473 (create_array_type_with_stride): Update.
7474 * dwarf2read.c (set_die_type): Update.
7476 2018-01-17 Tom Tromey <tom@tromey.com>
7478 * dwarf2read.c (delayed_method_info): Remove typedef.
7479 (dwarf2_cu::method_info): Now a std::vector.
7480 (add_to_method_list): Update.
7481 (free_delayed_list): Remove.
7482 (compute_delayed_physnames): Update.
7483 (process_full_comp_unit, process_full_type_unit): Clear the method
7484 list. Remove cleanups.
7485 (psymtab_include_file_name): Add name_holder parameter. Use
7487 (dwarf_decode_lines): Update.
7489 2018-01-17 Tom Tromey <tom@tromey.com>
7490 Simon Marchi <simon.marchi@ericsson.com>
7492 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7493 (dwarf2_per_objfile::free_cached_comp_units)
7494 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7495 (init_cutu_and_read_dies_no_follow): Update.
7496 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7497 (dwarf2_cu::~dwarf2_cu): New.
7498 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7499 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7501 2018-01-17 Tom Tromey <tom@tromey.com>
7502 Simon Marchi <simon.marchi@ericsson.com>
7504 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7505 (struct die_reader_specs) <abbrev_table>: New member.
7506 (struct abbrev_table): Add constructor.
7507 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7508 <abbrev_obstack>: Now an auto_obstack.
7509 (abbrev_table_up): New typedef.
7510 (init_cu_die_reader): Add abbrev_table parameter.
7511 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7512 Add result_dwo_abbrev_table.
7513 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7514 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7516 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7518 (skip_children): Update.
7519 (abbrev_table::alloc_abbrev): Rename from
7520 abbrev_table_alloc_abbrev.
7521 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7522 (abbrev_table::lookup_abbrev): Rename from
7523 abbrev_table_lookup_abbrev.
7524 (abbrev_table_read_table): Return abbrev_table_up.
7525 (abbrev_table_free, abbrev_table_free_cleanup)
7526 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7527 (load_partial_dies): Update.
7529 2018-01-17 Tom Tromey <tom@tromey.com>
7531 * dwarf2read.c (dwarf2_compute_name): Update comment.
7532 (read_func_scope, read_variable): Update.
7533 (new_symbol): Remove.
7534 (new_symbol_full): Rename to new_symbol.
7536 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7539 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7540 a warning instead of throwing an error, set section size to 0 and return
7542 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7544 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7546 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7548 (linux_ptrace_attach_fail_reason_string): Likewise.
7549 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7551 (linux_ptrace_attach_fail_reason_string): Likewise.
7552 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7554 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7556 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7558 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7561 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7562 checking for fs_base/gs_base fields in struct user_regs_struct.
7563 * configure: Regenerate.
7565 2018-01-17 Yao Qi <yao.qi@linaro.org>
7567 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7569 (aarch64_linux_init_abi): Install it to gdbarch hook
7572 2018-01-15 Pedro Alves <palves@redhat.com>
7574 * common/signals-state-save-restore.c
7575 (save_original_signals_state): Fix typos.
7577 2017-01-12 Tom Tromey <tom@tromey.com>
7578 Sergio Durigan Junior <sergiodj@redhat.com>
7580 * Makefile.in (install-only): Install gdb-add-index.
7582 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7584 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7586 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7588 * infrun.c (keep_going_pass_signal): Clear step-over info when
7589 insert_breakpoints fails.
7591 2018-01-11 Pedro Alves <palves@redhat.com>
7594 * infrun.c (resume): Rename to ...
7595 (resume_1): ... this.
7596 (resume): Reimplement as wrapper around resume_1.
7598 2018-01-11 Pedro Alves <palves@redhat.com>
7601 * remote.c (remote_parse_stop_reply): Default to the last-set
7602 general thread instead of to 'magic_null_ptid'.
7604 2018-01-10 Pedro Alves <palves@redhat.com>
7606 * language.h (language_get_symbol_name_matcher): Rename ...
7607 (get_symbol_name_matcher): ... this.
7608 * language.c (language_get_symbol_name_matcher): Ditto.
7609 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7612 2018-01-10 Pedro Alves <palves@redhat.com>
7616 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7617 Adjust to use language_get_symbol_name_matcher instead of
7618 language_defn::la_get_symbol_name_matcher.
7619 * language.c (language_get_symbol_name_matcher): If in Ada mode
7620 and the lookup name is a verbatim match, return Ada's matcher.
7621 * language.h (language_get_symbol_name_matcher): Adjust comment.
7622 (ada_lookup_name_info::verbatim_p):: New method.
7624 2018-01-10 Pedro Alves <palves@redhat.com>
7627 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7628 minsym's language is language_auto or language_cplus, pass down
7629 language_ada instead.
7630 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7632 2018-01-10 Pedro Alves <palves@redhat.com>
7635 * minsyms.c (linkage_name_str): New function.
7636 (iterate_over_minimal_symbols): Use it.
7638 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7640 * NEWS: Document that 'info proc' now works on FreeBSD.
7642 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7644 * configure.ac: Check for kinfo_getfile in libutil.
7645 * configure: Regenerate.
7646 * config.in: Regenerate.
7647 * fbsd-nat.c: Include "fbsd-tdep.h".
7648 (fbsd_fetch_cmdline): New.
7649 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7650 rather than calling error.
7651 (fbsd_info_proc): New.
7652 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7653 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7654 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7656 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7658 * fbsd-nat.c (struct free_deleter): Remove.
7659 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7661 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7663 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7664 NULL for an empty pathname.
7666 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7668 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7669 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7670 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7671 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7672 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7673 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7674 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7675 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7676 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7677 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7678 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7679 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7680 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7681 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7682 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7684 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7686 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7687 (gnu_xfer_auxv): New function.
7688 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7691 2018-01-08 Yao Qi <yao.qi@linaro.org>
7692 Simon Marchi <simon.marchi@ericsson.com>
7694 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7696 (COMMON_OBS): Remove selftest.o.
7697 * configure.ac: Append selftest-arch.c and common/selftest.c to
7698 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7699 * configure: Re-generated.
7700 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7702 (maintenance_info_selftests): Likewise.
7704 2018-01-08 Xavier Roirand <roirand@adacore.com>
7706 * ada-valprint.c (val_print_packed_array_elements): Use
7707 proper number of elements when printing an array indexed
7708 by an enumeration type.
7710 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7712 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7713 (dw2_get_file_names_reader): Adjust.
7714 (lookup_dwo_signatured_type): Adjust.
7715 (lookup_dwp_signatured_type): Adjust.
7716 (lookup_signatured_type): Adjust.
7717 (create_type_unit_group): Adjust.
7718 (get_type_unit_group): Adjust.
7719 (process_psymtab_comp_unit_reader): Adjust.
7720 (build_type_psymtabs_reader): Adjust.
7721 (scan_partial_symbols): Adjust.
7722 (add_partial_symbol): Adjust.
7723 (add_partial_subprogram): Adjust.
7724 (peek_die_abbrev): Adjust.
7725 (fixup_go_packaging): Adjust.
7726 (process_imported_unit_die): Adjust.
7727 (dwarf2_compute_name): Adjust.
7728 (dwarf2_physname): Adjust.
7729 (read_import_statement): Adjust.
7730 (handle_DW_AT_stmt_list): Adjust.
7731 (read_file_scope): Adjust.
7732 (read_func_scope): Adjust.
7733 (read_lexical_block_scope): Adjust.
7734 (read_call_site_scope): Adjust.
7735 (read_variable): Adjust.
7736 (dwarf2_rnglists_process): Adjust.
7737 (dwarf2_ranges_process): Adjust.
7738 (dwarf2_ranges_read): Adjust.
7739 (dwarf2_get_pc_bounds): Adjust.
7740 (dwarf2_record_block_ranges): Adjust.
7741 (dwarf2_add_field): Adjust.
7742 (dwarf2_add_member_fn): Adjust.
7743 (read_structure_type): Adjust.
7744 (process_structure_scope): Adjust.
7745 (read_enumeration_type): Adjust.
7746 (read_array_type): Adjust.
7747 (mark_common_block_symbol_computed): Adjust.
7748 (read_common_block): Adjust.
7749 (read_namespace_type): Adjust.
7750 (read_namespace): Adjust.
7751 (read_module_type): Adjust.
7752 (read_tag_pointer_type): Adjust.
7753 (read_tag_ptr_to_member_type): Adjust.
7754 (read_tag_string_type): Adjust.
7755 (read_subroutine_type): Adjust.
7756 (read_typedef): Adjust.
7757 (read_base_type): Adjust.
7758 (attr_to_dynamic_prop): Adjust.
7759 (read_subrange_type): Adjust.
7760 (read_unspecified_type): Adjust.
7761 (dwarf2_read_abbrevs): Adjust.
7762 (load_partial_dies): Adjust.
7763 (read_partial_die): Adjust.
7764 (find_partial_die): Adjust.
7765 (guess_partial_die_structure_name): Adjust.
7766 (fixup_partial_die): Adjust.
7767 (read_attribute_value): Adjust.
7768 (read_addr_index): Adjust.
7769 (read_addr_index_from_leb128): Adjust.
7770 (read_str_index): Adjust.
7771 (dwarf2_string_attr): Adjust.
7772 (get_debug_line_section): Adjust.
7773 (dwarf_decode_line_header): Adjust.
7774 (lnp_state_machine::check_line_address): Adjust.
7775 (dwarf_decode_lines_1): Adjust.
7776 (dwarf_decode_lines): Adjust.
7777 (dwarf2_start_symtab): Adjust.
7778 (var_decode_location): Adjust.
7779 (new_symbol_full): Adjust.
7780 (dwarf2_const_value_data): Adjust.
7781 (dwarf2_const_value_attr): Adjust.
7782 (dwarf2_const_value): Adjust.
7784 (die_containing_type): Adjust.
7785 (build_error_marker_type): Adjust.
7786 (lookup_die_type): Adjust.
7787 (guess_full_die_structure_name): Adjust.
7788 (anonymous_struct_prefix): Adjust.
7789 (determine_prefix): Adjust.
7790 (dwarf2_name): Adjust.
7791 (follow_die_ref_or_sig): Adjust.
7792 (follow_die_offset): Adjust.
7793 (follow_die_ref): Adjust.
7794 (follow_die_sig_1): Adjust.
7795 (follow_die_sig): Adjust.
7796 (get_signatured_type): Adjust.
7797 (get_DW_AT_signature_type): Adjust.
7798 (decode_locdesc): Adjust.
7799 (dwarf_decode_macros): Adjust.
7800 (cu_debug_loc_section): Adjust.
7801 (fill_in_loclist_baton): Adjust.
7802 (dwarf2_symbol_mark_computed): Adjust.
7803 (init_one_comp_unit): Don't assign
7804 dwarf2_cu::dwarf2_per_objfile.
7805 (set_die_type): Adjust.
7807 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7809 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7810 <dwarf2_per_objfile>: New field.
7811 (dwarf2_per_objfile): Remove global.
7812 (get_dwarf2_per_objfile): New function.
7813 (set_dwarf2_per_objfile): New function.
7814 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7816 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7817 (read_abbrev_offset): Likewise.
7818 (read_indirect_string): Likewise.
7819 (read_indirect_line_string): Likewise.
7820 (read_indirect_string_at_offset): Likewise.
7821 (read_indirect_string_from_dwz): Likewise.
7822 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7824 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7825 (create_all_comp_units): Change objfile parameter to
7827 (create_all_type_units): Likewise.
7828 (process_queue): Add dwarf2_per_objfile parameter.
7829 (read_and_check_comp_unit_head): Likewise.
7830 (lookup_dwo_unit_in_dwp): Likewise.
7831 (get_dwp_file): Likewise.
7832 (process_cu_includes): Likewise.
7833 (struct free_dwo_file_cleanup_data): New struct.
7834 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7835 set_dwarf2_per_objfile.
7836 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7837 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7838 context, adjust calls.
7839 (dw2_instantiate_symtab): Likewise.
7840 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7841 (dw2_get_cu): Likewise.
7842 (create_cu_from_index_list): Change objfile parameter to
7844 (create_cus_from_index_list): Get dwarf2_per_objfile from
7845 context, adjust calls.
7846 (create_cus_from_index): Likewise.
7847 (create_signatured_type_table_from_index): Change objfile
7848 parameter to dwarf2_per_objfile.
7849 (create_signatured_type_table_from_debug_names): Change objfile
7850 parameter to dwarf2_per_objfile.
7851 (create_addrmap_from_index): Likewise.
7852 (create_addrmap_from_aranges): Likewise.
7853 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7854 (dw2_setup): Remove.
7855 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7857 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7858 get_dwarf2_per_objfile.
7859 (dw2_forget_cached_source_info): Likewise.
7860 (dw2_map_symtabs_matching_filename): Likewise.
7861 (struct dw2_symtab_iterator) <index>: Remove.
7862 <dwarf2_per_objfile>: New field.
7863 (dw2_symtab_iter_init): Replace index parameter with
7865 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7866 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7867 (dw2_print_stats): Likewise.
7868 (dw2_dump): Likewise.
7869 (dw2_expand_symtabs_for_function): Likewise.
7870 (dw2_expand_all_symtabs): Likewise.
7871 (dw2_expand_symtabs_with_fullname): Likewise.
7872 (dw2_expand_marked_cus): Replace index and objfile parameters
7873 with dwarf2_per_objfile.
7874 (dw_expand_symtabs_matching_file_matcher): Add
7875 dwarf2_per_objfile parameter and adjust calls.
7876 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7878 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7879 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7881 (create_cus_from_debug_names_list): Replace objfile parameter
7882 with dwarf2_per_objfile and adjust calls.
7883 (create_cus_from_debug_names): Likewise.
7884 (dwarf2_read_debug_names): Likewise.
7885 (mapped_debug_names::namei_to_name): Adjust call.
7886 (dw2_debug_names_iterator::next): Likewise.
7887 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7888 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7889 (dw2_debug_names_dump): Likewise.
7890 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7891 (dw2_debug_names_expand_symtabs_matching): Likewise.
7892 (dwarf2_initialize_objfile): Likewise.
7893 (dwarf2_build_psymtabs): Likewise.
7894 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7896 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7897 (read_and_check_comp_unit_head): Likewise.
7898 (read_abbrev_offset): Likewise.
7899 (create_debug_type_hash_table): Likewise.
7900 (create_debug_types_hash_table): Likewise.
7901 (create_all_type_units): Replace objfile parameter with
7903 (add_type_unit): Add dwarf2_per_objfile parameter.
7904 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7905 with dwarf2_per_objfile.
7906 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7907 (lookup_dwp_signatured_type): Likewise.
7908 (lookup_signatured_type): Likewise.
7909 (read_cutu_die_from_dwo): Likewise.
7910 (init_tu_and_read_dwo_dies): Likewise.
7911 (init_cutu_and_read_dies): Likewise.
7912 (init_cutu_and_read_dies_no_follow): Likewise.
7913 (allocate_type_unit_groups_table): Add objfile parameter.
7914 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7915 (get_type_unit_group): Likewise.
7916 (process_psymtab_comp_unit): Update call.
7917 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7918 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7919 (print_tu_stats): Likewise.
7920 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7922 (build_type_psymtabs): Change objfile parameter to
7924 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7925 passed in void* parameter.
7926 (process_skeletonless_type_units): Change objfile parameter to
7928 (set_partial_user): Likewise.
7929 (dwarf2_build_psymtabs_hard): Likewise.
7930 (read_comp_units_from_section): Likewise.
7931 (create_all_comp_units): Likewise.
7932 (scan_partial_symbols): Update calls.
7933 (add_partial_symbol): Likewise.
7934 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7935 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7936 (process_queue): Add dwarf2_per_objfile parameter.
7937 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7938 (compute_compunit_symtab_includes): Likewise.
7939 (process_cu_includes): Add dwarf2_per_objfile parameter.
7940 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7941 (process_full_type_unit): Likewise.
7942 (process_imported_unit_die): Update call.
7943 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7944 (read_file_scope): Likewise.
7945 (allocate_dwo_file_hash_table): Add objfile parameter.
7946 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7947 (create_cus_hash_table): Likewise.
7948 (create_dwp_hash_table): Likewise.
7949 (create_dwo_unit_in_dwp_v1): Likewise.
7950 (create_dwp_v2_section): Likewise.
7951 (create_dwo_unit_in_dwp_v2): Likewise.
7952 (lookup_dwo_unit_in_dwp): Likewise.
7953 (try_open_dwop_file): Likewise.
7954 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7955 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7956 cleanup to include a reference to dwarf2_per_objfile.
7957 (open_dwp_file): Add dwarf2_per_objfile parameter.
7958 (open_and_init_dwp_file): Likewise.
7959 (get_dwp_file): Likewise.
7960 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7961 (queue_and_load_all_dwo_tus): Update call.
7962 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7964 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7965 (dwarf2_ranges_process): Likewise.
7966 (dwarf2_get_pc_bounds): Likewise.
7967 (mark_common_block_symbol_computed): Likewise.
7968 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7969 (dwarf2_read_abbrevs): Update call.
7970 (read_partial_die): Use dwarf2_per_objfile from cu.
7971 (find_partial_die): Likewise.
7972 (fixup_partial_die): Likewise.
7973 (read_attribute_value): Likewise.
7974 (read_indirect_string_at_offset_from): Add objfile parameter.
7975 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7977 (read_indirect_string_from_dwz): Add objfile parameter.
7978 (read_indirect_string): Add objfile parameter.
7979 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7980 (read_addr_index): Use dwarf2_per_objfile from cu.
7981 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7983 (read_str_index): Use dwarf2_per_objfile from cu.
7984 (get_debug_line_section): Likewise.
7985 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7986 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7987 (new_symbol_full): Use dwarf2_per_objfile from cu.
7988 (build_error_marker_type): Likewise.
7989 (lookup_die_type): Likewise.
7990 (determine_prefix): Likewise.
7991 (follow_die_offset): Likewise.
7992 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7993 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7994 (dwarf2_fetch_die_type_sect_off): Likewise.
7995 (dwarf2_get_die_type): Likewise.
7996 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7997 (get_signatured_type): Likewise.
7998 (get_DW_AT_signature_type): Likewise.
7999 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8000 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8001 (cu_debug_loc_section): Likewise.
8002 (fill_in_loclist_baton): Likewise.
8003 (dwarf2_symbol_mark_computed): Likewise.
8004 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8006 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8008 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8009 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8010 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8011 (set_die_type): Use dwarf2_free_objfile from cu.
8012 (get_die_type_at_offset): Likewise.
8013 (dwarf2_per_objfile_free): Don't assign global variable.
8014 (debug_names) <constructor>: Add dwarf2_per_objfile
8015 parameter, update m_debugstrlookup construction.
8016 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8018 <m_dwarf2_per_objfile>: New field.
8019 <lookup>: Use m_dwarf2_per_objfile.
8020 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8021 (psyms_seen_size): Likewise.
8022 (write_gdbindex): Replace objfile parameter with
8024 (write_debug_names): Likewise.
8025 (write_psymtabs_to_index): Likewise.
8026 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8029 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8031 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8032 <dwarf2_per_objfile>: New field.
8033 (struct dwarf2_per_cu_data) <objfile>: Remove.
8034 <dwarf2_per_objfile>: New field.
8035 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8037 (create_signatured_type_table_from_index): Likewise.
8038 (create_debug_type_hash_table): Likewise.
8039 (fill_in_sig_entry_from_dwo_entry): Likewise.
8040 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8041 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8043 (create_partial_symtab): Access objfile through
8045 (process_psymtab_comp_unit_reader): Likewise.
8046 (read_comp_units_from_section): Likewise.
8047 (scan_partial_symbols): Likewise.
8048 (add_partial_symbol): Likewise.
8049 (add_partial_subprogram): Likewise.
8050 (peek_die_abbrev): Likewise.
8051 (fixup_go_packaging): Likewise.
8052 (process_full_comp_unit): Likewise.
8053 (process_full_type_unit): Likewise.
8054 (process_imported_unit_die): Likewise.
8055 (dwarf2_compute_name): Likewise.
8056 (dwarf2_physname): Likewise.
8057 (read_import_statement): Likewise.
8058 (create_cus_hash_table): Assign dwarf2_physname instead of
8060 (read_func_scope): Access objfile through dwarf2_per_objfile.
8061 (read_lexical_block_scope): Likewise.
8062 (read_call_site_scope): Likewise.
8063 (read_variable): Likewise.
8064 (dwarf2_rnglists_process): Likewise.
8065 (dwarf2_ranges_process): Likewise.
8066 (dwarf2_ranges_read): Likewise.
8067 (dwarf2_record_block_ranges): Likewise.
8068 (dwarf2_add_field): Likewise.
8069 (dwarf2_add_member_fn): Likewise.
8070 (read_structure_type): Likewise.
8071 (process_structure_scope): Likewise.
8072 (read_enumeration_type): Likewise.
8073 (read_array_type): Likewise.
8074 (read_common_block): Likewise.
8075 (read_namespace_type): Likewise.
8076 (read_namespace): Likewise.
8077 (read_module_type): Likewise.
8078 (read_tag_pointer_type): Likewise.
8079 (read_tag_ptr_to_member_type): Likewise.
8080 (read_tag_string_type): Likewise.
8081 (read_subroutine_type): Likewise.
8082 (read_typedef): Likewise.
8083 (read_base_type): Likewise.
8084 (attr_to_dynamic_prop): Likewise.
8085 (read_subrange_type): Likewise.
8086 (read_unspecified_type): Likewise.
8087 (load_partial_dies): Likewise.
8088 (read_partial_die): Likewise.
8089 (find_partial_die): Likewise.
8090 (guess_partial_die_structure_name): Likewise.
8091 (fixup_partial_die): Likewise.
8092 (read_attribute_value): Likewise.
8093 (read_addr_index_from_leb128): Likewise.
8094 (dwarf2_read_addr_index): Likewise.
8095 (dwarf2_string_attr): Likewise.
8096 (lnp_state_machine::check_line_address): Likewise.
8097 (dwarf_decode_lines_1): Likewise.
8098 (dwarf_decode_lines): Likewise.
8099 (dwarf2_start_symtab): Likewise.
8100 (var_decode_location): Likewise.
8101 (new_symbol_full): Likewise.
8102 (dwarf2_const_value_data): Likewise.
8103 (dwarf2_const_value_attr): Likewise.
8104 (dwarf2_const_value): Likewise.
8105 (die_type): Likewise.
8106 (die_containing_type): Likewise.
8107 (lookup_die_type): Likewise.
8108 (guess_full_die_structure_name): Likewise.
8109 (anonymous_struct_prefix): Likewise.
8110 (dwarf2_name): Likewise.
8111 (follow_die_ref_or_sig): Likewise.
8112 (follow_die_offset): Likewise.
8113 (follow_die_ref): Likewise.
8114 (dwarf2_fetch_die_loc_sect_off): Likewise.
8115 (dwarf2_fetch_constant_bytes): Likewise.
8116 (dwarf2_fetch_die_type_sect_off): Likewise.
8117 (dwarf2_get_die_type): Likewise.
8118 (follow_die_sig): Likewise.
8119 (decode_locdesc): Likewise.
8120 (dwarf2_per_cu_objfile): Likewise.
8121 (dwarf2_per_cu_text_offset): Likewise.
8122 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8124 (set_die_type): Access objfile through
8127 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8129 * valprint.c (converted_character_d): Remove typedef.
8130 (DEF_VEC_O (converted_character_d)): Remove.
8131 (count_next_character): Use std::vector.
8132 (print_converted_chars_to_obstack): Likewise.
8133 (generic_printstr): Likewise.
8135 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8137 * xml-support.h (struct gdb_xml_value): Add constructor.
8138 <value>: Change type to unique_xmalloc_ptr.
8139 (gdb_xml_value_s): Remove typedef.
8140 (DEF_VEC_O (gdb_xml_value_s)): Remove.
8141 (gdb_xml_element_start_handler): Change parameter type to
8143 (xml_find_attribute): Likewise.
8144 * xml-support.c (xml_find_attribute): Change parameter type to
8145 std::vector and adjust.
8146 (gdb_xml_values_cleanup): Remove.
8147 (gdb_xml_parser::start_element): Adjust to std::vector.
8148 (xinclude_start_include): Change paraeter type to std::vector
8150 * btrace.c (check_xml_btrace_version): Likewise.
8151 (parse_xml_btrace_block): Likewise.
8152 (parse_xml_btrace_pt_config_cpu): Likewise.
8153 (parse_xml_btrace_pt): Likewise.
8154 (parse_xml_btrace_conf_bts): Likewise.
8155 (parse_xml_btrace_conf_pt): Likewise.
8156 * memory-map.c (memory_map_start_memory): Likewise.
8157 (memory_map_start_property): Likewise.
8158 * osdata.c (osdata_start_osdata): Likewise.
8159 (osdata_start_item): Likewise.
8160 (osdata_start_column): Likewise.
8161 * remote.c (start_thread): Likewise.
8162 * solib-aix.c (library_list_start_library): Likewise.
8163 (library_list_start_list): Likewise.
8164 * solib-svr4.c (library_list_start_library): Likewise.
8165 (svr4_library_list_start_list): Likewise.
8166 * solib-target.c (library_list_start_segment): Likewise.
8167 (library_list_start_section): Likewise.
8168 (library_list_start_library): Likewise.
8169 (library_list_start_list): Likewise.
8170 * tracepoint.c (traceframe_info_start_memory): Likewise.
8171 (traceframe_info_start_tvar): Likewise.
8172 * xml-syscall.c (syscall_start_syscall): Likewise.
8173 * xml-tdesc.c (tdesc_start_target): Likewise.
8174 (tdesc_start_feature): Likewise.
8175 (tdesc_start_reg): Likewise.
8176 (tdesc_start_union): Likewise.
8177 (tdesc_start_struct): Likewise.
8178 (tdesc_start_flags): Likewise.
8179 (tdesc_start_enum): Likewise.
8180 (tdesc_start_field): Likewise.
8181 (tdesc_start_enum_value): Likewise.
8182 (tdesc_start_vector): Likewise.
8184 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8186 * extension.h (struct xmethod_worker) <clone>: Remove.
8187 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8189 (python_xmethod_worker::clone): Remove.
8190 * valops.c (find_overload_match): Use std::move instead of
8193 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8195 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8196 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8197 <free_xmethod_worker_data>: Remove.
8198 <get_matching_xmethod_workers>: Chance VEC to std::vector.
8199 <get_xmethod_arg_types>: Remove.
8200 <get_xmethod_result_type>: Remove.
8201 <invoke_xmethod>: Remove.
8202 * extension.c (new_xmethod_worker): Remove.
8203 (clone_xmethod_worker): Remove.
8204 (get_matching_xmethod_workers): Return void, pass std::vector by
8206 (get_xmethod_arg_types): Rename to...
8207 (xmethod_worker::get_arg_types): ... this, and adjust.
8208 (get_xmethod_result_type): Rename to...
8209 (xmethod_worker::get_result_type): ... this, and adjust.
8210 (invoke_xmethod): Remove.
8211 (free_xmethod_worker): Remove.
8212 (free_xmethod_worker_vec): Remove.
8213 * extension.h (enum ext_lang_rc): Move here from
8215 (struct xmethod_worker): Add constructor and destructor.
8218 <invoke, clone, do_get_result_type, do_get_arg_types>: New
8219 virtual pure methods.
8220 <get_arg_types, get_result_type>: New methods.
8221 (xmethod_worker_ptr): Remove typedef.
8222 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8223 (xmethod_worker_vec): Remove typedef.
8224 (xmethod_worker_up): New typedef.
8225 (invoke_xmethod): Remove.
8226 (clone_xmethod_worker): Remove.
8227 (free_xmethod_worker): Remove.
8228 (free_xmethod_worker_vec): Remove.
8229 (get_xmethod_arg_types): Remove.
8230 (get_xmethod_result_type): Remove.
8231 * valops.c (find_method_list): Use std::vector, don't use
8232 intermediate vector.
8233 (value_find_oload_method_list): Use std::vector.
8234 (find_overload_match): Use std::vector.
8235 (find_oload_champ): Use std::vector.
8236 * value.c (value_free): Use operator delete.
8237 (value_of_xmethod): Rename to...
8238 (value_from_xmethod): ... this. Don't assign
8239 xmethod_worker::value, take rvalue-reference.
8240 (result_type_of_xmethod): Adjust.
8241 (call_xmethod): Adjust.
8242 * value.h: Include extension.h.
8243 (struct xmethod_worker): Don't forward-declare.
8244 (value_of_xmethod): Rename to...
8245 (value_from_xmethod): ... this, take rvalue-reference.
8246 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
8247 (struct python_xmethod_worker): ... this, add constructor and
8249 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
8250 (gdbpy_free_xmethod_worker_data): Rename to...
8251 (python_xmethod_worker::~python_xmethod_worker): ... this and
8253 (gdbpy_clone_xmethod_worker_data): Rename to...
8254 (python_xmethod_worker::clone): ... this and adjust.
8255 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
8257 (gdbpy_get_xmethod_arg_types): Rename to...
8258 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
8259 (gdbpy_get_xmethod_result_type): Rename to...
8260 (python_xmethod_worker::do_get_result_type): ... this and
8262 (gdbpy_invoke_xmethod): Rename to...
8263 (python_xmethod_worker::invoke): ... this and adjust.
8264 (new_python_xmethod_worker): Rename to...
8265 (python_xmethod_worker::python_xmethod_worker): ... this and
8267 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
8269 (gdbpy_free_xmethod_worker_data): Remove.
8270 (gdbpy_get_matching_xmethod_workers): Use std::vector.
8271 (gdbpy_get_xmethod_arg_types): Remove.
8272 (gdbpy_get_xmethod_result_type): Remove.
8273 (gdbpy_invoke_xmethod): Remove.
8274 * python/python.c (python_extension_ops): Remove obsolete
8277 2018-01-05 Pedro Alves <palves@redhat.com>
8280 * common/signals-state-save-restore.c
8281 (save_original_signals_state): New parameter 'quiet'. Warn if we
8282 find a custom handler preinstalled, instead of internal erroring.
8283 But only warn if !quiet.
8284 * common/signals-state-save-restore.h
8285 (save_original_signals_state): New parameter 'quiet'.
8286 * main.c (captured_main_1): Move save_original_signals_state call
8287 after option handling, and pass QUIET.
8289 2018-01-05 Pedro Alves <palves@redhat.com>
8291 * spu-tdep.c (spu_catch_start): Pass
8292 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8294 2018-01-05 Pedro Alves <palves@redhat.com>
8297 * ada-lang.c (literal_symbol_name_matcher): New function.
8298 (ada_get_symbol_name_matcher): Use it for
8299 symbol_name_match_type::SEARCH_NAME.
8300 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8301 it down instead of assuming symbol_name_match_type::FULL.
8302 * block.h (block_lookup_symbol): New parameter 'match_type'.
8303 * c-valprint.c (print_unpacked_pointer): Use
8304 lookup_symbol_search_name instead of lookup_symbol.
8305 * compile/compile-object-load.c (get_out_value_type): Pass down
8306 symbol_name_match_type::SEARCH_NAME.
8307 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8308 symbol_name_match_type::FULL.
8309 * cp-support.c (cp_get_symbol_name_matcher): Handle
8310 symbol_name_match_type::SEARCH_NAME.
8311 * infrun.c (insert_exception_resume_breakpoint): Use
8312 lookup_symbol_search_name.
8313 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8314 * psymtab.c (maintenance_check_psymtabs): Use
8315 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8316 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8318 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8319 if symbol_name_match_type::SEARCH_NAME.
8320 (lookup_symbol_in_language): Pass down
8321 symbol_name_match_type::FULL.
8322 (lookup_symbol_search_name): New.
8323 (lookup_language_this): Pass down
8324 symbol_name_match_type::SEARCH_NAME.
8325 (lookup_symbol_aux, lookup_local_symbol): New parameter
8326 'match_type'. Pass it down.
8327 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8328 (lookup_symbol_search_name): New declaration.
8329 (lookup_symbol_in_block): New 'match_type' parameter.
8331 2018-01-05 Pedro Alves <palves@redhat.com>
8334 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8336 (ada_lookup_symbol): Reimplement in terms of
8337 ada_lookup_symbol_list, bits factored out from
8338 ada_lookup_encoded_symbol.
8340 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8342 * ada-exp.y (write_object_renaming): When subscripting an array
8343 using a symbol as the index, pass the block in call to
8344 ada_lookup_encoded_symbol when looking that symbol up.
8346 2018-01-05 Jerome Guitton <guitton@adacore.com>
8348 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8351 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8353 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8354 the case where VALUE_LVAL (val0) is not lval_memory.
8356 2018-01-05 Xavier Roirand <roirand@adacore.com>
8358 * ada-valprint.c (print_optional_low_bound): Handle
8359 character-indexed array printing like boolean-indexed array
8362 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8364 * NEWS: Create a new section for the next release branch.
8365 Rename the section of the current branch, now that it has
8368 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8370 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8371 * version.in: Bump version to 8.1.50.DATE-git.
8373 2018-01-03 Xavier Roirand <roirand@adacore.com>
8375 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8377 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8379 (default_exception_support_info) <catch_handlers_sym>: Add field.
8380 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8381 (ada_exception_name_addr_1): Add "catch handlers" handling.
8382 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8384 (create_excep_cond_exprs) <ex>: Add parameter.
8385 (re_set_exception): Update create_excep_cond_exprs call.
8386 (print_it_exception, print_one_exception, print_mention_exception)
8387 (print_recreate_exception): Add "catch handler" handling.
8388 (allocate_location_catch_handlers, re_set_catch_handlers)
8389 (check_status_catch_handlers, print_it_catch_handlers)
8390 (print_one_catch_handlers, print_mention_catch_handlers)
8391 (print_recreate_catch_handlers): New function.
8392 (catch_handlers_breakpoint_ops): New variable.
8393 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8394 Add parameter. Add "catch handler" handling.
8395 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8396 Add "catch handler" handling.
8397 (ada_exception_catchpoint_cond_string): Add "catch handler"
8399 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8401 (catch_ada_handlers_command): New function.
8402 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8403 operations structure.
8404 (_initialize_ada_language): Add "catch handlers" command entry.
8405 * NEWS: Document "catch handlers" feature.
8407 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8409 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8410 account when creating the array type of the slice.
8411 (ada_value_slice): Likewise.
8413 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8415 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8417 (create_array_type_with_stride): Add byte_stride_prop parameter.
8418 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8419 New parameter. Update all callers in this file.
8420 (array_type_has_dynamic_stride): New function.
8421 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8422 of arrays with dynamic byte strides.
8423 * dwarf2read.c (read_array_type): Add support for dynamic
8424 DW_AT_byte_stride attributes.
8426 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8428 * dwarf2read.c (read_unspecified_type): Treat
8429 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8431 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8433 Update copyright year range in all GDB files.
8435 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8437 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8438 and gdb/testsuite/gdb.base/step-line.c.
8440 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8442 * copyright.py (main): Dump the contents of
8443 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8444 even if BY_HAND is empty.
8446 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8448 * top.c (print_gdb_version): Update Copyright year in version
8451 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8453 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8455 For older changes see ChangeLog-2017.
8461 version-control: never