1 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5 (AARCH64_DWARF_SVE_FFR): Likewise.
6 (AARCH64_DWARF_SVE_P0): Likewise.
7 (AARCH64_DWARF_SVE_Z0): Likewise.
9 2018-06-11 Alan Hayward <alan.hayward@arm.com>
11 * common/common-regcache.h (raw_compare): New function.
12 * regcache.c (regcache::raw_compare): Likewise.
13 * regcache.h (regcache::raw_compare): New declaration.
15 2018-06-11 Alan Hayward <alan.hayward@arm.com>
17 * common/common-regcache.h (reg_buffer_common): New structure.
18 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
19 (reg_buffer::raw_supply): Likewise.
20 (reg_buffer::raw_supply_integer): Likewise.
21 (reg_buffer::raw_supply_zeroed): Likewise.
22 (reg_buffer::raw_collect): Likewise.
23 (reg_buffer::raw_collect_integer): Likewise.
24 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
25 (reg_buffer::raw_supply): Likewise.
26 (reg_buffer::raw_supply_integer): Likewise.
27 (reg_buffer::raw_supply_zeroed): Likewise.
28 (reg_buffer::raw_collect): Likewise.
29 (reg_buffer::raw_collect_integer): Likewise.
31 2018-06-10 Tom Tromey <tom@tromey.com>
33 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
34 (class remote_state) <stop_reply_queue>: Now std::vector.
35 (remote_state::~remote_state)
36 (remote_target::stop_reply_queue_length): Update.
37 (struct queue_iter_param, remove_child_of_pending_fork)
38 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
39 (check_pending_event_prevents_wildcard_vcont_callback)
40 (remove_stop_reply_for_inferior)
41 (remove_stop_reply_of_remote_state)
42 (remote_notif_remove_once_on_match)
43 (stop_reply_match_ptid_and_ws)
44 (remote_kill_child_of_pending_fork): Remove.
45 (remote_target::remove_new_fork_children)
46 (remote_target::check_pending_events_prevent_wildcard_vcont)
47 (remote_target::discard_pending_stop_replies)
48 (remote_target::discard_pending_stop_replies_in_queue)
49 (remote_target::remote_notif_remove_queued_reply)
50 (remote_target::queued_stop_reply)
51 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
52 (remote_target::wait, remote_target::kill_new_fork_children)
53 (remote_target::async): Update.
55 2018-06-10 Tom Tromey <tom@tromey.com>
57 * record-full.c (record_full_arch_list_cleanups): Remove.
58 (record_full_message): Use try/catch.
59 (record_full_wait_cleanups): Remove.
60 (record_full_wait_1): Use try/catch.
61 (record_full_restore): Likewise.
63 2018-06-10 Tom Tromey <tom@tromey.com>
65 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
66 declare VEC. Add constructor.
67 <in_target_beneath>: Now bool.
68 (record_full_breakpoints): Now a std::vector, static.
69 (record_full_sync_record_breakpoints)
70 (record_full_init_record_breakpoints)
71 (record_full_target::insert_breakpoint)
72 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
74 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
76 * dwarf2read.c (process_cu_includes): Remove struct keyword.
77 * serial.c (serial_interface_lookup): Remove struct keyword.
79 2018-06-10 Tom Tromey <tom@tromey.com>
81 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
83 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
85 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
87 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
88 "beneath" as a method.
89 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
90 Use "beneath" as a method.
92 2018-06-10 Tom Tromey <tom@tromey.com>
94 * tracefile.c (struct trace_file_writer_deleter): New.
95 <operator()>: Rename from trace_file_writer_xfree.
96 (trace_file_writer_up): New typedef.
97 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
99 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
101 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
102 <m_registers, m_register_status>: Change type to
104 * regcache.c (reg_buffer::reg_buffer): Use new instead of
107 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
109 * common/common-regcache.h (enum register_status): Add
110 underlying type "signed char".
111 * regcache.h (reg_buffer) <m_register_status>: Change type to
113 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
114 register_status instead of signed char.
115 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
116 (reg_buffer::get_register_status): Remove cast.
117 (readable_regcache::raw_read): Remove cast.
118 (readable_regcache::cooked_read): Remove cast.
120 2018-06-09 Tom Tromey <tom@tromey.com>
122 * source.c (reverse_search_command, forward_search_command): Use
125 2018-06-09 Tom Tromey <tom@tromey.com>
127 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
128 (serial_ops_list): Now static, std::vector.
129 (serial_interface_lookup, serial_add_interface): Update.
131 2018-06-09 Tom Tromey <tom@tromey.com>
133 * dwarf2read.c (process_cu_includes): Update.
134 (process_full_comp_unit): Update.
135 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
138 2018-06-08 Paul Koning <paul_koning@dell.com>
142 * python/python.c (do_start_initialization):
143 Avoid call to internal Python API.
144 (init__gdb_module): New function.
146 2018-06-08 Gary Benson <gbenson@redhat.com>
148 * linux-thread-db.c (valprint.h): New include.
149 (struct check_thread_db_info): New structure.
150 (check_thread_db_on_load, tdb_testinfo): New static globals.
151 (check_thread_db, check_thread_db_callback): New functions.
152 (try_thread_db_load_1): Run integrity checks if requested.
153 (maintenance_check_libthread_db): New function.
154 (_initialize_thread_db): Register "maint check libthread-db"
155 and "maint set/show check-libthread-db".
156 * NEWS: Mention the above new commands.
158 2018-06-08 Tom Tromey <tom@tromey.com>
160 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
163 2018-06-08 Tom Tromey <tom@tromey.com>
165 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
167 2018-06-08 Tom Tromey <tom@tromey.com>
169 * common/btrace-common.h (struct btrace_data): Add constructor,
170 destructor, move assignment operator.
171 <empty, clear, fini>: New methods.
172 <format>: Initialize.
173 (btrace_data_init, btrace_data_fini, btrace_data_clear)
174 (btrace_data_empty): Don't declare.
175 * common/btrace-common.c (btrace_data_init): Remove.
176 (btrace_data::fini): Rename from btrace_data_fini.
177 (btrace_data::empty): Rename from btrace_data_empty.
178 (btrace_data::clear): Rename from btrace_data_clear. Return
180 * btrace.h (make_cleanup_btrace_data): Don't declare.
181 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
182 (parse_xml_btrace): Update.
183 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
184 (maint_btrace_clear_packet_history_cmd): Update.
186 2018-06-07 Pedro Alves <palves@redhat.com>
188 * target.h (target_ops) <beneath>: Now a method. All references
190 (class target_stack): New.
191 * target.c (g_target_stack): New.
192 (g_current_top_target): Delete.
193 (current_top_target): Get the top target out of g_target_stack.
194 (target_stack::push, target_stack::unpush): New.
195 (push_target, unpush_target): Reimplement.
196 (target_is_pushed): Reimplement in terms of g_target_stack.
197 (target_ops::beneath, target_stack::find_beneath): New.
199 2018-06-07 Pedro Alves <palves@redhat.com>
201 * target.h (find_target_beneath): Delete declaration.
202 * target.c (find_target_beneath): Delete definition.
203 * aix-thread.c: All callers of find_target_beneath adjusted to
204 call target_ops::beneath instead.
205 * bsd-uthread.c: Likewise.
206 * linux-thread-db.c: Likewise.
207 * ravenscar-thread.c: Likewise.
208 * sol-thread.c: Likewise.
209 * spu-multiarch.c: Likewise.
211 2018-06-07 Pedro Alves <palves@redhat.com>
213 * target.h (target_ops) <beneath>: Now a method. All references
215 (target_ops) <m_beneath>: New.
216 * target.c (target_ops::beneath): New.
217 * corelow.c: Adjust all references to target_ops::beneath.
218 * linux-thread-db.c: Likewise.
219 * make-target-delegates: Likewise.
220 * record-btrace.c: Likewise.
221 * record-full.c: Likewise.
222 * remote.c: Likewise.
223 * target.c: Likewise.
224 * target-delegates.c: Regenerate.
226 2018-06-07 Pedro Alves <palves@redhat.com>
228 * target.h (target_stack): Delete.
229 (current_top_target): Declare function.
230 * target.c (target_stack): Delete.
231 (g_current_top_target): New.
232 (current_top_target): New function.
233 * auxv.c: Use current_top_target instead of target_stack
235 * avr-tdep.c: Likewise.
236 * breakpoint.c: Likewise.
237 * corefile.c: Likewise.
238 * elfread.c: Likewise.
240 * exceptions.c: Likewise.
242 * gdbarch-selftests.c: Likewise.
243 * gnu-v3-abi.c: Likewise.
244 * ia64-tdep.c: Likewise.
245 * ia64-vms-tdep.c: Likewise.
246 * infcall.c: Likewise.
247 * infcmd.c: Likewise.
248 * infrun.c: Likewise.
249 * linespec.c: Likewise.
250 * linux-tdep.c: Likewise.
251 * minsyms.c: Likewise.
252 * ppc-linux-nat.c: Likewise.
253 * ppc-linux-tdep.c: Likewise.
254 * procfs.c: Likewise.
255 * regcache.c: Likewise.
256 * remote.c: Likewise.
257 * rs6000-tdep.c: Likewise.
258 * s390-linux-nat.c: Likewise.
259 * s390-tdep.c: Likewise.
260 * solib-aix.c: Likewise.
261 * solib-darwin.c: Likewise.
262 * solib-dsbt.c: Likewise.
263 * solib-spu.c: Likewise.
264 * solib-svr4.c: Likewise.
265 * solib-target.c: Likewise.
266 * sparc-tdep.c: Likewise.
267 * sparc64-tdep.c: Likewise.
268 * spu-tdep.c: Likewise.
269 * symfile.c: Likewise.
270 * symtab.c: Likewise.
271 * target-descriptions.c: Likewise.
272 * target-memory.c: Likewise.
273 * target.c: Likewise.
274 * target.h: Likewise.
275 * tracefile-tfile.c: Likewise.
276 * tracepoint.c: Likewise.
277 * valops.c: Likewise.
278 * valprint.c: Likewise.
280 * windows-tdep.c: Likewise.
281 * mi/mi-main.c: Likewise.
283 2018-06-07 Tom Tromey <tom@tromey.com>
285 * valprint.h (build_address_symbolic): Declare.
286 * printcmd.c (print_address_symbolic): Update.
287 (build_address_symbolic): Change "name" and "filename" to
289 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
291 * defs.h (build_address_symbolic): Remove declaration.
293 2018-06-07 Alan Hayward <alan.hayward@arm.com>
295 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
296 (aarch64_vnv_type): Add function.
297 (aarch64_pseudo_register_name): Add V regs for SVE.
298 (aarch64_pseudo_register_type): Likewise.
299 (aarch64_pseudo_register_reggroup_p): Likewise.
300 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
301 (aarch64_pseudo_read_value): Add V regs for SVE.
302 (aarch64_pseudo_write_2): Use V0 offset for SVE
303 (aarch64_pseudo_write): Add V regs for SVE.
304 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
306 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
308 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
309 (sve_vl_from_vq): Likewise.
311 2018-06-05 Tom Tromey <tom@tromey.com>
313 * cli/cli-cmds.c (show_version): Update.
314 * top.c (print_gdb_version): Add "interactive" parameter.
316 * main.c (captured_main_1): Update.
317 * top.h (print_gdb_version): Add "interactive" parameter and a
320 2018-06-05 David Malcolm <dmalcolm@redhat.com>
322 * common/enum-flags.h: Add trailing semicolon to example in
325 2018-06-05 Tom Tromey <tom@tromey.com>
328 * NEWS: Add entry about pager.
329 * utils.c (pagination_disabled_for_command): New global.
330 (prompt_for_continue): Allow "c" response to prompt.
331 (reinitialize_more_filter): Clear
332 pagination_disabled_for_command.
333 (fputs_maybe_filtered): Check pagination_disabled_for_command.
335 2018-06-04 Tom Tromey <tom@tromey.com>
337 * ada-lang.h (ada_lookup_symbol_list): Update.
338 * ada-lang.c (resolve_subexp): Update.
339 (symbols_are_identical_enums): Change type of syms. Remove nsyms
341 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
342 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
343 results parameter to std::vector.
344 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
346 * ada-exp.y (block_lookup): Update.
347 (select_possible_type_sym): Change type of syms. Remove nsyms
349 (write_var_or_type, write_name_assoc): Update.
351 2018-06-04 Joel Brobecker <brobecker@adacore.com>
353 * windows-nat.c (windows_nat_target::xfer_partial): Return
354 TARGET_XFER_E_IO if we need to delegate to the target beneath
357 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
359 * Makefile.in (config.status): Add configure.nat as a
362 2018-06-04 Tom Tromey <tom@tromey.com>
364 * cp-name-parser.y (cpname_state): Add method declarations.
365 (HANDLE_QUAL): Update.
366 (cpname_state::d_grab, cpname_state::fill_comp)
367 (cpname_state::make_operator, cpname_state::make_dtor)
368 (cpname_state::make_builtin_type, cpname_state::make_name)
369 (cpname_state::d_qualify, cpname_state::d_int_type)
370 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
371 (%union): Move earlier.
373 2018-06-04 Alan Hayward <alan.hayward@arm.com>
375 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
377 2018-06-04 Alan Hayward <alan.hayward@arm.com>
379 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
380 (aarch64_pseudo_write_1): Likewise.
381 (aarch64_pseudo_read_value): Use helper.
382 (aarch64_pseudo_write): Likewise.
384 2018-06-04 Pedro Alves <palves@redhat.com>
386 * darwin-nat.c (darwin_ops): Delete.
387 (darwin_attach_pid): Use get_native_target.
389 2018-06-04 Alan Hayward <alan.hayward@arm.com>
391 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
392 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
394 2018-06-04 Alan Hayward <alan.hayward@arm.com>
396 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
397 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
398 (aarch64_gdbarch_init): Check for SVE.
399 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
401 2018-06-04 Alan Hayward <alan.hayward@arm.com>
403 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
404 * aarch64-tdep.h (aarch64_read_description): Likewise.
405 * arch/aarch64.c (aarch64_create_target_description): Likewise.
406 * arch/aarch64.h (aarch64_create_target_description): Likewise.
407 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
408 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
409 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
411 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
413 * value.c (value_fetch_lazy_bitfield): New.
414 (value_fetch_lazy_memory): New.
415 (value_fetch_lazy_register): New.
416 (value_fetch_lazy): Factor out to smaller functions.
418 2018-06-01 Tom Tromey <tom@tromey.com>
420 * cp-name-parser.y (backslashable, represented): Now const.
422 2018-06-01 Tom Tromey <tom@tromey.com>
424 * cp-name-parser.y: Include parser-defs.h.
425 (parser_fprintf): Remove declaration.
427 2018-06-01 Tom Tromey <tom@tromey.com>
429 * cp-name-parser.y: Use %pure-parser, %lex-param, and
431 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
432 (global_result): Remove globals.
433 (struct cpname_state): New.
434 (yyparse): Don't declare.
435 (yylex, yyerror): Move declarations after %union.
436 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
437 (make_name): Add state parameter.
439 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
441 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
443 (yylex): Add lvalp, state parameters.
444 (yyerror): Add state parameter.
445 (cp_demangled_name_to_comp): Update.
447 2018-06-01 Tom Tromey <tom@tromey.com>
449 * cp-name-parser.y (parser_fprintf): Declare.
450 (GDB_YY_REMAP_PREFIX): Define.
451 Include yy-remap.h. Don't redefine yy* identifiers.
453 2018-06-01 Tom Tromey <tom@tromey.com>
455 * python/py-type.c (typy_legacy_template_argument): Update.
456 * cp-support.h (cp_demangled_name_to_comp): Update.
457 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
458 parameter to be a "std::string *".
461 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
463 * ada-lex.l: Include "diagnostics.h" instead of
464 "common/diagnostics.h".
465 * unittests/environ-selftests.c: Likewise.
466 * common/diagnostics.h: Moved to ../include.
468 2018-06-01 Joel Brobecker <brobecker@adacore.com>
470 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
471 to language_mode_manual while calling breakpoint_re_set_one.
473 2018-06-01 Tom Tromey <tom@tromey.com>
475 * valops.c (value_cast_structs, destructor_name_p): Update.
476 * symtab.c (gdb_mangle_name): Update.
477 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
479 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
480 (pascal_object_print_value_fields, pascal_object_print_value):
482 * p-typeprint.c (pascal_type_print_derivation_info): Update.
483 * linespec.c (find_methods): Update.
484 * gdbtypes.h (type_name_no_tag): Remove.
485 (type_name_or_error): Rename from type_name_no_tag_or_error.
486 * gdbtypes.c (type_name_no_tag): Remove.
487 (type_name_or_error): Rename from type_name_no_tag_or_error.
488 (lookup_struct_elt_type, check_typedef): Update.
489 * expprint.c (print_subexp_standard): Update.
490 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
491 * d-namespace.c (d_lookup_nested_symbol): Update.
492 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
493 (cp_print_class_member): Update.
494 * cp-namespace.c (cp_lookup_nested_symbol): Update.
495 * completer.c (add_struct_fields): Update.
496 * c-typeprint.c (cp_type_print_derivation_info)
497 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
499 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
500 (ada_prefer_type, ada_is_exception_sym): Update.
502 2018-06-01 Tom Tromey <tom@tromey.com>
504 * valops.c (enum_constant_from_type, value_namespace_elt)
505 (value_maybe_namespace_elt): Update.
506 * valarith.c (find_size_for_pointer_math): Update.
507 * target-descriptions.c (make_gdb_type): Update.
508 * symmisc.c (print_symbol): Update.
509 * stabsread.c (define_symbol, read_type)
510 (complain_about_struct_wipeout, add_undefined_type)
511 (cleanup_undefined_types_1): Update.
512 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
513 (rust_range_type_p, val_print_struct, rust_print_struct_def)
514 (rust_internal_print_type, rust_composite_type)
515 (rust_evaluate_funcall, rust_evaluate_subexp)
516 (rust_inclusive_range_type_p): Update.
517 * python/py-type.c (typy_get_tag): Update.
518 * p-typeprint.c (pascal_type_print_base): Update.
519 * mdebugread.c (parse_symbol, parse_type): Update.
520 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
522 * guile/scm-type.c (gdbscm_type_tag): Update.
523 * go-lang.c (sixg_string_p): Update.
524 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
526 * gdbtypes.h (struct main_type) <tag_name>: Remove.
527 (TYPE_TAG_NAME): Remove.
528 * gdbtypes.c (type_name_no_tag): Simplify.
529 (check_typedef, check_types_equal, recursive_dump_type)
530 (copy_type_recursive, arch_composite_type): Update.
531 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
532 in summary mode when needed.
533 * eval.c (evaluate_funcall): Update.
534 * dwarf2read.c (fixup_go_packaging, read_structure_type)
535 (process_structure_scope, read_enumeration_type)
536 (read_namespace_type, read_module_type, determine_prefix): Update.
537 * cp-support.c (inspect_type): Update.
538 * coffread.c (process_coff_symbol, decode_base_type): Update.
539 * c-varobj.c (c_is_path_expr_parent): Update.
540 * c-typeprint.c (c_type_print_base_struct_union): Update.
541 (c_type_print_base_1): Update. Print struct/class/union/enum in
542 summary when using C language.
543 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
544 (gen_maybe_namespace_elt): Update.
545 * ada-lang.c (ada_type_name): Simplify.
546 (empty_record, ada_template_to_fixed_record_type_1)
547 (template_to_static_fixed_type)
548 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
550 2018-06-01 Tom Tromey <tom@tromey.com>
552 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
554 * c-typeprint.c (c_print_type_1): Add "language" parameter.
555 (c_print_type): Update.
556 (c_print_type): New overload.
557 (c_type_print_varspec_prefix, c_type_print_args)
558 (c_type_print_varspec_suffix, c_print_type_no_offsets)
559 (c_type_print_base_struct_union, c_type_print_base_1)
560 (cp_type_print_method_args): Add "language" parameter.
561 (c_type_print_base): Update.
562 * c-lang.h (c_print_type): Add new overload.
564 2018-06-01 Tom Tromey <tom@tromey.com>
566 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
567 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
569 2018-06-01 Alan Hayward <alan.hayward@arm.com>
571 * aarch64-tdep.c (aarch64_sve_register_names): New const
573 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
574 (AARCH64_SVE_Z_REGS_NUM): New define.
575 (AARCH64_SVE_P_REGS_NUM): Likewise.
576 (AARCH64_SVE_NUM_REGS): Likewise.
578 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
580 * nat/linux-ptrace.h [__alpha__]
581 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
584 2018-05-31 Maciej W. Rozycki <macro@mips.com>
586 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
587 the endianness selected.
588 * NEWS: Document `set endian auto' mode operation update.
590 2018-05-31 Alan Hayward <alan.hayward@arm.com>
592 * Makefile.in: Add new header.
593 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
594 (sve_vl_from_vg): Likewise.
595 (sve_vq_from_vl): Likewise.
596 (sve_vl_from_vq): Likewise.
597 (sve_vq_from_vg): Likewise.
598 (sve_vg_from_vq): Likewise.
599 * configure.nat: Add new c file.
600 * nat/aarch64-sve-linux-ptrace.c: New file.
601 * nat/aarch64-sve-linux-ptrace.h: New file.
603 2018-05-31 Alan Hayward <alan.hayward@arm.com>
605 * aarch64-linux-nat.c (aarch64_linux_read_description):
607 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
609 * aarch64-tdep.c (tdesc_aarch64_list): Add.
610 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
611 (aarch64_gdbarch_init): Add parmeter zero.
612 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
613 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
614 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
616 * doc/gdb.texinfo: Describe SVE feature
617 * features/aarch64-sve.c: New file.
619 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
622 * gdbarch.sh (significant_addr_bit): Default to zero when
623 not set by target architecture.
624 * gdbarch.c: Re-generated.
625 * utils.c (address_significant): Update.
627 2018-05-30 Joel Brobecker <brobecker@adacore.com>
629 * stack.c (func_command): Remove trailing newline in call to error.
631 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
633 * regcache.h (regcache_raw_collect): Remove, update callers to
634 use regcache::raw_collect.
635 * regcache.c (regcache_raw_collect): Remove.
637 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
639 * regcache.h (regcache_raw_supply): Remove, update callers to
640 use detached_regcache::raw_supply.
641 * regcache.c (regcache_raw_supply): Remove.
643 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
645 * regcache.h (regcache_cooked_write_part): Remove, update
646 callers to use regcache::cooked_write_part.
647 * regcache.c (regcache_cooked_write_part): Remove.
649 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
651 * regcache.h (regcache_cooked_read_part): Remove, update callers
652 to use readable_regcache::cooked_read_part.
653 * regcache.c (regcache_cooked_read_part): Remove.
655 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
657 * regcache.h (regcache_cooked_read_value): Remove, update
658 callers to use readable_regcache::cooked_read_value.
659 * regcache.c (regcache_cooked_read_value): Remove.
661 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
663 * regcache.h (regcache_cooked_write): Remove, update callers to
664 use regcache::cooked_write.
665 * regcache.c (regcache_cooked_write): Remove.
667 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
669 * regcache.h (regcache_invalidate): Remove, update callers to
670 use detached_regcache::invalidate instead.
671 * regcache.c (regcache_invalidate): Remove.
673 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
675 * regcache.h (regcache_raw_write_part): Remove, update callers
676 to use regcache::raw_write_part instead.
677 * regcache.c (regcache_raw_write_part): Remove.
679 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
681 * regcache.h (regcache_raw_read_part): Remove, update callers to
682 use readable_regcache::raw_read_part instead.
683 * regcache.c (regcache_raw_read_part): Remove.
685 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
687 * regcache.h (regcache_cooked_read): Remove, update callers to
688 use readable_regcache::cooked_read instead.
689 * regcache.c (regcache_cooked_read): Remove.
691 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
693 * regcache.h (regcache_raw_write): Remove, update callers to use
694 regcache::raw_write instead.
695 * regcache.c (regcache_raw_write): Remove.
697 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
699 * regcache.h (regcache_raw_read): Remove, update callers to use
700 readable_regcache::raw_read instead.
701 * regcache.c (regcache_raw_read): Remove.
703 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
705 * regcache.h (regcache_raw_update): Remove, update callers to
706 use readable_regcache::raw_update instead.
707 * regcache.c (regcache_raw_update): Remove.
709 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
711 * regcache.h (regcache_register_status): Remove, update callers
712 to use reg_buffer::get_register_status directly instead.
713 * regcache.c (regcache_register_status): Remove.
715 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
717 * regcache.h (regcache_get_ptid): Remove, update all callers to
718 call regcache::ptid instead.
719 * regcache.c (regcache_get_ptid): Remove.
721 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
723 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
725 2018-05-30 Pedro Alves <palves@redhat.com>
727 * common/common-exceptions.h (exception_rethrow): Use
730 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
732 * breakpoint.c (print_solib_event, check_status_catch_solib):
733 Remove struct keyword in range-based for loops.
734 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
735 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
737 * linespec.c (find_superclass_methods, search_minsyms_for_name):
739 * symfile.c (addr_info_make_relative): Likewise.
740 * thread.c (value_in_thread_stack_temporaries): Likewise.
742 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
744 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
745 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
746 * coff-pe-read.c (add_pe_forwarded_sym): Replace
747 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
748 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
749 * jit.c (jit_breakpoint_re_set_internal): Likewise.
750 * printcmd.c (info_address_command): Likewise.
752 2018-05-29 Tom Tromey <tom@tromey.com>
754 * windows-nat.c (handle_exception): Update fall-through comment.
756 2018-05-29 Tom Tromey <tom@tromey.com>
758 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
759 (struct program_space) <added_solibs>: Now a std::vector.
760 * breakpoint.c (print_solib_event): Update.
761 (check_status_catch_solib): Update.
762 * progspace.c (clear_program_space_solib_cache): Update.
763 * solib.c (update_solib_list): Update.
765 2018-05-29 Tom Tromey <tom@tromey.com>
767 * python/py-type.c (typy_richcompare): Update.
768 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
769 * gdbtypes.h (types_deeply_equal): Return bool.
770 (types_equal): Likewise.
771 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
773 (check_types_equal): Change worklist to std::vector. Return
775 (struct type_equality_entry): Add constructor.
776 (compare_maybe_null_strings): Return bool.
777 (check_types_worklist): Return bool. Change worklist to
779 (types_deeply_equal): Use std::vector.
780 (types_equal): Return bool.
781 (compare_maybe_null_strings): Simplify.
783 2018-05-29 Tom Tromey <tom@tromey.com>
785 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
787 2018-05-29 Tom Tromey <tom@tromey.com>
789 * objc-lang.h: Don't include cp-support.h.
790 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
793 2018-05-27 Tom Tromey <tom@tromey.com>
795 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
797 2018-05-25 Tom Tromey <tom@tromey.com>
799 * value.c (value::location): Initialize.
801 2018-05-25 Tom Tromey <tom@tromey.com>
803 * dbxread.c (init_bincl_list): Remove.
804 (bincl_list): Now a std::vector.
805 (bincls_allocated, next_bincl): Remove.
806 (free_bincl_list, do_free_bincl_list_cleanup)
807 (make_cleanup_free_bincl_list): Remove.
808 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
810 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
811 (struct header_file_location): Add constructor.
812 (add_bincl_to_list): Remove.
814 2018-05-25 Tom Tromey <tom@tromey.com>
816 * tui/tui.c (tui_enable): Update.
817 * mi/mi-interp.c (mi_interp::init): Update.
818 * interps.h (class interp) <name>: New method.
819 <m_name>: Rename from name.
820 (~scoped_restore_interp): Update.
821 * interps.c (interp::interp): Update.
822 (interp_add, interp_set, interp_lookup_existing)
823 (current_interp_named_p): Update.
825 2018-05-25 Tom Tromey <tom@tromey.com>
827 * interps.c (interp_name): Remove.
828 * mi/mi-interp.c (mi_interp::init): Update.
829 * interps.h (interp_name): Remove.
830 (~scoped_restore_interp): Update.
831 * tui/tui.c (tui_enable): Update.
833 2018-05-25 Tom Tromey <tom@tromey.com>
835 * utils.c (fputs_maybe_filtered): Update.
836 * linespec.c (decode_line_full): Update.
837 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
838 (mi_print_breakpoint_for_event, mi_solib_loaded)
839 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
840 (mi_user_selected_context_changed): Update.
841 * mi/mi-main.c (mi_execute_command): Update.
842 * cli/cli-script.c (execute_control_command): Update.
843 * python/python.c (execute_gdb_command): Update.
844 * solib.c (info_sharedlibrary_command): Update.
845 * interps.c (interp_ui_out): Remove.
846 * interps.h (interp_ui_out): Remove.
848 2018-05-25 Tom Tromey <tom@tromey.com>
850 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
851 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
852 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
854 2018-05-25 Tom Tromey <tom@tromey.com>
856 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
857 * interps.c (interp_exec): Use scoped_restore.
859 2018-05-25 Tom Tromey <tom@tromey.com>
861 * remote.c (remote_target::remote_file_get): Use
863 (remote_target::remote_file_put): Likewise.
865 2018-05-25 Tom Tromey <tom@tromey.com>
867 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
869 (get_pe_section_index, add_pe_exported_sym): Update.
870 (read_pe_exported_syms): Use gdb::def_vector.
872 2018-05-25 Tom Tromey <tom@tromey.com>
874 * frame.c (remove_prev_frame): Remove.
875 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
877 2018-05-25 Maciej W. Rozycki <macro@mips.com>
879 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
881 * mips-linux-nat.c (supply_fpregset): Always call
882 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
883 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
884 `mips_fill_fpregset'.
885 * mips-linux-tdep.c (mips_supply_fpregset)
886 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
887 (mips_fill_fpregset_wrapper): Remove functions.
888 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
889 (mips_linux_fpregset): Remove variable.
890 (mips_linux_iterate_over_regset_sections): Use
891 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
892 (mips_linux_o32_sigframe_init): Remove comment.
894 2018-05-25 Pedro Alves <palves@redhat.com>
896 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
897 (struct readahead_cache, struct packet_reg, struct
898 remote_arch_state, class remote_state): Move higher up in the
900 (remote_target::m_remote_state): Now an object instead of a pointer.
901 (remote_target::get_remote_state): Adjust.
903 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
905 * stack.c (select_and_print_frame): Delete.
906 (struct function_bounds): Move struct within function.
907 (func_command): Most content moved into new function
908 find_frame_for_function, use new function, print result, add
910 (find_frame_for_function): New function, now returns a result.
912 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
914 * stack.c (iterate_over_block_arg_vars): Fix comment.
915 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
917 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
921 (scoped_restore_selected_frame::scoped_restore_selected_frame):
923 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
925 * frame.h (class scoped_restore_selected_frame): New class.
926 * stack.c (print_frame_local_vars): Remove catching and rethrowing
927 of any exception, use scoped_restore_selected_frame to restore the
930 2018-05-24 Pedro Alves <palves@redhat.com>
932 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
935 2018-05-23 Tom Tromey <tom@tromey.com>
937 * complaints.c (struct complaints): Remove.
938 (symfile_complaint_book): Remove.
939 (series): New global.
940 (complaint_internal): Update.
941 (clear_complaints): Update.
943 2018-05-23 Tom Tromey <tom@tromey.com>
945 * complaints.c (counters): New global.
946 (struct complain): Remove.
947 (struct complaints) <root>: Remove.
948 (complaint_sentinel): Remove.
949 (symfile_complaint_book): Update.
950 (find_complaint) Remove.
951 (complaint_internal, clear_complaints): Update.
953 2018-05-23 Tom Tromey <tom@tromey.com>
955 * complaints.c (struct complain) <file, line>: Remove.
956 (find_complaint): Remove file, line parameters.
957 (complaint_internal): Update.
959 2018-05-23 Tom Tromey <tom@tromey.com>
961 * complaints.c (vcomplaint): Remove.
962 (complaint_internal) Merge in contents of vcomplaint.
964 2018-05-23 Tom Tromey <tom@tromey.com>
966 * complaints.c (struct complaints) <explanation>: Remove.
967 (symfile_explanations): Remove.
968 (symfile_complaint_book): Update.
969 (vcomplaint): Update.
970 (struct explanation): Remove.
972 2018-05-23 Tom Tromey <tom@tromey.com>
974 * complaints.c (symfile_complaints): Remove.
975 (complaint_internal): Remove "complaints" parameter.
976 (clear_complaints, vcomplaint): Remove "c" parameter.
977 (get_complaints): Remove.
978 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
979 (dwarf2_debug_line_missing_file_complaint)
980 (dwarf2_debug_line_missing_end_sequence_complaint)
981 (dwarf2_complex_location_expr_complaint)
982 (dwarf2_const_value_length_mismatch_complaint)
983 (dwarf2_section_buffer_overflow_complaint)
984 (dwarf2_macro_malformed_definition_complaint)
985 (dwarf2_invalid_attrib_class_complaint)
986 (create_addrmap_from_index, dw2_symtab_iter_next)
987 (dw2_expand_marked_cus)
988 (dw2_debug_names_iterator::find_vec_in_debug_names)
989 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
990 (create_debug_type_hash_table, init_cutu_and_read_dies)
991 (partial_die_parent_scope, add_partial_enumeration)
992 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
993 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
994 (read_import_statement, read_file_scope, create_dwo_cu_reader)
995 (create_cus_hash_table, create_dwp_hash_table)
996 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
997 (dwarf2_rnglists_process, dwarf2_ranges_process)
998 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
999 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1000 (handle_struct_member_die, process_structure_scope)
1001 (read_array_type, read_common_block, read_module_type)
1002 (read_tag_pointer_type, read_typedef, read_base_type)
1003 (read_subrange_type, load_partial_dies, partial_die_info::read)
1004 (partial_die_info::read, partial_die_info::read)
1005 (partial_die_info::read, read_checked_initial_length_and_offset)
1006 (dwarf2_string_attr, read_formatted_entries)
1007 (dwarf_decode_line_header)
1008 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1009 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1010 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1011 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1012 (get_signatured_type, get_DW_AT_signature_type)
1013 (decode_locdesc, file_file_name, consume_improper_spaces)
1014 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1015 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1016 (dwarf2_symbol_mark_computed, set_die_type)
1017 (read_attribute_value): Update.
1018 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1020 * dbxread.c (unknown_symtype_complaint)
1021 (lbrac_mismatch_complaint, repeated_header_complaint)
1022 (set_namestring, function_outside_compilation_unit_complaint)
1023 (read_dbx_symtab, process_one_symbol): Update.
1024 * gdbtypes.c (stub_noname_complaint): Update.
1025 * windows-nat.c (handle_unload_dll): Update.
1026 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1027 (decode_base_type): Update.
1028 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1029 (eb_complaint, record_include_begin, record_include_end)
1030 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1031 (process_xcoff_symbol, read_symbol)
1032 (function_outside_compilation_unit_complaint)
1033 (scan_xcoff_symtab): Update.
1034 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1035 * buildsym.c (finish_block_internal, make_blockvector)
1036 (end_symtab_get_static_block, augment_type_symtab): Update.
1037 * dtrace-probe.c (dtrace_process_dof)
1038 (dtrace_static_probe_ops::get_probes): Update.
1039 * complaints.h (struct complaint): Don't declare.
1040 (symfile_complaints): Remove.
1041 (complaint_internal): Remove "complaints" parameter.
1042 (complaint): Likewise.
1043 (clear_complaints): Likewise.
1044 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1045 (reread_symbols): Update.
1046 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1047 (dwarf2_frame_cache, decode_frame_entry): Update.
1048 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1049 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1050 (info_selectors_command): Update.
1051 * macrotab.c (macro_include, check_for_redefinition)
1052 (macro_undef): Update.
1053 * objfiles.c (filter_overlapping_sections): Update.
1054 * stabsread.c (invalid_cpp_abbrev_complaint)
1055 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1056 (define_symbol, error_type, read_type, rs6000_builtin_type)
1057 (stabs_method_name_from_physname, read_member_functions)
1058 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1059 (attach_fields_to_type, complain_about_struct_wipeout)
1060 (read_range_type, read_args, common_block_start)
1061 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1063 * mdebugread.c (index_complaint, unknown_ext_complaint)
1064 (basic_type_complaint, bad_tag_guess_complaint)
1065 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1066 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1067 (parse_procedure, parse_lines)
1068 (function_outside_compilation_unit_complaint)
1069 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1070 (bad_tag_guess_complaint, reg_value_complaint): Update.
1071 * cp-support.c (demangled_name_complaint): Update.
1072 * macroscope.c (sal_macro_scope): Update.
1073 * dwarf-index-write.c (class debug_names): Update.
1075 2018-05-23 Tom Tromey <tom@tromey.com>
1077 * complaints.c (clear_complaints): Remove "noisy" parameter.
1078 * complaints.h (clear_complaints): Update.
1079 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1080 (reread_symbols): Update.
1082 2018-05-23 Tom Tromey <tom@tromey.com>
1084 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1086 (vcomplaint, clear_complaints): Update.
1087 (symfile_explanations): Remove some messages.
1089 2018-05-23 Tom Tromey <tom@tromey.com>
1091 * complaints.c (internal_complaint): Remove.
1092 * complaints.h (internal_complaint): Remove.
1094 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1096 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1098 2018-05-22 Pedro Alves <palves@redhat.com>
1100 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1101 (remote_fileio_badfd, remote_fileio_return_errno)
1102 (remote_fileio_return_success, remote_fileio_func_open)
1103 (remote_fileio_func_open, remote_fileio_func_close)
1104 (remote_fileio_func_read, remote_fileio_func_write)
1105 (remote_fileio_func_lseek, remote_fileio_func_rename)
1106 (remote_fileio_func_unlink, remote_fileio_func_stat)
1107 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1108 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1109 remote_target parameter.
1110 (remote_fio_func_map) <func>: Add remote_target parameter.
1111 (do_remote_fileio_request, remote_fileio_request):
1112 * remote-fileio.h (remote_fileio_request):
1113 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1114 remote_target parameter.
1115 (remote_notif_process, handle_notification): Adjust to pass down
1117 (remote_notif_state_allocate): Add remote_target parameter. Save
1119 * remote-notif.h (struct remote_target): Forward declare.
1120 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1121 remote_target parameter.
1122 (struct remote_notif_state) <remote>: New field.
1123 (remote_notif_ack, remote_notif_parse): Add remote_target
1125 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1126 remote_target parameter.
1127 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1128 (threads_listing_context, rmt_thread_action, protocol_feature)
1129 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1130 (packet_result, struct threads_listing_context, remote_state):
1131 Move definitions and declarations higher up.
1132 (remote_target) <~remote_target>: Declare.
1133 (remote_download_command_source, remote_file_put, remote_file_get)
1134 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1135 (remote_hostio_pread_vFile, remote_hostio_send_command)
1136 (remote_hostio_set_filesystem, remote_hostio_open)
1137 (remote_hostio_close, remote_hostio_unlink, remote_state)
1138 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1139 (get_memory_write_packet_size, get_memory_read_packet_size)
1140 (append_pending_thread_resumptions, remote_detach_1)
1141 (append_resumption, remote_resume_with_vcont)
1142 (add_current_inferior_and_thread, wait_ns, wait_as)
1143 (process_stop_reply, remote_notice_new_inferior)
1144 (process_initial_stop_replies, remote_add_thread)
1145 (btrace_sync_conf, remote_btrace_maybe_reopen)
1146 (remove_new_fork_children, kill_new_fork_children)
1147 (discard_pending_stop_replies, stop_reply_queue_length)
1148 (check_pending_events_prevent_wildcard_vcont)
1149 (discard_pending_stop_replies_in_queue, stop_reply)
1150 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1151 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1152 (remote_interrupt_as, remote_interrupt_ns)
1153 (remote_get_noisy_reply, remote_query_attached)
1154 (remote_add_inferior, remote_current_thread, get_current_thread)
1155 (set_thread, set_general_thread, set_continue_thread)
1156 (set_general_process, write_ptid)
1157 (remote_unpack_thread_info_response, remote_get_threadinfo)
1158 (parse_threadlist_response, remote_get_threadlist)
1159 (remote_threadlist_iterator, remote_get_threads_with_ql)
1160 (remote_get_threads_with_qxfer)
1161 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
1162 (get_offsets, remote_check_symbols, remote_supported_packet)
1163 (remote_query_supported, remote_packet_size)
1164 (remote_serial_quit_handler, remote_detach_pid)
1165 (remote_vcont_probe, remote_resume_with_hc)
1166 (send_interrupt_sequence, interrupt_query)
1167 (remote_notif_get_pending_events, fetch_register_using_p)
1168 (send_g_packet, process_g_packet, fetch_registers_using_g)
1169 (store_register_using_P, store_registers_using_G)
1170 (set_remote_traceframe, check_binary_download)
1171 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
1172 (remote_xfer_live_readonly_partial, remote_read_bytes)
1173 (remote_send_printf, remote_flash_write, readchar)
1174 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
1175 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
1176 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
1177 (extended_remote_disable_randomization, extended_remote_run)
1178 (send_environment_packet, extended_remote_environment_support)
1179 (extended_remote_set_inferior_cwd, remote_write_qxfer)
1180 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
1181 (packet_command): Now methods of ...
1182 (remote_target): ... this class.
1183 (m_remote_state) <remote_target>: New field.
1184 (struct remote_state) <stop_reply_queue,
1185 remote_async_inferior_event_token, wait_forever_enabled_p>: New
1187 (remote_state::remote_state): Allocate stop_reply_queue.
1188 (remote_state): Delete global.
1189 (get_remote_state_raw): Delete.
1190 (remote_target::get_remote_state): Allocate m_remote_state on
1192 (get_current_remote_target): New.
1193 (remote_ops, extended_remote_ops): Delete.
1194 (wait_forever_enabled_p, remote_async_inferior_event_token):
1195 Delete, moved to struct remote_state.
1196 (remote_target::close): Delete self. Destruction bits split to
1198 (remote_target::~remote_target): ... this.
1199 (show_memory_packet_size): Adjust to use
1200 get_current_remote_target.
1201 (struct protocol_feature) <func>: Add remote_target parameter.
1202 All callers adjusted.
1203 (curr_quit_handler_target): New.
1204 (remote_serial_quit_handler): Reimplement.
1205 (remote_target::open_1): Adjust to use get_current_remote_target.
1206 Heap-allocate remote_target/extended_remote_target instances.
1207 (vcont_builder::vcont_builder): Add remote_target parameter, and
1208 save it in m_remote. All callers adjusted.
1209 (vcont_builder::m_remote): New field.
1210 (vcont_builder::restart, vcont_builder::flush)
1211 (vcont_builder::push_action): Use it.
1212 (remote_target::commit_resume): Use it.
1213 (struct queue_iter_param) <remote>: New field.
1214 (remote_target::remove_new_fork_children): Fill in 'remote' field.
1215 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1216 (check_pending_event_prevents_wildcard_vcont_callback)
1217 (remote_target::check_pending_events_prevent_wildcard_vcont)
1218 (remote_target::discard_pending_stop_replies)
1219 (remote_target::discard_pending_stop_replies_in_queue)
1220 (remote_target::remote_notif_remove_queued_reply): Fill in
1222 (remote_notif_get_pending_events): New.
1223 (remote_target::readchar, remote_target::remote_serial_write):
1224 Save/restore curr_quit_handler_target.
1226 (kill_new_fork_children): Fill in 'remote' field.
1227 (packet_command): Use get_current_remote_target, defer to
1228 remote_target method of same name.
1229 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1230 parameter, and save it in m_remote. All callers adjusted.
1231 (scoped_remote_fd::release): Use m_remote.
1232 (scoped_remote_fd::m_remote): New field.
1233 (remote_file_put, remote_file_get, remote_file_delete): Use
1234 get_current_remote_target, defer to remote_target method of same
1236 (remote_btrace_reset): Add remote_state paremeter. Update all
1238 (remote_async_inferior_event_handler). Pass down 'data'.
1239 (remote_new_objfile): Use get_current_remote_target.
1240 (remote_target::vcont_r_supported): New.
1241 (set_range_stepping): Use get_current_remote_target and
1242 remote_target::vcont_r_supported.
1243 (_initialize_remote): Don't allocate 'remote_state' and
1244 'stop_reply_queue' globals.
1245 * remote.h (struct remote_target): Forward declare.
1246 (getpkt, putpkt, remote_notif_get_pending_events): Add
1247 'remote_target' parameter.
1249 2018-05-22 Pedro Alves <palves@redhat.com>
1251 * remote.c (vcont_builder): Now a class. Make all data members
1253 (vcont_builder) <vcont_builder, restart, flush, push_action>:
1255 (vcont_builder_restart): Rename to ...
1256 (vcont_builder::restart): ... this.
1257 (vcont_builder_flush): Rename to ...
1258 (vcont_builder::flush): ... this.
1259 (vcont_builder_push_action): Rename to ...
1260 (vcont_builder::push_action): ... this.
1261 (remote_target::commit_resume): Adjust.
1263 2018-05-22 Pedro Alves <palves@redhat.com>
1265 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1266 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1267 (get_fixed_memory_packet_size): New.
1268 (get_memory_packet_size): Use it.
1269 (set_memory_packet_size): Don't override the config size with
1270 DEFAULT_MAX_MEMORY_PACKET_SIZE.
1271 (show_memory_packet_size): Use get_fixed_memory_packet_size.
1272 Don't refer to get_memory_packet_size if not connected to a remote
1273 target. Show "(default)" if configured size is 0.
1275 2018-05-22 Pedro Alves <palves@redhat.com>
1277 * remote.c (remote_target::mourn_inferior): Move
1278 discard_pending_stop_replies call here from ...
1279 (_initialize_remote): ... here.
1281 2018-05-22 Pedro Alves <palves@redhat.com>
1283 * remote.c (compare_section_command): Remove set_general_process
1286 2018-05-22 Pedro Alves <palves@redhat.com>
1288 * remote.c (struct packet_reg, struct remote_arch_state):
1289 Move higher up in the file.
1290 (remote_state) <m_arch_states>: Store remote_arch_state values
1291 instead of remote_arch_state pointers.
1292 (remote_state::get_remote_arch_state): Adjust.
1294 2018-05-22 Pedro Alves <palves@redhat.com>
1296 * remote.c: Include <unordered_map>.
1297 (remote_state): Now a class.
1298 (remote_state) <get_remote_arch_state>: Declare method.
1299 <get_remote_arch_state>: New field.
1300 (remote_arch_state) <remote_arch_state>: Declare ctor.
1301 <regs>: Now a unique_ptr.
1302 (remote_gdbarch_data_handle): Delete.
1303 (get_remote_arch_state): Delete.
1304 (remote_state::get_remote_arch_state): New.
1305 (get_remote_state): Adjust to call remote_state's
1306 get_remote_arch_state method.
1307 (init_remote_state): Delete, bits factored out to ...
1308 (remote_arch_state::remote_arch_state): ... this new method.
1309 (get_remote_packet_size, get_memory_packet_size)
1310 (process_g_packet, remote_target::fetch_registers)
1311 (remote_target::prepare_to_store, store_registers_using_G)
1312 (remote_target::store_registers, remote_target::get_trace_status):
1313 Adjust to call remote_state's method.
1314 (_initialize_remote): Remove reference to
1315 remote_gdbarch_data_handle.
1317 2018-05-22 Pedro Alves <palves@redhat.com>
1319 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
1320 pread>: New method declarations.
1321 (remote_target::open_1): Adjust.
1322 (readahead_cache_invalidate): Rename to ...
1323 (readahead_cache::invalidate): ... this, and adjust to be a class
1325 (readahead_cache_invalidate_fd): Rename to ...
1326 (readahead_cache::invalidate_fd): ... this, and adjust to be a
1328 (remote_hostio_pwrite): Adjust.
1329 (remote_hostio_pread_from_cache): Rename to ...
1330 (readahead_cache::pread): ... this, and adjust to be a class
1332 (remote_hostio_close): Adjust.
1334 2018-05-22 Pedro Alves <palves@redhat.com>
1336 * remote.c (remote_hostio_close_cleanup): Delete.
1337 (class scoped_remote_fd): New.
1338 (remote_file_put, remote_file_get): Use it.
1340 2018-05-22 Pedro Alves <palves@redhat.com>
1342 (struct vCont_action_support): Use bool and initialize all fields.
1343 (struct readahead_cache): Initialize all fields.
1344 (remote_state): Use bool and initialize all fields.
1345 (remote_state::remote_state, remote_state::~remote_state): New.
1346 (new_remote_state): Delete.
1347 (_initialize_remote): Use new to allocate remote_state.
1349 2018-05-22 Pedro Alves <palves@redhat.com>
1353 * c-exp.y: Include "c-support.h".
1354 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
1355 of tolower. Use c_ident_is_alpha to scan names.
1356 * c-lang.c: Include "c-support.h".
1357 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1358 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1359 * c-support.h: New file, with bits factored out from ...
1360 * cp-name-parser.y: ... this file.
1361 Include "c-support.h".
1362 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1363 c-support.h and renamed.
1364 (symbol_end, yylex): Adjust.
1366 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1368 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1369 parameter type to CORE_ADDR.
1370 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1371 parameter type in declaration to CORE_ADDR.
1372 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1373 target_auxv_search to get AT_HWCAP and use the result to get the
1375 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1376 to CORE_ADDR. Remove the cast of the return value to unsigned
1377 long. Fix error predicate of target_auxv_search.
1378 (ppc_linux_nat_target::read_description): Change the type of the
1379 hwcap variable to CORE_ADDR.
1381 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1383 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1384 if the size of fpscr is larger than 32 bits.
1386 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1388 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1389 (ppc32_linux_vsxregmap): New global.
1390 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1391 regcache_supply_regset, and regcache_collect_regset.
1392 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1393 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1394 (fetch_vsx_register, store_vsx_register): Remove.
1395 (fetch_vsx_registers): Add regno parameter. Get regset using
1396 ppc_linux_vsxregset. Use regset to supply registers.
1397 (store_vsx_registers): Add regno parameter. Get regset using
1398 ppc_linux_vsxregset. Use regset to collect registers.
1399 (fetch_register): Call fetch_vsx_registers instead of
1401 (store_register): Call store_vsx_registers instead of
1403 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1404 new regno parameter.
1405 (store_ppc_registers): Call store_vsx_registers with -1 for the
1406 new regno parameter.
1407 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1408 (ppc_collect_vsxregset): Remove.
1410 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1412 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1414 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1415 for vector register offset fields.
1416 (ppc64_fbsd_reg_offsets): Likewise.
1417 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1418 to vector register offset fields.
1419 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1420 to vector register offset fields.
1421 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1422 vector register offset fields.
1423 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1424 initializers for vector register offset fields.
1425 (rs6000_aix64_reg_offsets): Likewise.
1426 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1427 (ppc_supply_vrregset): Remove.
1428 (ppc_collect_vrregset): Remove.
1429 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1430 (ppc_linux_vrregset) : New function.
1431 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1432 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1433 (ppc32_linux_vrregset): Remove.
1434 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1435 and use result instead of ppc32_linux_vrregset.
1436 (ppc32_linux_reg_offsets): Remove initializers for vector register
1438 (ppc64_linux_reg_offsets): Likewise.
1439 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1440 * ppc-linux-nat.c: Include regset.h.
1441 (gdb_vrregset_t): Adjust comment to account for little-endian
1443 (supply_vrregset, fill_vrregset): Remove.
1444 (fetch_altivec_register, store_altivec_register): Remove.
1445 (fetch_altivec_registers): Add regno parameter. Get regset using
1446 ppc_linux_vrregset. Use regset to supply registers.
1447 (store_altivec_registers): Add regno parameter. Get regset using
1448 ppc_linux_vrregset. Use regset to collect registers.
1449 (fetch_register): Call fetch_altivec_registers instead of
1450 fetch_altivec_register.
1451 (store_register): Call store_altivec_registers instead of
1452 store_altivec_register.
1453 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1454 the new regno parameter.
1455 (store_ppc_registers): Call store_altivec_registers with -1 for
1456 the new regno parameter.
1458 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1460 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1461 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1462 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1463 (gdb_vrregset_t): Change array type size to
1464 PPC_LINUX_SIZEOF_VRREGSET.
1465 (gdb_vsxregset_t): Change array type size to
1466 PPC_LINUX_SIZEOF_VSXREGSET.
1467 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1468 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1469 PPC_LINUX_SIZEOF_VSXREGSET.
1471 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1473 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1474 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1476 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1477 ppc_linux_target_wordsize with tid.
1478 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1480 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1481 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1482 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1483 tid parameter. Remove static specifier.
1484 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1485 (ppc_linux_target_wordsize): New declaration.
1487 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1489 * arch/ppc-linux-common.c: New file.
1490 * arch/ppc-linux-common.h: New file.
1491 * arch/ppc-linux-tdesc.h: New file.
1492 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1493 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1494 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1495 arch/ppc-linux-tdesc.h.
1496 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1497 arch/ppc-linux-tdesc.h.
1498 (ppc_linux_nat_target::read_description): Remove target
1499 description matching code. Fill a ppc_linux_features struct and
1500 call ppc_linux_match_description with it. Move comment about ISA
1501 2.05 to ppc-linux-common.c.
1502 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1503 arch/ppc-linux-tdesc.h.
1504 (ppc_linux_core_read_description): Remove target description
1505 matching code. Fill a ppc_linux_features struct and call
1506 ppc_linux_match_description with it.
1507 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1508 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1509 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1510 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1511 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1512 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1513 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1514 (tdesc_powerpc_e500l): Remove.
1516 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1518 * ada-lang.c (catch_assert_command): Pass empty string instead
1519 of NULL for excep_string argument.
1521 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1523 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1524 the width of the requested register exceeds the width of the
1527 2018-05-21 Tom Tromey <tom@tromey.com>
1529 * printcmd.c (output_command): Remove.
1530 (output_command_const): Rename to output_command.
1531 * valprint.h (output_command): Rename from output_command_const.
1532 * tracepoint.c (trace_dump_actions): Call output_command.
1534 2018-05-21 Tom Tromey <tom@tromey.com>
1536 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1537 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1538 * ada-lang.h (create_ada_exception_catchpoint): Update.
1539 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1541 (create_excep_cond_exprs, ~ada_catchpoint)
1542 (should_stop_exception, print_one_exception)
1543 (print_mention_exception, print_recreate_exception): Update.
1544 (ada_get_next_arg): Remove.
1545 (catch_ada_exception_command_split): Use std::string. Change type
1546 of "excep_string", "cond_string".
1547 (catch_ada_exception_command): Update.
1548 (create_ada_exception_catchpoint): Change type of excep_string.
1549 (ada_exception_sal): Remove excep_string parameter.
1550 (~ada_catchpoint): Remove.
1552 2018-05-21 Tom Tromey <tom@tromey.com>
1554 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1557 2018-05-21 Tom Tromey <tom@tromey.com>
1559 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1560 Return unique_xmalloc_ptr.
1561 (print_it_exception): Update.
1563 2018-05-21 Tom Tromey <tom@tromey.com>
1565 * tracepoint.c (trace_dump_actions): Use std::string.
1567 2018-05-21 Tom Tromey <tom@tromey.com>
1569 * symfile.c (reread_symbols): Use std::string for original_name.
1571 2018-05-21 Tom Tromey <tom@tromey.com>
1573 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1574 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1577 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1579 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1581 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1582 * objfiles.c (get_objfile_bfd_data): Allocate
1583 objfile_per_bfd_storage with obstack_new when allocating on
1586 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1588 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1590 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1591 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1592 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1593 (add_pending): Likewise.
1594 (parse_symbol): Likewise.
1595 (parse_partial_symbols): Likewise.
1596 (psymtab_to_symtab_1): Likewise.
1597 (new_psymtab): Likewise.
1598 (elfmdebug_build_psymtabs): Likewise.
1599 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1600 * objfiles.c (get_objfile_bfd_data): Likewise.
1601 (objfile_register_static_link): Likewise.
1602 * psymtab.c (allocate_psymtab): Likewise.
1603 * stabsread.c (read_member_functions): Likewise.
1604 * xcoffread.c (xcoff_end_psymtab): Likewise.
1606 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1608 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1609 compiler supports std::is_trivially_constructible.
1610 * common/poison.h: Include obstack.h.
1611 (IsMallocable): Define to is_trivially_constructible if the
1612 compiler supports it, define to true_type otherwise.
1616 (XOBNEWVEC): Redefine.
1617 * gdb_obstack.h (obstack_zalloc): New.
1618 (OBSTACK_ZALLOC): Redefine.
1619 (obstack_calloc): New.
1620 (OBSTACK_CALLOC): Redefine.
1622 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1623 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1625 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1626 obstack_calloc/obstack_zalloc.
1627 (gdbarch_obstack_zalloc): Remove.
1628 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1630 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1632 * stack.c (backtrace_command_1): Remove useless variable int i.
1634 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1636 * stack.c (print_frame_info): Fix comment.
1638 2018-05-18 Tom Tromey <tom@tromey.com>
1640 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1641 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1642 (~dwarf2_per_objfile): Update
1643 (dwarf2_get_dwz_file): Use new.
1644 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1647 2018-05-18 Tom Tromey <tom@tromey.com>
1649 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1651 * dwarf2read.c (struct dwp_file): Add constructor and
1653 (open_and_init_dwp_file): Return a unique_ptr.
1654 (dwarf2_per_objfile, create_dwp_hash_table)
1655 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1656 (lookup_dwo_unit_in_dwp): Update.
1657 (open_and_init_dwp_file, get_dwp_file): Update.
1659 2018-05-18 Tom Tromey <tom@tromey.com>
1661 * dwarf2read.c (dwarf2_per_objfile): Update.
1662 (struct mapped_index): Add initializers.
1663 (dwarf2_read_index): Use new.
1664 (dw2_symtab_iter_init): Update.
1665 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1668 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1670 * dwarf2read.c (mapped_index) <total_size>: Remove.
1672 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1674 * unittests/format_pieces-selftests.c (test_format_specifier):
1677 2018-05-18 Tom Tromey <tom@tromey.com>
1679 * c-typeprint.c (maybe_print_hole): New function.
1680 (c_print_type_struct_field_offset): Update.
1681 (c_type_print_base_struct_union): Call maybe_print_hole.
1683 2018-05-17 Keith Seitz <keiths@redhat.com>
1685 * breakpoint.c (build_bpstat_chain): New function, moved from
1687 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1688 If no stop chain is passed, call build_bpstat_chain to build it.
1689 * breakpoint.h (build_bpstat_chain): Declare.
1690 (bpstat_stop_status): Move documentation here from breakpoint.c.
1691 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1692 build the stop chain and pass it to skip_inline_frames.
1693 Pass this stop chain to bpstat_stop_status.
1694 * inline-frame.c: Include breakpoint.h.
1695 (stopped_by_user_bp_inline_frame): New function.
1696 (skip_inline_frames): Add parameter `stop_chain'.
1697 Move documention to inline-frame.h.
1698 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1699 whether the frame should be elided.
1700 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1701 Add moved documentation and update for new parameter.
1703 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1706 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1707 unittests/format_pieces-selftests.c.
1708 * common/format.h (format_piece) <operator==>: New.
1709 (format_pieces) <operator[]>: Remove.
1710 * common/format.c (format_pieces::format_pieces): Handle \e.
1711 * unittests/format_pieces-selftests.c: New.
1713 2018-05-17 Tom Tromey <tom@tromey.com>
1716 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1717 (dw2_instantiate_symtab): Add skip_partial parameter.
1718 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1719 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1720 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1721 (dw2_expand_symtabs_matching_one)
1722 (dw2_find_pc_sect_compunit_symtab)
1723 (dw2_debug_names_lookup_symbol)
1724 (dw2_debug_names_expand_symtabs_for_function): Update.
1725 (init_cutu_and_read_dies): Add skip_partial parameter.
1726 (process_psymtab_comp_unit, build_type_psymtabs_1)
1727 (process_skeletonless_type_unit, load_partial_comp_unit)
1728 (psymtab_to_symtab_1): Update.
1729 (load_full_comp_unit): Add skip_partial parameter.
1730 (process_imported_unit_die, dwarf2_read_addr_index)
1731 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1732 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1733 (read_signatured_type): Update.
1735 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1737 * value.c (release_value): Remove unused variable.
1738 (record_latest_value): Likewise.
1739 (access_value_history): Likewise.
1740 (preserve_values): Likewise.
1742 2018-05-17 Tom Tromey <tom@tromey.com>
1744 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1747 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1750 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1751 Also handle registers whose width is not a multiple of
1753 (linux_nat_trad_target::store_register): Likewise.
1755 2018-05-16 Tom Tromey <tom@tromey.com>
1757 * gdbcore.h (core_bfd): Redefine.
1758 * corelow.c (core_target::close): Update.
1759 (core_target_open): Update.
1760 * progspace.h (struct program_space) <cbfd>: Now a
1763 2018-05-16 Tom Tromey <tom@tromey.com>
1766 * symfile-add-flags.h (enum symfile_add_flags)
1767 <SYMFILE_NOT_FILENAME>: New constant.
1768 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1769 objfile name from BFD.
1770 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1771 * minidebug.c (find_separate_debug_file_in_section): Put
1772 ".gnu_debugdata" into BFD's file name.
1774 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1776 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1779 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1782 * aarch64-tdep.c (aarch64_analyze_prologue,
1783 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1784 Indicate not interested in errors.
1786 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1788 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1789 Supply the MIPS_ZERO_REGNUM register.
1791 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1793 * mips-tdep.c (mask_address_var): Make variable static.
1795 2018-05-14 Tom Tromey <tom@tromey.com>
1797 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1799 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1801 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1802 FXSAVE_ADDR for the mxcsr register.
1804 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1806 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1808 2018-05-11 Pedro Alves <palves@redhat.com>
1810 * corelow.c (core_target) <core_target>: No longer inline.
1811 Initialize m_core_gdbarch, m_core_vec and build the section table
1813 <~core_target>: New.
1814 <core_gdbarch, get_core_register_section>: New methods.
1815 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1816 factored out from ...
1817 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1819 (sniff_core_bfd): Add gdbarch parameter.
1820 (core_close): Delete, merged into ...
1821 (core_target::close): ... here. Delete self.
1822 (core_close_cleanup): Delete.
1823 (core_target_open): Allocate a core_target on the heap. Use a
1824 unique_ptr instead of a cleanup. Bits moved into the core_target
1825 ctor. Adjust to use core_target methods instead of globals.
1826 (get_core_register_section): Rename to ...
1827 (core_target::get_core_register_section): ... this and adjust.
1828 (struct get_core_registers_cb_data): New.
1829 (get_core_registers_cb): Use it. Use bool.
1830 (core_target::fetch_registers, core_target::files_info)
1831 (core_target::xfer_partial, core_target::read_description)
1832 (core_target::pid_to, core_target::thread_name): Adjust to
1833 reference class fields instead of globals.
1834 * target.h (struct target_ops_deleter, target_ops_up): New.
1836 2018-05-11 Pedro Alves <palves@redhat.com>
1838 * corefile.c (core_file_command): Move to corelow.c.
1839 * corelow.c (the_core_target): Delete.
1840 (core_file_command): Moved from corefile.c. Check exec_bfd
1841 instead of the_core_target. Use target_detach instead of calling
1842 into the_core_target directly.
1843 (maybe_say_no_core_file_now): New.
1844 (core_target::detach): Use it.
1845 (_initialize_corelow): Remove references to the_core_target.
1846 * gdbcore.h (the_core_target): Delete.
1848 2018-05-11 Tom Tromey <tromey@redhat.com>
1849 Pedro Alves <palves@redhat.com>
1851 * corefile.c (core_bfd): Remove.
1852 * gdbcore.h (core_bfd): Now a macro.
1853 * progspace.h (struct program_space) <cbfd>: New field.
1855 2018-05-11 Tom Tromey <tom@tromey.com>
1857 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1860 2018-05-10 Tom Tromey <tom@tromey.com>
1862 * configure: Rebuild.
1863 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1865 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1868 * regformats/regdat.sh: Adjust script, following the addition
1869 of the new expedite_regs parameter to init_target_desc.
1871 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1874 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1875 set_gdbarch_significant_addr_bit.
1876 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1877 set_gdbarch_significant_addr_bit.
1878 * utils.c (address_significant): Update to sign extend addr.
1880 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1882 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1883 (xtensa_linux_init_abi): Limit tdep->num_regs by
1884 tdep->num_nopriv_regs.
1885 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1886 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1889 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1891 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1893 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1895 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1896 (I387_MXCSR_INIT_VAL): New constant.
1897 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1898 buffer if it was supplied by the inferior.
1899 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1900 (i387_xsave_get_clear_bv): New function.
1901 (i387_supply_xsave): Only read x87 control registers from the
1902 xsave buffer if the feature is enabled, and the state will have
1903 been written, otherwise, provide a suitable default.
1904 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1905 including x87 control registers. Update control registers if they
1906 have changed from the default value, and mark features as enabled
1908 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1910 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1912 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1914 2018-05-07 Tom Tromey <tom@tromey.com>
1916 * configure: Rebuild.
1917 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1919 2018-05-07 Tom Tromey <tom@tromey.com>
1922 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1923 bit. Use correct value for VDIV.
1925 2018-05-04 Tom Tromey <tom@tromey.com>
1927 * configure: Rebuild.
1928 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1930 2018-05-04 Tom Tromey <tom@tromey.com>
1932 * linux-record.c (record_linux_system_call) <case
1933 RECORD_SYS_RECVFROM>: Add "break".
1935 2018-05-04 Tom Tromey <tom@tromey.com>
1937 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1938 Add missing "break".
1939 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1940 Add missing "break".
1942 2018-05-04 Tom Tromey <tom@tromey.com>
1944 * rs6000-tdep.c (ppc_process_record_op4)
1945 (ppc_process_record_op63): Add fall-through comment.
1947 2018-05-04 Tom Tromey <tom@tromey.com>
1949 * i386-tdep.c (i386_process_record): Add fall-through comment.
1951 2018-05-04 Tom Tromey <tom@tromey.com>
1953 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1956 2018-05-04 Tom Tromey <tom@tromey.com>
1958 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1959 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1960 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1962 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1964 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1967 2018-05-04 Tom Tromey <tom@tromey.com>
1969 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1971 2018-05-04 Tom Tromey <tom@tromey.com>
1973 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1974 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1975 * symfile.c (section_is_mapped): Fix fall-through comment.
1976 * stabsread.c (define_symbol, read_member_functions): Fix
1977 fall-through comment.
1978 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1980 * remote.c (remote_wait_as): Fix fall-through comment.
1981 * p-exp.y (yylex): Fix fall-through comment.
1982 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1984 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1985 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1986 * jv-exp.y (yylex): Fix fall-through comment.
1987 * go-exp.y (lex_one_token): Fix fall-through comment.
1988 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1989 fall-through comment.
1990 * f-exp.y (yylex): Fix fall-through comment.
1991 * dwarf2read.c (process_die): Fix fall-through comments.
1992 * dbxread.c (process_one_symbol): Fix fall-through comment.
1993 * d-exp.y (lex_one_token): Fix fall-through comment.
1994 * cp-name-parser.y (yylex): Fix fall-through comment.
1995 * coffread.c (coff_symtab_read): Fix fall-through comment.
1996 * c-exp.y (lex_one_token): Fix fall-through comment.
1997 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1999 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2002 2018-05-04 Tom Tromey <tom@tromey.com>
2005 * NEWS: Mention gdb.execute change.
2006 * gdbcmd.h (execute_control_command): Don't declare.
2007 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2008 execute_control_commands, execute_control_commands_to_string.
2009 * cli/cli-script.h (execute_control_commands)
2010 (execute_control_commands_to_string): Declare.
2011 (execute_control_command): Add from_tty parameter.
2012 * cli/cli-script.c (execute_control_commands)
2013 (execute_control_commands_to_string): New functions.
2014 (execute_user_command): Use execute_control_commands.
2015 (execute_control_command_1): Add "from_tty" parameter. Update.
2016 (execute_control_command): Likewise.
2018 2018-05-04 Tom Tromey <tom@tromey.com>
2021 * NEWS: Mention that breakpoint commands are writable.
2022 * python/py-breakpoint.c (bppy_set_commands): New function.
2023 (breakpoint_object_getset) <"commands">: Use it.
2025 2018-05-04 Tom Tromey <tom@tromey.com>
2027 * tracepoint.c (actions_command): Update.
2028 * mi/mi-cmd-break.c (mi_command_line_array)
2029 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2030 (mi_read_next_line): Remove.
2031 (mi_cmd_break_commands): Update.
2032 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2034 * cli/cli-script.c (get_command_line): Update.
2035 (process_next_line): Use function_view. Constify.
2036 (recurse_read_control_structure, read_command_lines)
2037 (read_command_lines_1): Change argument types to function_view.
2038 (do_define_command, document_command): Update.
2039 * breakpoint.h (check_tracepoint_command): Don't declare.
2040 * breakpoint.c (check_tracepoint_command): Remove.
2041 (commands_command_1, create_tracepoint_from_upload): Update.
2043 2018-05-04 Tom Tromey <tom@tromey.com>
2046 * cli/cli-script.h (enum command_control_type) <define_control>:
2048 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2049 (build_command_line, execute_control_command_1)
2050 (process_next_line): Likewise.
2051 (do_define_command): New function, extracted from define_command.
2052 (define_command): Use it.
2054 2018-05-04 Tom Tromey <tom@tromey.com>
2056 * tracepoint.c (actions_command): Update.
2057 * cli/cli-script.h (read_command_lines): Update.
2058 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2059 (MAX_TMPBUF): Remove define.
2060 (define_command): Use string_printf.
2061 (document_command): Likewise.
2062 * breakpoint.c (commands_command_1): Update.
2064 2018-05-04 Tom Tromey <tom@tromey.com>
2066 * top.c (execute_command): Update.
2067 * cli/cli-script.h (print_command_lines): Now varargs.
2068 * cli/cli-script.c (print_command_lines): Now varargs.
2069 (execute_control_command_1) <case while_control, case if_control>:
2072 2018-05-04 Tom Tromey <tom@tromey.com>
2074 * tracepoint.c (all_tracepoint_actions): Rename from
2075 all_tracepoint_actions_and_cleanup. Change return type.
2076 (actions_command, encode_actions_1, encode_actions)
2077 (trace_dump_actions, tdump_command): Update.
2078 * remote.c (remote_download_command_source): Update.
2079 * python/python.c (gdbpy_eval_from_control_command)
2080 (python_command, python_interactive_command): Update.
2081 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2082 * guile/guile.c (guile_command)
2083 (gdbscm_eval_from_control_command, guile_command): Update.
2084 * compile/compile.c (compile_code_command)
2085 (compile_print_command, compile_to_object): Update.
2086 * cli/cli-script.h (struct command_lines_deleter): New.
2087 (counted_command_line): New typedef.
2088 (struct command_line): Add constructor, destructor.
2089 <body_list>: Remove.
2090 <body_list_0, body_list_1>: New members.
2091 (command_line_up): Remove typedef.
2092 (read_command_lines, read_command_lines_1, get_command_line):
2094 (copy_command_lines): Don't declare.
2095 * cli/cli-script.c (build_command_line): Use "new".
2096 (get_command_line): Return counted_command_line.
2097 (print_command_lines, execute_user_command)
2098 (execute_control_command_1, while_command, if_command): Update.
2099 (realloc_body_list): Remove.
2100 (process_next_line, recurse_read_control_structure): Update.
2101 (read_command_lines, read_command_lines_1): Return counted_command_line.
2102 (free_command_lines): Use "delete".
2103 (copy_command_lines): Remove.
2104 (define_command, document_command, show_user_1): Update.
2105 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2106 a counted_command_line.
2107 * breakpoint.h (counted_command_line): Remove typedef.
2108 (breakpoint_set_commands): Update.
2109 * breakpoint.c (check_no_tracepoint_commands)
2110 (validate_commands_for_breakpoint): Update.
2111 (breakpoint_set_commands): Change commands to be a
2112 counted_command_line.
2113 (commands_command_1, update_dprintf_command_list)
2114 (create_tracepoint_from_upload): Update.
2116 2018-05-04 Tom Tromey <tom@tromey.com>
2118 * cli/cli-decode.h (cmd_list_element): New constructor.
2119 (~cmd_list_element): New destructor.
2120 (struct cmd_list_element): Add initializers.
2121 * cli/cli-decode.c (do_add_cmd): Use "new".
2122 (delete_cmd): Use "delete".
2124 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2125 Pedro Alves <palves@redhat.com>
2127 PR breakpoints/19806 and support for PR external/20207.
2128 * NEWS: Mention Aarch64 watchpoint improvements.
2129 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2130 watchpoints and PR external/20207 watchpoints.
2131 * nat/aarch64-linux-hw-point.c
2132 (kernel_supports_any_contiguous_range): New.
2133 (aarch64_watchpoint_offset): New.
2134 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2135 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2136 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2137 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2138 next_addr_orig_p. Support PR external/20207 watchpoints.
2139 (aarch64_downgrade_regs): New.
2140 (aarch64_dr_state_insert_one_point): New parameters offset and
2142 (aarch64_dr_state_remove_one_point): Likewise.
2143 (aarch64_handle_breakpoint): Update caller.
2144 (aarch64_handle_aligned_watchpoint): Likewise.
2145 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2147 (aarch64_linux_set_debug_regs): Remove const from state. Call
2148 aarch64_downgrade_regs.
2149 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2150 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2151 (DR_CONTROL_MASK): ... this.
2152 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2153 (unsigned int aarch64_watchpoint_offset): New prototype.
2154 (aarch64_linux_set_debug_regs): Remove const from state.
2155 * utils.c (align_up, align_down): Move to ...
2156 * common/common-utils.c (align_up, align_down): ... here.
2157 * utils.h (align_up, align_down): Move to ...
2158 * common/common-utils.h (align_up, align_down): ... here.
2160 2018-05-04 Joel Brobecker <brobecker@adacore.com>
2162 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
2163 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
2164 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
2165 Re-implement to match the ABI as summarized in GCC's
2166 gcc/config/sparc/sparc.c. All callers updated.
2167 (sparc32_store_arguments): Remove assertion.
2169 2018-05-04 Tom Tromey <tom@tromey.com>
2171 * printcmd.c: Don't include tui.h.
2172 (decode_format): Use skip_spaces.
2174 2018-05-04 Tom Tromey <tom@tromey.com>
2177 * printcmd.c (last_count): New global.
2178 (x_command): Use saved count when repeating.
2180 2018-05-04 Tom Tromey <tom@tromey.com>
2182 * nto-procfs.c (do_closedir_cleanup): Remove.
2183 (procfs_pidlist): Use gdb_dir_up.
2184 * procfs.c (do_closedir_cleanup): Remove.
2185 (proc_update_threads): Use gdb_dir_up.
2186 * common/filestuff.h (struct gdb_dir_deleter): New.
2187 (gdb_dir_up): New typedef.
2189 2018-05-04 Tom Tromey <tom@tromey.com>
2191 * ada-lang.c (print_mention_exception): Use std::string.
2193 2018-05-04 Tom Tromey <tom@tromey.com>
2195 * ada-lang.c (create_excep_cond_exprs): Update.
2196 (ada_exception_catchpoint_cond_string): Use std::string.
2198 2018-05-04 Tom Tromey <tom@tromey.com>
2200 * ada-lang.c (xget_renaming_scope): Return std::string.
2201 (old_renaming_is_invisible): Update.
2203 2018-05-04 Tom Tromey <tom@tromey.com>
2205 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2206 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2208 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
2210 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2212 2018-05-04 Tom Tromey <tom@tromey.com>
2214 * remote.c (remote_query_supported_append): Change type.
2215 (remote_check_symbols): Update.
2217 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
2220 * configure.ac: Prepend libpython.
2221 * python/python-config.py: Likewise.
2222 * configure: Regenerate.
2224 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
2226 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2228 2018-05-03 Pedro Alves <palves@redhat.com>
2231 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2232 override. Write 'true' instead of '1'.
2233 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2236 2018-05-02 Pedro Alves <palves@redhat.com>
2238 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2239 add_inf_child_target.
2240 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2241 add_inf_child_target.
2242 * aix-thread.c (aix_thread_target_info): New.
2243 (aix_thread_target) <shortname, longname, doc>: Delete.
2245 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2246 add_inf_child_target.
2247 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2248 add_inf_child_target.
2249 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2250 add_inf_child_target.
2251 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2252 add_inf_child_target.
2253 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2254 add_inf_child_target.
2255 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2256 add_inf_child_target.
2257 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2258 add_inf_child_target.
2259 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2260 add_inf_child_target.
2261 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2262 add_inf_child_target.
2263 * bfd-target.c (target_bfd_target_info): New.
2264 (target_bfd) <shortname, longname, doc>: Delete.
2266 * bsd-kvm.c (bsd_kvm_target_info): New.
2267 (bsd_kvm_target) <shortname, longname, doc>: Delete.
2269 (bsd_kvm_target::open): Rename to ...
2270 (bsd_kvm_target_open): ... this. Adjust.
2271 * bsd-uthread.c (bsd_uthread_target_info): New.
2272 (bsd_uthread_target) <shortname, longname, doc>: Delete.
2274 * corefile.c (core_file_command): Adjust.
2275 * corelow.c (core_target_info): New.
2276 (core_target) <shortname, longname, doc>: Delete.
2278 (core_target::open): Rename to ...
2279 (core_target_open): ... this. Adjust.
2280 * ctf.c (ctf_target_info): New.
2281 (ctf_target) <shortname, longname, doc>: Delete.
2283 (ctf_target::open): Rename to ...
2284 (ctf_target_open): ... this.
2285 (_initialize_ctf): Adjust.
2286 * exec.c (exec_target_info): New.
2287 (exec_target) <shortname, longname, doc>: Delete.
2289 (exec_target::open): Rename to ...
2290 (exec_target_open): ... this.
2291 * gdbcore.h (core_target_open): Declare.
2292 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2293 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2294 add_inf_child_target.
2295 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2296 add_inf_child_target.
2297 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2298 add_inf_child_target.
2299 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2300 add_inf_child_target.
2301 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2302 add_inf_child_target.
2303 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2304 add_inf_child_target.
2305 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2306 add_inf_child_target.
2307 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
2308 add_inf_child_target.
2309 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
2310 add_inf_child_target.
2311 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
2312 add_inf_child_target.
2313 * inf-child.c (inf_child_target_info): New.
2314 (inf_child_target::info): New.
2315 (inf_child_open_target): Remove 'target' parameter. Use
2316 get_native_target instead.
2317 (inf_child_target::open): Delete.
2318 (add_inf_child_target): New.
2319 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
2322 (add_inf_child_target): Declare.
2323 (inf_child_open_target): Declare.
2324 * linux-thread-db.c (thread_db_target_info): New.
2325 (thread_db_target) <shortname, longname, doc>: Delete.
2327 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
2328 add_inf_child_target.
2329 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
2330 add_inf_child_target.
2331 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
2332 add_inf_child_target.
2333 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
2334 add_inf_child_target.
2335 * make-target-delegates (print_class): Adjust.
2336 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
2337 add_inf_child_target.
2338 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
2339 add_inf_child_target.
2340 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
2341 add_inf_child_target.
2342 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
2343 add_inf_child_target.
2344 * nto-procfs.c (nto_native_target_info): New.
2345 (nto_procfs_target_native) <shortname, longname, doc>:
2348 (nto_procfs_target_info): New.
2349 (nto_procfs_target_procfs) <shortname, longname, doc>:
2352 (init_procfs_targets): Adjust.
2353 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
2354 add_inf_child_target.
2355 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2356 add_inf_child_target.
2357 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2358 add_inf_child_target.
2359 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2360 add_inf_child_target.
2361 * ravenscar-thread.c (ravenscar_target_info): New.
2362 (ravenscar_thread_target) <shortname, longname, doc>:
2365 * record-btrace.c (record_btrace_target_info):
2366 (record_btrace_target) <shortname, longname, doc>: Delete.
2368 (record_btrace_target::open): Rename to ...
2369 (record_btrace_target_open): ... this. Adjust.
2370 * record-full.c (record_longname, record_doc): New.
2371 (record_full_base_target) <shortname, longname, doc>: Delete.
2373 (record_full_target_info): New.
2374 (record_full_target): <shortname>: Delete.
2376 (record_full_core_open_1, record_full_open_1): Update comments.
2377 (record_full_base_target::open): Rename to ...
2378 (record_full_open): ... this.
2379 (cmd_record_full_restore): Update.
2380 (_initialize_record_full): Update.
2381 * remote-sim.c (remote_sim_target_info): New.
2382 (gdbsim_target) <shortname, longname, doc>: Delete.
2384 (gdbsim_target::open): Rename to ...
2385 (gdbsim_target_open): ... this.
2386 (_initialize_remote_sim): Adjust.
2387 * remote.c (remote_doc): New.
2388 (remote_target_info): New.
2389 (remote_target) <shortname, longname, doc>: Delete.
2391 (extended_remote_target_info): New.
2392 (extended_remote_target) <shortname, longname, doc>: Delete.
2394 (remote_target::open_1): Make static. Adjust.
2395 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2396 * s390-linux-nat.c (_initialize_s390_nat): Use
2397 add_inf_child_target.
2398 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2399 add_inf_child_target.
2400 * sol-thread.c (thread_db_target_info): New.
2401 (sol_thread_target) <shortname, longname, doc>: Delete.
2403 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2404 add_inf_child_target.
2405 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2406 add_inf_child_target.
2407 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2408 add_inf_child_target.
2409 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2410 add_inf_child_target.
2411 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2412 add_inf_child_target.
2413 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2414 add_inf_child_target.
2415 * spu-linux-nat.c (_initialize_spu_nat): Use
2416 add_inf_child_target.
2417 * spu-multiarch.c (spu_multiarch_target_info): New.
2418 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2420 * target-delegates.c: Regenerate.
2421 * target.c: Include <unordered_map>.
2422 (target_ops_p): Delete.
2423 (DEF_VEC_P(target_ops_p)): Delete.
2424 (target_factories): New.
2425 (test_target_info): New.
2426 (test_target_ops::info): New.
2427 (open_target): Adjust to use target_factories.
2428 (add_target_with_completer): Rename to ...
2429 (add_target): ... this. Change prototype. Register target_info
2430 and open callback in target_factories. Register target_info in
2431 command context instead of target_ops.
2432 (add_target): Delete old implementation.
2433 (add_deprecated_target_alias): Change prototype. Adjust.
2434 (the_native_target): New.
2435 (set_native_target, get_native_target): New.
2436 (find_default_run_target): Use the_native_target.
2437 (find_attach_target, find_run_target): Simplify.
2438 (target_ops::open): Delete.
2439 (dummy_target_info): New.
2440 (dummy_target::shortname, dummy_target::longname)
2441 (dummy_target::doc): Delete.
2442 (dummy_target::info): New.
2443 (debug_target::shortname, debug_target::longname)
2444 (debug_target::doc): Delete.
2445 (debug_target::info): New.
2446 * target.h (struct target_info): New.
2447 (target_ops::~target_ops): Add comment.
2448 (target_ops::info): New.
2449 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2450 longer virtual. Implement in terms of target_info.
2451 (set_native_target, get_native_target): Declare.
2452 (target_open_ftype): New.
2453 (add_target, add_target_with_completer)
2454 (add_deprecated_target_alias): Change prototype.
2455 (test_target) <shortname, longname, doc>: Delete.
2457 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2458 add_inf_child_target.
2459 * tracefile-tfile.c (tfile_target_info): New.
2460 (tfile_target) <shortname, longname, doc>: Delete.
2462 (tfile_target::open): Rename to ...
2463 (tfile_target_open): ... this.
2464 (_initialize_tracefile_tfile): Adjust.
2465 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2466 add_inf_child_target.
2467 * windows-nat.c (_initialize_windows_nat): Use
2468 add_inf_child_target.
2469 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2470 add_inf_child_target.
2472 2018-05-02 Pedro Alves <palves@redhat.com>
2474 * linux-nat.h (linux_nat_target) <low_new_thread,
2475 low_delete_thread, low_new_fork, low_forget_process,
2476 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2477 New virtual methods.
2478 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2479 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2480 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2481 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2482 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2484 * linux-fork.c (delete_fork): Adjust to call low method.
2485 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2486 (linux_nat_new_fork, linux_nat_forget_process_hook)
2487 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2488 (linux_nat_status_is_event):
2489 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2490 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2492 (sigtrap_is_event): Rename to ...
2493 (linux_nat_target::low_status_is_event): ... this.
2494 (linux_nat_set_status_is_event): Delete.
2495 (save_stop_reason, linux_nat_wait_1)
2496 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2498 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2499 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2500 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2501 (linux_nat_set_prepare_to_resume): Delete.
2502 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2503 low virtual methods.
2504 * amd64-linux-nat.c: Likewise.
2505 * arm-linux-nat.c: Likewise.
2506 * i386-linux-nat.c: Likewise.
2507 * ia64-linux-nat.c: Likewise.
2508 * mips-linux-nat.c: Likewise.
2509 * ppc-linux-nat.c: Likewise.
2510 * s390-linux-nat.c: Likewise.
2511 * sparc64-linux-nat.c: Likewise.
2512 * x86-linux-nat.c: Likewise.
2513 * x86-linux-nat.h: Include "nat/x86-linux.h".
2514 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2515 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2518 2018-05-02 Pedro Alves <palves@redhat.com>
2520 * target.h (target_ops)
2521 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2522 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2523 stopped_by_watchpoint, have_continuable_watchpoint,
2524 stopped_data_address, watchpoint_addr_within_range,
2525 can_accel_watchpoint_condition, can_run, thread_alive,
2526 has_all_memory, has_memory, has_stack, has_registers,
2527 has_execution, can_async_p, is_async_p, supports_non_stop,
2528 always_non_stop_p, can_execute_reverse, supports_multi_process,
2529 supports_enable_disable_tracepoint,
2530 supports_disable_randomization, supports_string_tracing,
2531 supports_evaluation_of_breakpoint_conditions,
2532 can_run_breakpoint_commands, filesystem_is_local,
2533 can_download_tracepoint, get_trace_state_variable_value,
2534 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2535 record_is_replaying, record_will_replay,
2536 augmented_libraries_svr4_read>: Adjust to return bool.
2537 * aarch64-linux-nat.c: All implementations adjusted.
2538 * aix-thread.c: All implementations adjusted.
2539 * arm-linux-nat.c: All implementations adjusted.
2540 * breakpoint.c: All implementations adjusted.
2541 * bsd-kvm.c: All implementations adjusted.
2542 * bsd-uthread.c: All implementations adjusted.
2543 * corelow.c: All implementations adjusted.
2544 * ctf.c: All implementations adjusted.
2545 * darwin-nat.c: All implementations adjusted.
2546 * darwin-nat.h: All implementations adjusted.
2547 * exec.c: All implementations adjusted.
2548 * fbsd-nat.c: All implementations adjusted.
2549 * fbsd-nat.h: All implementations adjusted.
2550 * gnu-nat.c: All implementations adjusted.
2551 * gnu-nat.h: All implementations adjusted.
2552 * go32-nat.c: All implementations adjusted.
2553 * ia64-linux-nat.c: All implementations adjusted.
2554 * inf-child.c: All implementations adjusted.
2555 * inf-child.h: All implementations adjusted.
2556 * inf-ptrace.c: All implementations adjusted.
2557 * inf-ptrace.h: All implementations adjusted.
2558 * linux-nat.c: All implementations adjusted.
2559 * linux-nat.h: All implementations adjusted.
2560 * mips-linux-nat.c: All implementations adjusted.
2561 * nto-procfs.c: All implementations adjusted.
2562 * ppc-linux-nat.c: All implementations adjusted.
2563 * procfs.c: All implementations adjusted.
2564 * ravenscar-thread.c: All implementations adjusted.
2565 * record-btrace.c: All implementations adjusted.
2566 * record-full.c: All implementations adjusted.
2567 * remote-sim.c: All implementations adjusted.
2568 * remote.c: All implementations adjusted.
2569 * s390-linux-nat.c: All implementations adjusted.
2570 * sol-thread.c: All implementations adjusted.
2571 * spu-multiarch.c: All implementations adjusted.
2572 * target-delegates.c: All implementations adjusted.
2573 * target.c: All implementations adjusted.
2574 * target.h: All implementations adjusted.
2575 * tracefile-tfile.c: All implementations adjusted.
2576 * tracefile.c: All implementations adjusted.
2577 * tracefile.h: All implementations adjusted.
2578 * windows-nat.c: All implementations adjusted.
2579 * x86-linux-nat.h: All implementations adjusted.
2580 * x86-nat.h: All implementations adjusted.
2582 2018-05-02 Pedro Alves <palves@redhat.com>
2584 * make-target-delegates (scan_target_h): Don't trim lines here.
2585 Replace sequences of tabs and/or whitespace with a single
2587 (top level, parsing methods): Trim each line before processing it
2590 2018-05-02 Pedro Alves <palves@redhat.com>
2591 John Baldwin <jhb@freebsd.org>
2593 * target.h (enum strata) <debug_stratum>: New.
2594 (struct target_ops) <all delegation methods>: Replace by C++
2595 virtual methods, and drop "to_" prefix. All references updated
2597 <to_shortname, to_longname, to_doc, to_data,
2598 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2599 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2600 virtual methods. All references updated throughout.
2601 <can_attach, supports_terminal_ours, can_create_inferior,
2602 get_thread_control_capabilities, attach_no_wait>: New
2604 <insert_breakpoint, remove_breakpoint>: Now
2605 TARGET_DEFAULT_NORETURN methods.
2606 <info_proc>: Now returns bool.
2608 (OPS_MAGIC): Delete.
2609 (current_target): Delete. All references replaced by references
2611 (target_stack): ... this. New.
2612 (target_shortname, target_longname): Adjust.
2613 (target_can_run): Now a function declaration.
2614 (default_child_has_all_memory, default_child_has_memory)
2615 (default_child_has_stack, default_child_has_registers)
2616 (default_child_has_execution): Remove target_ops parameter.
2617 (complete_target_initialization): Delete.
2618 (memory_breakpoint_target): New template class.
2619 (test_target_ops): Refactor as a C++ class with virtual methods.
2620 * make-target-delegates (NAME_PART): Tighten.
2621 (POINTER_PART, CP_SYMBOL): New.
2622 (SIMPLE_RETURN_PART): Reimplement.
2623 (VEC_RETURN_PART): Expect less.
2624 (RETURN_PART, VIRTUAL_PART): New.
2625 (METHOD): Adjust to C++ virtual methods.
2626 (scan_target_h): Remove reference to C99.
2627 (dname): Output "target_ops::" prefix.
2628 (write_function_header): Adjust to output a C++ class method.
2629 (write_declaration): New.
2630 (write_delegator): Adjust to output a C++ class method.
2631 (tdname): Output "dummy_target::" prefix.
2632 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2634 (tdefault_names, debug_names): Delete.
2635 (return_types, tdefaults, styles, argtypes_array): New.
2636 (top level): All methods are delegators.
2638 (top level): Print dummy_target and debug_target classes.
2639 * target-delegates.c: Regenerate.
2640 * target-debug.h (target_debug_print_enum_info_proc_what)
2641 (target_debug_print_thread_control_capabilities)
2642 (target_debug_print_thread_info_p): New.
2643 * target.c (dummy_target): Delete.
2644 (the_dummy_target, the_debug_target): New.
2645 (target_stack): Now extern.
2646 (set_targetdebug): Push/unpush debug target.
2647 (default_child_has_all_memory, default_child_has_memory)
2648 (default_child_has_stack, default_child_has_registers)
2649 (default_child_has_execution): Remove target_ops parameter.
2650 (complete_target_initialization): Delete.
2651 (add_target_with_completer): No longer call
2652 complete_target_initialization.
2653 (target_supports_terminal_ours): Use regular delegation.
2654 (update_current_target): Delete.
2655 (push_target): No longer check magic number. Don't call
2656 update_current_target.
2657 (unpush_target): Don't call update_current_target.
2658 (target_is_pushed): No longer check magic number.
2659 (target_require_runnable): Skip for all stratums over
2661 (target_ops::info_proc): New.
2662 (target_info_proc): Use find_target_at and
2663 find_default_run_target.
2664 (target_supports_disable_randomization): Use regular delegation.
2665 (target_get_osdata): Use find_target_at.
2666 (target_ops::open, target_ops::close, target_ops::can_attach)
2667 (target_ops::attach, target_ops::can_create_inferior)
2668 (target_ops::create_inferior, target_ops::can_run)
2669 (target_can_run): New.
2670 (default_fileio_target): Use regular delegation.
2671 (target_ops::fileio_open, target_ops::fileio_pwrite)
2672 (target_ops::fileio_pread, target_ops::fileio_fstat)
2673 (target_ops::fileio_close, target_ops::fileio_unlink)
2674 (target_ops::fileio_readlink): New.
2675 (target_fileio_open_1, target_fileio_unlink)
2676 (target_fileio_readlink): Always call the target method. Handle
2678 (return_zero, return_zero_has_execution): Delete.
2679 (init_dummy_target): Delete.
2680 (dummy_target::dummy_target, dummy_target::shortname)
2681 (dummy_target::longname, dummy_target::doc)
2682 (debug_target::debug_target, debug_target::shortname)
2683 (debug_target::longname, debug_target::doc): New.
2684 (target_supports_delete_record): Use regular delegation.
2685 (setup_target_debug): Delete.
2686 (maintenance_print_target_stack): Skip debug_stratum.
2687 (initialize_targets): Instantiate the_dummy_target and
2689 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2691 (target_auxv_search, fprint_target_auxv): Adjust.
2692 (info_auxv_command): Adjust to use target_stack.
2693 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2694 * exceptions.c (print_flush): Handle a NULL target_stack.
2695 * regcache.c (target_ops_no_register): Refactor as class with
2698 * exec.c (exec_target): New class.
2699 (exec_ops): Now an exec_target.
2700 (exec_open, exec_close_1, exec_get_section_table)
2701 (exec_xfer_partial, exec_files_info, exec_has_memory)
2702 (exec_make_note_section): Refactor as exec_target methods.
2703 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2705 (exec_target::find_memory_regions): New.
2706 (_initialize_exec): Don't call init_exec_ops.
2707 * gdbcore.h (exec_file_clear): Delete.
2709 * corefile.c (core_target): Delete.
2710 (core_file_command): Adjust.
2711 * corelow.c (core_target): New class.
2712 (the_core_target): New.
2713 (core_close): Remove target_ops parameter.
2714 (core_close_cleanup): Adjust.
2715 (core_target::close): New.
2716 (core_open, core_detach, get_core_registers, core_files_info)
2717 (core_xfer_partial, core_thread_alive, core_read_description)
2718 (core_pid_to_str, core_thread_name, core_has_memory)
2719 (core_has_stack, core_has_registers, core_info_proc): Rework as
2720 core_target methods.
2721 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2722 (_initialize_corelow): Initialize the_core_target.
2723 * gdbcore.h (core_target): Delete.
2724 (the_core_target): New.
2726 * ctf.c: (ctf_target): New class.
2727 (ctf_ops): Now a ctf_target.
2728 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2729 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2730 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2732 (init_ctf_ops): Delete.
2733 (_initialize_ctf): Don't call it.
2734 * tracefile-tfile.c (tfile_target): New class.
2735 (tfile_ops): Now a tfile_target.
2736 (tfile_open, tfile_close, tfile_files_info)
2737 (tfile_get_tracepoint_status, tfile_trace_find)
2738 (tfile_fetch_registers, tfile_xfer_partial)
2739 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2740 Refactor as tfile_target methods.
2741 (tfile_xfer_partial_features): Remove target_ops parameter.
2742 (init_tfile_ops): Delete.
2743 (_initialize_tracefile_tfile): Don't call it.
2744 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2745 (tracefile_has_stack, tracefile_has_registers)
2746 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2747 tracefile_target methods.
2748 (init_tracefile_ops): Delete.
2749 (tracefile_target::tracefile_target): New.
2750 * tracefile.h: Include "target.h".
2751 (tracefile_target): New class.
2752 (init_tracefile_ops): Delete.
2754 * spu-multiarch.c (spu_multiarch_target): New class.
2755 (spu_ops): Now a spu_multiarch_target.
2756 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2757 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2758 (spu_search_memory, spu_mourn_inferior): Refactor as
2759 spu_multiarch_target methods.
2760 (init_spu_ops): Delete.
2761 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2762 complete_target_initialization.
2764 * ravenscar-thread.c (ravenscar_thread_target): New class.
2765 (ravenscar_ops): Now a ravenscar_thread_target.
2766 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2767 (ravenscar_thread_alive, ravenscar_pid_to_str)
2768 (ravenscar_fetch_registers, ravenscar_store_registers)
2769 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2770 (ravenscar_stopped_by_hw_breakpoint)
2771 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2772 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2773 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2775 (init_ravenscar_thread_ops): Delete.
2776 (_initialize_ravenscar): Remove references to
2777 init_ravenscar_thread_ops and complete_target_initialization.
2779 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2780 (bsd_uthread_target): New class.
2781 (bsd_uthread_ops): Now a bsd_uthread_target.
2782 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2783 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2784 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2785 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2786 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2787 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2788 (bsd_uthread_target): Delete function.
2789 (_initialize_bsd_uthread): Remove reference to
2790 complete_target_initialization.
2792 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2793 (target_bfd): ... this new class.
2794 (target_bfd_xfer_partial, target_bfd_get_section_table)
2795 (target_bfd_close): Refactor as target_bfd methods.
2796 (target_bfd::~target_bfd): New.
2797 (target_bfd_reopen): Adjust.
2798 (target_bfd::close): New.
2800 * record-btrace.c (record_btrace_target): New class.
2801 (record_btrace_ops): Now a record_btrace_target.
2802 (record_btrace_open, record_btrace_stop_recording)
2803 (record_btrace_disconnect, record_btrace_close)
2804 (record_btrace_async, record_btrace_info)
2805 (record_btrace_insn_history, record_btrace_insn_history_range)
2806 (record_btrace_insn_history_from, record_btrace_call_history)
2807 (record_btrace_call_history_range)
2808 (record_btrace_call_history_from, record_btrace_record_method)
2809 (record_btrace_is_replaying, record_btrace_will_replay)
2810 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2811 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2812 (record_btrace_store_registers, record_btrace_prepare_to_store)
2813 (record_btrace_to_get_unwinder)
2814 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2815 (record_btrace_commit_resume, record_btrace_wait)
2816 (record_btrace_stop, record_btrace_can_execute_reverse)
2817 (record_btrace_stopped_by_sw_breakpoint)
2818 (record_btrace_supports_stopped_by_sw_breakpoint)
2819 (record_btrace_stopped_by_hw_breakpoint)
2820 (record_btrace_supports_stopped_by_hw_breakpoint)
2821 (record_btrace_update_thread_list, record_btrace_thread_alive)
2822 (record_btrace_goto_begin, record_btrace_goto_end)
2823 (record_btrace_goto, record_btrace_stop_replaying_all)
2824 (record_btrace_execution_direction)
2825 (record_btrace_prepare_to_generate_core)
2826 (record_btrace_done_generating_core): Refactor as
2827 record_btrace_target methods.
2828 (init_record_btrace_ops): Delete.
2829 (_initialize_record_btrace): Remove reference to
2830 init_record_btrace_ops.
2831 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2832 the execution_direction global.
2833 (record_full_base_target, record_full_target)
2834 (record_full_core_target): New classes.
2835 (record_full_ops): Now a record_full_target.
2836 (record_full_core_ops): Now a record_full_core_target.
2837 (record_full_target::detach, record_full_target::disconnect)
2838 (record_full_core_target::disconnect)
2839 (record_full_target::mourn_inferior, record_full_target::kill):
2841 (record_full_open, record_full_close, record_full_async): Refactor
2842 as methods of the record_full_base_target class.
2843 (record_full_resume, record_full_commit_resume): Refactor
2844 as methods of the record_full_target class.
2845 (record_full_wait, record_full_stopped_by_watchpoint)
2846 (record_full_stopped_data_address)
2847 (record_full_stopped_by_sw_breakpoint)
2848 (record_full_supports_stopped_by_sw_breakpoint)
2849 (record_full_stopped_by_hw_breakpoint)
2850 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2851 methods of the record_full_base_target class.
2852 (record_full_store_registers, record_full_xfer_partial)
2853 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2854 Refactor as methods of the record_full_target class.
2855 (record_full_can_execute_reverse, record_full_get_bookmark)
2856 (record_full_goto_bookmark, record_full_execution_direction)
2857 (record_full_record_method, record_full_info, record_full_delete)
2858 (record_full_is_replaying, record_full_will_replay)
2859 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2860 (record_full_stop_replaying): Refactor as methods of the
2861 record_full_base_target class.
2862 (record_full_core_resume, record_full_core_kill)
2863 (record_full_core_fetch_registers)
2864 (record_full_core_prepare_to_store)
2865 (record_full_core_store_registers, record_full_core_xfer_partial)
2866 (record_full_core_insert_breakpoint)
2867 (record_full_core_remove_breakpoint)
2868 (record_full_core_has_execution): Refactor
2869 as methods of the record_full_core_target class.
2870 (record_full_base_target::supports_delete_record): New.
2871 (init_record_full_ops): Delete.
2872 (init_record_full_core_ops): Delete.
2873 (record_full_save): Refactor as method of the
2874 record_full_base_target class.
2875 (_initialize_record_full): Remove references to
2876 init_record_full_ops and init_record_full_core_ops.
2878 * remote.c (remote_target, extended_remote_target): New classes.
2879 (remote_ops): Now a remote_target.
2880 (extended_remote_ops): Now an extended_remote_target.
2881 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2882 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2883 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2884 (remote_pass_signals, remote_set_syscall_catchpoint)
2885 (remote_program_signals, )
2886 (remote_thread_always_alive): Remove target_ops parameter.
2887 (remote_thread_alive, remote_thread_name)
2888 (remote_update_thread_list, remote_threads_extra_info)
2889 (remote_static_tracepoint_marker_at)
2890 (remote_static_tracepoint_markers_by_strid)
2891 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2892 (remote_open): Refactor as methods of remote_target.
2893 (extended_remote_open, extended_remote_detach)
2894 (extended_remote_attach, extended_remote_post_attach):
2895 (extended_remote_supports_disable_randomization)
2896 (extended_remote_create_inferior): : Refactor as method of
2897 extended_remote_target.
2898 (remote_set_permissions, remote_open_1, remote_detach)
2899 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2900 (remote_resume, remote_commit_resume, remote_stop)
2901 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2902 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2903 (remote_prepare_to_store, remote_store_registers)
2904 (remote_flash_erase, remote_flash_done, remote_files_info)
2905 (remote_kill, remote_mourn, remote_insert_breakpoint)
2906 (remote_remove_breakpoint, remote_insert_watchpoint)
2907 (remote_watchpoint_addr_within_range)
2908 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2909 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2910 (remote_supports_stopped_by_sw_breakpoint)
2911 (remote_stopped_by_hw_breakpoint)
2912 (remote_supports_stopped_by_hw_breakpoint)
2913 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2914 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2915 (remote_verify_memory): Refactor as methods of remote_target.
2916 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2918 (remote_xfer_partial, remote_get_memory_xfer_limit)
2919 (remote_search_memory, remote_rcmd, remote_memory_map)
2920 (remote_pid_to_str, remote_get_thread_local_address)
2921 (remote_get_tib_address, remote_read_description): Refactor as
2922 methods of remote_target.
2923 (remote_target::fileio_open, remote_target::fileio_pwrite)
2924 (remote_target::fileio_pread, remote_target::fileio_close): New.
2925 (remote_hostio_readlink, remote_hostio_fstat)
2926 (remote_filesystem_is_local, remote_can_execute_reverse)
2927 (remote_supports_non_stop, remote_supports_disable_randomization)
2928 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2929 (remote_supports_enable_disable_tracepoint)
2930 (remote_supports_string_tracing)
2931 (remote_can_run_breakpoint_commands, remote_trace_init)
2932 (remote_download_tracepoint, remote_can_download_tracepoint)
2933 (remote_download_trace_state_variable, remote_enable_tracepoint)
2934 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2935 (remote_trace_start, remote_get_trace_status)
2936 (remote_get_tracepoint_status, remote_trace_stop)
2937 (remote_trace_find, remote_get_trace_state_variable_value)
2938 (remote_save_trace_data, remote_get_raw_trace_data)
2939 (remote_set_disconnected_tracing, remote_core_of_thread)
2940 (remote_set_circular_trace_buffer, remote_traceframe_info)
2941 (remote_get_min_fast_tracepoint_insn_len)
2942 (remote_set_trace_buffer_size, remote_set_trace_notes)
2943 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2944 (remote_disable_btrace, remote_teardown_btrace)
2945 (remote_read_btrace, remote_btrace_conf)
2946 (remote_augmented_libraries_svr4_read, remote_load)
2947 (remote_pid_to_exec_file, remote_can_do_single_step)
2948 (remote_execution_direction, remote_thread_handle_to_thread_info):
2949 Refactor as methods of remote_target.
2950 (init_remote_ops, init_extended_remote_ops): Delete.
2951 (remote_can_async_p, remote_is_async_p, remote_async)
2952 (remote_thread_events, remote_upload_tracepoints)
2953 (remote_upload_trace_state_variables): Refactor as methods of
2955 (_initialize_remote): Remove references to init_remote_ops and
2956 init_extended_remote_ops.
2958 * remote-sim.c (gdbsim_target): New class.
2959 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2960 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2961 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2962 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2963 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2964 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2965 Refactor as methods of gdbsim_target.
2966 (gdbsim_ops): Now a gdbsim_target.
2967 (init_gdbsim_ops): Delete.
2968 (gdbsim_cntrl_c): Adjust.
2969 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2971 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2972 (the_amd64_linux_nat_target): New.
2973 (amd64_linux_fetch_inferior_registers)
2974 (amd64_linux_store_inferior_registers): Refactor as methods of
2975 amd64_linux_nat_target.
2976 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2977 * i386-linux-nat.c: Don't include "linux-nat.h".
2978 (i386_linux_nat_target): New class.
2979 (the_i386_linux_nat_target): New.
2980 (i386_linux_fetch_inferior_registers)
2981 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2982 as methods of i386_linux_nat_target.
2983 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2984 * inf-child.c (inf_child_ops): Delete.
2985 (inf_child_fetch_inferior_registers)
2986 (inf_child_store_inferior_registers): Delete.
2987 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2988 methods of inf_child_target.
2989 (inf_child_target::supports_terminal_ours)
2990 (inf_child_target::terminal_init)
2991 (inf_child_target::terminal_inferior)
2992 (inf_child_target::terminal_ours_for_output)
2993 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2994 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2996 (inf_child_open, inf_child_disconnect, inf_child_close)
2997 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2998 (inf_child_post_startup_inferior, inf_child_can_run)
2999 (inf_child_pid_to_exec_file): Refactor as methods of
3001 (inf_child_follow_fork): Delete.
3002 (inf_child_target::can_create_inferior)
3003 (inf_child_target::can_attach): New.
3004 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3005 (inf_child_target::has_stack, inf_child_target::has_registers)
3006 (inf_child_target::has_execution): New.
3007 (inf_child_fileio_open, inf_child_fileio_pwrite)
3008 (inf_child_fileio_pread, inf_child_fileio_fstat)
3009 (inf_child_fileio_close, inf_child_fileio_unlink)
3010 (inf_child_fileio_readlink, inf_child_use_agent)
3011 (inf_child_can_use_agent): Refactor as methods of
3013 (return_zero, inf_child_target): Delete.
3014 (inf_child_target::inf_child_target): New.
3015 * inf-child.h: Include "target.h".
3016 (inf_child_target): Delete function prototype.
3017 (inf_child_target): New class.
3018 (inf_child_open_target, inf_child_mourn_inferior)
3019 (inf_child_maybe_unpush_target): Delete.
3020 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3021 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3022 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3023 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3024 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3025 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3026 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3027 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3028 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3029 methods of inf_ptrace_target.
3030 (inf_ptrace_target): Delete function.
3031 * inf-ptrace.h: Include "inf-child.h".
3032 (inf_ptrace_target): Delete function declaration.
3033 (inf_ptrace_target): New class.
3034 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3035 * linux-nat.c (linux_target): New.
3036 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3037 (linux_nat_target::~linux_nat_target): New.
3038 (linux_child_post_attach, linux_child_post_startup_inferior)
3039 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3040 (linux_child_remove_fork_catchpoint)
3041 (linux_child_insert_vfork_catchpoint)
3042 (linux_child_remove_vfork_catchpoint)
3043 (linux_child_insert_exec_catchpoint)
3044 (linux_child_remove_exec_catchpoint)
3045 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3046 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3047 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3048 (linux_nat_stopped_data_address)
3049 (linux_nat_stopped_by_sw_breakpoint)
3050 (linux_nat_supports_stopped_by_sw_breakpoint)
3051 (linux_nat_stopped_by_hw_breakpoint)
3052 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3053 (linux_nat_kill, linux_nat_mourn_inferior)
3054 (linux_nat_xfer_partial, linux_nat_thread_alive)
3055 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3056 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3057 (linux_child_static_tracepoint_markers_by_strid)
3058 (linux_nat_is_async_p, linux_nat_can_async_p)
3059 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3060 (linux_nat_supports_multi_process)
3061 (linux_nat_supports_disable_randomization, linux_nat_async)
3062 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3063 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3064 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3065 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3066 methods of linux_nat_target.
3067 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3068 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3070 (check_stopped_by_watchpoint): Adjust.
3071 (linux_xfer_partial): Delete.
3072 (linux_target_install_ops, linux_target, linux_nat_add_target):
3074 (linux_nat_target::linux_nat_target): New.
3075 * linux-nat.h: Include "inf-ptrace.h".
3076 (linux_nat_target): New.
3077 (linux_target, linux_target_install_ops, linux_nat_add_target):
3078 Delete function declarations.
3079 (linux_target): Declare global.
3080 * linux-thread-db.c (thread_db_target): New.
3081 (thread_db_target::thread_db_target): New.
3082 (thread_db_ops): Delete.
3083 (the_thread_db_target): New.
3084 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3085 (thread_db_update_thread_list, thread_db_pid_to_str)
3086 (thread_db_extra_thread_info)
3087 (thread_db_thread_handle_to_thread_info)
3088 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3089 (thread_db_resume): Refactor as methods of thread_db_target.
3090 (init_thread_db_ops): Delete.
3091 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3092 * x86-linux-nat.c: Don't include "linux-nat.h".
3093 (super_post_startup_inferior): Delete.
3094 (x86_linux_nat_target::~x86_linux_nat_target): New.
3095 (x86_linux_child_post_startup_inferior)
3096 (x86_linux_read_description, x86_linux_enable_btrace)
3097 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3098 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3099 methods of x86_linux_nat_target.
3100 (x86_linux_create_target): Delete. Bits folded ...
3101 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3103 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3104 (x86_linux_nat_target): New class.
3105 (x86_linux_create_target): Delete.
3106 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3107 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3108 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3109 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3110 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3111 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3113 (x86_use_watchpoints): Delete.
3114 * x86-nat.h: Include "breakpoint.h" and "target.h".
3115 (x86_use_watchpoints): Delete.
3116 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3117 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3118 (x86_insert_watchpoint, x86_remove_watchpoint)
3119 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3120 (x86_stopped_by_hw_breakpoint): New declarations.
3121 (x86_nat_target): New template class.
3123 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3124 (the_ppc_linux_nat_target): New.
3125 (ppc_linux_fetch_inferior_registers)
3126 (ppc_linux_can_use_hw_breakpoint)
3127 (ppc_linux_region_ok_for_hw_watchpoint)
3128 (ppc_linux_ranged_break_num_registers)
3129 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3130 (ppc_linux_insert_mask_watchpoint)
3131 (ppc_linux_remove_mask_watchpoint)
3132 (ppc_linux_can_accel_watchpoint_condition)
3133 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3134 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3135 (ppc_linux_watchpoint_addr_within_range)
3136 (ppc_linux_masked_watch_num_registers)
3137 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3138 (ppc_linux_read_description): Refactor as methods of
3139 ppc_linux_nat_target.
3140 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3142 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3143 (procfs_target): New class.
3144 (the_procfs_target): New.
3145 (procfs_target): Delete function.
3146 (procfs_auxv_parse, procfs_attach, procfs_detach)
3147 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3148 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3149 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3150 (procfs_create_inferior, procfs_update_thread_list)
3151 (procfs_thread_alive, procfs_pid_to_str)
3152 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3153 (procfs_stopped_data_address, procfs_insert_watchpoint)
3154 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3155 (proc_find_memory_regions, procfs_info_proc)
3156 (procfs_make_note_section): Refactor as methods of procfs_target.
3157 (_initialize_procfs): Adjust.
3158 * sol-thread.c (sol_thread_target): New class.
3159 (sol_thread_ops): Now a sol_thread_target.
3160 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
3161 (sol_thread_fetch_registers, sol_thread_store_registers)
3162 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
3163 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
3164 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
3165 (init_sol_thread_ops): Delete.
3166 (_initialize_sol_thread): Adjust. Remove references to
3167 init_sol_thread_ops and complete_target_initialization.
3169 * windows-nat.c (windows_nat_target): New class.
3170 (windows_fetch_inferior_registers)
3171 (windows_store_inferior_registers, windows_resume, windows_wait)
3172 (windows_attach, windows_detach, windows_pid_to_exec_file)
3173 (windows_files_info, windows_create_inferior)
3174 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
3175 (windows_close, windows_pid_to_str, windows_xfer_partial)
3176 (windows_get_tib_address, windows_get_ada_task_ptid)
3177 (windows_thread_name, windows_thread_alive): Refactor as
3178 windows_nat_target methods.
3179 (do_initial_windows_stuff): Adjust.
3180 (windows_target): Delete function.
3181 (_initialize_windows_nat): Adjust.
3183 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
3184 (darwin_mourn_inferior, darwin_kill_inferior)
3185 (darwin_create_inferior, darwin_attach, darwin_detach)
3186 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
3187 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
3188 (darwin_supports_multi_process): Refactor as darwin_nat_target
3190 (darwin_resume_to, darwin_files_info): Delete.
3191 (_initialize_darwin_inferior): Rename to ...
3192 (_initialize_darwin_nat): ... this. Adjust to C++ification.
3193 * darwin-nat.h: Include "inf-child.h".
3194 (darwin_nat_target): New class.
3195 (darwin_complete_target): Delete.
3196 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3197 (darwin_target): New.
3198 (i386_darwin_fetch_inferior_registers)
3199 (i386_darwin_store_inferior_registers): Refactor as methods of
3201 (darwin_complete_target): Delete, with ...
3202 (_initialize_i386_darwin_nat): ... bits factored out here.
3204 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3205 (the_alpha_linux_nat_target): New.
3206 (alpha_linux_register_u_offset): Refactor as
3207 alpha_linux_nat_target method.
3208 (_initialize_alpha_linux_nat): Adjust.
3209 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3210 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3211 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3212 methods of linux_nat_trad_target.
3213 (linux_trad_target): Delete.
3214 * linux-nat-trad.h (linux_trad_target): Delete function.
3215 (linux_nat_trad_target): New class.
3216 * mips-linux-nat.c (mips_linux_nat_target): New class.
3217 (super_fetch_registers, super_store_registers, super_close):
3219 (the_mips_linux_nat_target): New.
3220 (mips64_linux_regsets_fetch_registers)
3221 (mips64_linux_regsets_store_registers)
3222 (mips64_linux_fetch_registers, mips64_linux_store_registers)
3223 (mips_linux_register_u_offset, mips_linux_read_description)
3224 (mips_linux_can_use_hw_breakpoint)
3225 (mips_linux_stopped_by_watchpoint)
3226 (mips_linux_stopped_data_address)
3227 (mips_linux_region_ok_for_hw_watchpoint)
3228 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3229 (mips_linux_close): Refactor as methods of mips_linux_nat.
3230 (_initialize_mips_linux_nat): Adjust to C++ification.
3232 * aix-thread.c (aix_thread_target): New class.
3233 (aix_thread_ops): Now an aix_thread_target.
3234 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3235 (aix_thread_fetch_registers, aix_thread_store_registers)
3236 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3237 (aix_thread_thread_alive, aix_thread_pid_to_str)
3238 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3239 Refactor as methods of aix_thread_target.
3240 (init_aix_thread_ops): Delete.
3241 (_initialize_aix_thread): Remove references to init_aix_thread_ops
3242 and complete_target_initialization.
3243 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3244 (rs6000_nat_target): New class.
3245 (the_rs6000_nat_target): New.
3246 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3247 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3248 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3249 (super_create_inferior): Delete.
3250 (_initialize_rs6000_nat): Adjust to C++ification.
3252 * arm-linux-nat.c (arm_linux_nat_target): New class.
3253 (the_arm_linux_nat_target): New.
3254 (arm_linux_fetch_inferior_registers)
3255 (arm_linux_store_inferior_registers, arm_linux_read_description)
3256 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3257 (arm_linux_remove_hw_breakpoint)
3258 (arm_linux_region_ok_for_hw_watchpoint)
3259 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3260 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3261 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3262 arm_linux_nat_target.
3263 (_initialize_arm_linux_nat): Adjust to C++ification.
3265 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3266 (the_aarch64_linux_nat_target): New.
3267 (aarch64_linux_fetch_inferior_registers)
3268 (aarch64_linux_store_inferior_registers)
3269 (aarch64_linux_child_post_startup_inferior)
3270 (aarch64_linux_read_description)
3271 (aarch64_linux_can_use_hw_breakpoint)
3272 (aarch64_linux_insert_hw_breakpoint)
3273 (aarch64_linux_remove_hw_breakpoint)
3274 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3275 (aarch64_linux_region_ok_for_hw_watchpoint)
3276 (aarch64_linux_stopped_data_address)
3277 (aarch64_linux_stopped_by_watchpoint)
3278 (aarch64_linux_watchpoint_addr_within_range)
3279 (aarch64_linux_can_do_single_step): Refactor as methods of
3280 aarch64_linux_nat_target.
3281 (super_post_startup_inferior): Delete.
3282 (_initialize_aarch64_linux_nat): Adjust to C++ification.
3284 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
3285 (the_hppa_linux_nat_target): New.
3286 (hppa_linux_fetch_inferior_registers)
3287 (hppa_linux_store_inferior_registers): Refactor as methods of
3288 hppa_linux_nat_target.
3289 (_initialize_hppa_linux_nat): Adjust to C++ification.
3291 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3292 (the_ia64_linux_nat_target): New.
3293 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3294 (ia64_linux_stopped_data_address)
3295 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3296 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3297 ia64_linux_nat_target methods.
3298 (super_xfer_partial): Delete.
3299 (_initialize_ia64_linux_nat): Adjust to C++ification.
3301 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3302 (the_m32r_linux_nat_target): New.
3303 (m32r_linux_fetch_inferior_registers)
3304 (m32r_linux_store_inferior_registers): Refactor as
3305 m32r_linux_nat_target methods.
3306 (_initialize_m32r_linux_nat): Adjust to C++ification.
3308 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
3309 (the_m68k_linux_nat_target): New.
3310 (m68k_linux_fetch_inferior_registers)
3311 (m68k_linux_store_inferior_registers): Refactor as
3312 m68k_linux_nat_target methods.
3313 (_initialize_m68k_linux_nat): Adjust to C++ification.
3315 * s390-linux-nat.c (s390_linux_nat_target): New class.
3316 (the_s390_linux_nat_target): New.
3317 (s390_linux_fetch_inferior_registers)
3318 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
3319 (s390_insert_watchpoint, s390_remove_watchpoint)
3320 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
3321 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
3322 (s390_auxv_parse, s390_read_description): Refactor as methods of
3323 s390_linux_nat_target.
3324 (_initialize_s390_nat): Adjust to C++ification.
3326 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
3327 (the_sparc_linux_nat_target): New.
3328 (_initialize_sparc_linux_nat): Adjust to C++ification.
3329 * sparc-nat.c (sparc_fetch_inferior_registers)
3330 (sparc_store_inferior_registers): Remove target_ops parameter.
3331 * sparc-nat.h (sparc_fetch_inferior_registers)
3332 (sparc_store_inferior_registers): Remove target_ops parameter.
3333 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
3334 (the_sparc64_linux_nat_target): New.
3335 (_initialize_sparc64_linux_nat): Adjust to C++ification.
3337 * spu-linux-nat.c (spu_linux_nat_target): New class.
3338 (the_spu_linux_nat_target): New.
3339 (spu_child_post_startup_inferior, spu_child_post_attach)
3340 (spu_child_wait, spu_fetch_inferior_registers)
3341 (spu_store_inferior_registers, spu_xfer_partial)
3342 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
3344 (_initialize_spu_nat): Adjust to C++ification.
3346 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
3347 (the_tilegx_linux_nat_target): New.
3348 (fetch_inferior_registers, store_inferior_registers):
3349 Refactor as methods.
3350 (_initialize_tile_linux_nat): Adjust to C++ification.
3352 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
3353 (the_xtensa_linux_nat_target): New.
3354 (xtensa_linux_fetch_inferior_registers)
3355 (xtensa_linux_store_inferior_registers): Refactor as
3356 xtensa_linux_nat_target methods.
3357 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3359 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3360 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3361 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3362 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3363 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3364 (fbsd_stopped_by_sw_breakpoint)
3365 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3366 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3367 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3368 (fbsd_post_startup_inferior, fbsd_post_attach)
3369 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3370 (fbsd_set_syscall_catchpoint)
3371 (super_xfer_partial, super_resume, super_wait)
3372 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3373 (fbsd_handle_debug_trap): Remove target_ops parameter.
3374 (fbsd_nat_add_target): Delete.
3375 * fbsd-nat.h: Include "inf-ptrace.h".
3376 (fbsd_nat_add_target): Delete.
3377 (USE_SIGTRAP_SIGINFO): Define.
3378 (fbsd_nat_target): New class.
3380 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3381 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3382 (amd64bsd_target): Delete.
3383 * amd64-bsd-nat.h: New file.
3384 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3386 (amd64_fbsd_nat_target): New class.
3387 (the_amd64_fbsd_nat_target): New.
3388 (amd64fbsd_read_description): Refactor as method of
3389 amd64_fbsd_nat_target.
3390 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3391 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3392 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3393 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3394 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3395 (i386bsd_target): Delete.
3396 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3397 (i386bsd_fetch_inferior_registers)
3398 (i386bsd_store_inferior_registers): Declare.
3399 (i386_bsd_nat_target): New class.
3400 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3401 (the_i386_fbsd_nat_target): New.
3402 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3403 i386_fbsd_nat_target methods.
3404 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3405 (_initialize_i386fbsd_nat): Adjust to C++ification.
3406 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3407 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3408 (_initialize_x86_bsd_nat): Adjust to C++ification.
3409 * x86-bsd-nat.h: Include "x86-nat.h".
3410 (x86bsd_target): Delete declaration.
3411 (x86bsd_nat_target): New class.
3413 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3414 (the_aarch64_fbsd_nat_target): New.
3415 (aarch64_fbsd_fetch_inferior_registers)
3416 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3417 aarch64_fbsd_nat_target.
3418 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3419 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3420 (the_alpha_bsd_nat_target): New.
3421 (alphabsd_fetch_inferior_registers)
3422 (alphabsd_store_inferior_registers): Refactor as
3423 alpha_bsd_nat_target methods.
3424 (_initialize_alphabsd_nat): Refactor as methods of
3425 alpha_bsd_nat_target.
3426 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3427 (the_amd64_nbsd_nat_target): New.
3428 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3429 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3430 (the_amd64_obsd_nat_target): New.
3431 (_initialize_amd64obsd_nat): Adjust to C++ification.
3432 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3433 (the_arm_fbsd_nat_target): New.
3434 (arm_fbsd_fetch_inferior_registers)
3435 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3436 (_initialize_arm_fbsd_nat): Refactor as methods of
3437 arm_fbsd_nat_target.
3438 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3439 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3440 (the_arm_netbsd_nat_target): New.
3441 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3442 arm_netbsd_nat_target.
3443 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3444 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3445 (the_hppa_nbsd_nat_target): New.
3446 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3447 hppa_nbsd_nat_target methods.
3448 (_initialize_hppanbsd_nat): Adjust to C++ification.
3449 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3450 (the_hppa_obsd_nat_target): New.
3451 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3452 methods of hppa_obsd_nat_target.
3453 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3455 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3456 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3458 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3459 (_initialize_i386obsd_nat): Use add_target.
3460 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3461 (the_m68k_bsd_nat_target): New.
3462 (m68kbsd_fetch_inferior_registers)
3463 (m68kbsd_store_inferior_registers): Refactor as methods of
3464 m68k_bsd_nat_target.
3465 (_initialize_m68kbsd_nat): Adjust to C++ification.
3466 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3467 (the_mips_fbsd_nat_target): New.
3468 (mips_fbsd_fetch_inferior_registers)
3469 (mips_fbsd_store_inferior_registers): Refactor as methods of
3470 mips_fbsd_nat_target.
3471 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3473 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3474 (the_mips_nbsd_nat_target): New.
3475 (mipsnbsd_fetch_inferior_registers)
3476 (mipsnbsd_store_inferior_registers): Refactor as methods of
3477 mips_nbsd_nat_target.
3478 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3479 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3480 (the_mips64_obsd_nat_target): New.
3481 (mips64obsd_fetch_inferior_registers)
3482 (mips64obsd_store_inferior_registers): Refactor as methods of
3483 mips64_obsd_nat_target.
3484 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3486 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3488 * nbsd-nat.h: Include "inf-ptrace.h".
3489 (nbsd_nat_target): New class.
3490 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3491 (obsd_wait): Refactor as methods of obsd_nat_target.
3492 (obsd_add_target): Delete.
3493 * obsd-nat.h: Include "inf-ptrace.h".
3494 (obsd_nat_target): New class.
3495 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3496 (the_ppc_fbsd_nat_target): New.
3497 (ppcfbsd_fetch_inferior_registers)
3498 (ppcfbsd_store_inferior_registers): Refactor as methods of
3499 ppc_fbsd_nat_target.
3500 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3502 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3503 (the_ppc_nbsd_nat_target): New.
3504 (ppcnbsd_fetch_inferior_registers)
3505 (ppcnbsd_store_inferior_registers): Refactor as methods of
3506 ppc_nbsd_nat_target.
3507 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3508 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3509 (the_ppc_obsd_nat_target): New.
3510 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3511 methods of ppc_obsd_nat_target.
3512 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3514 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3515 (the_sh_nbsd_nat_target): New.
3516 (shnbsd_fetch_inferior_registers)
3517 (shnbsd_store_inferior_registers): Refactor as methods of
3519 (_initialize_shnbsd_nat): Adjust to C++ification.
3520 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3521 (inf_ptrace_xfer_partial): Delete.
3522 (sparc_xfer_partial, sparc_target): Delete.
3523 * sparc-nat.h (sparc_fetch_inferior_registers)
3524 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3525 (sparc_target): Delete function declaration.
3526 (sparc_target): New template class.
3527 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3528 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3529 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3530 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3532 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3533 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3534 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3535 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3537 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3538 (the_vax_bsd_nat_target): New.
3539 (vaxbsd_fetch_inferior_registers)
3540 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3542 (_initialize_vaxbsd_nat): Adjust to C++ification.
3544 * bsd-kvm.c (bsd_kvm_target): New class.
3545 (bsd_kvm_ops): Now a bsd_kvm_target.
3546 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3547 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3548 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3550 (bsd_kvm_return_one): Delete.
3551 (bsd_kvm_add_target): Adjust to C++ification.
3553 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3554 (nto_procfs_target_procfs): New classes.
3555 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3556 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3557 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3558 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3559 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3560 (procfs_remove_hw_breakpoint, procfs_resume)
3561 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3562 (procfs_kill_inferior, procfs_store_registers)
3563 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3564 as methods of nto_procfs_target.
3565 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3566 (nto_native_ops): Delete.
3567 (procfs_open, procfs_native_open): Delete.
3568 (nto_native_ops): Now an nto_procfs_target_native.
3569 (init_procfs_targets): Adjust to C++ification.
3570 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3571 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3572 Refactor as methods of nto_procfs_target.
3574 * go32-nat.c (go32_nat_target): New class.
3575 (the_go32_nat_target): New.
3576 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3577 (go32_store_registers, go32_xfer_partial, go32_files_info)
3578 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3579 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3580 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3581 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3582 (go32_target): Delete.
3583 (_initialize_go32_nat): Adjust to C++ification.
3585 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3586 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3587 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3588 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3590 (gnu_target): Delete.
3591 * gnu-nat.h (gnu_target): Delete.
3592 (gnu_nat_target): New class.
3593 * i386-gnu-nat.c (gnu_base_target): New.
3594 (i386_gnu_nat_target): New class.
3595 (the_i386_gnu_nat_target): New.
3596 (_initialize_i386gnu_nat): Adjust to C++ification.
3598 2018-05-02 Pedro Alves <palves@redhat.com>
3600 * bfd-target.c (target_bfd_xclose): Rename to ...
3601 (target_bfd_close): ... this.
3602 (target_bfd_reopen): Adjust.
3603 * target.c (target_close): Remove references to to_xclose.
3604 * target.h (target_ops::to_xclose): Delete.
3605 (target_ops::to_close): Update comments.
3607 2018-05-02 Pedro Alves <palves@redhat.com>
3609 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3611 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3612 * inf-ptrace.c (inf_ptrace_register_u_offset)
3613 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3614 (inf_ptrace_store_register, inf_ptrace_store_registers)
3615 (inf_ptrace_trad_target): Move to ...
3616 * linux-nat-trad.c: ... this new file.
3617 * linux-nat-trad.h: New file.
3618 * linux-nat.c (linux_target_install_ops): Make extern.
3619 (linux_trad_target): Delete.
3620 * linux-nat.h (linux_trad_target): Delete declaration.
3621 (linux_target_install_ops): Declare.
3622 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3625 2018-05-02 Pedro Alves <palves@redhat.com>
3627 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3628 procfs_target/add_target here.
3629 * procfs.c (procfs_target): Make static.
3630 (_initialize_procfs): Call add_target here.
3631 * procfs.h (struct target_ops): Remove forward declaration.
3632 (procfs_target): Remove declaration.
3633 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3635 2018-05-02 Pedro Alves <palves@redhat.com>
3637 * procfs.c (procfs_stopped_by_watchpoint)
3638 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3639 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3641 (procfs_use_watchpoints): Delete, move contents...
3642 (procfs_target): ... here.
3643 * procfs.h (procfs_use_watchpoints): Delete declaration.
3644 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3645 procfs_use_watchpoints.
3646 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3647 procfs_use_watchpoints.
3649 2018-05-02 Tom Tromey <tom@tromey.com>
3652 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3653 and var_zuinteger_unlimited.
3654 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3655 and PARAM_ZUINTEGER_UNLIMITED.
3656 (set_parameter_value): Handle var_zuinteger and
3657 var_zuinteger_unlimited.
3658 (add_setshow_generic): Likewise.
3659 (parmpy_init): Likewise.
3661 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3664 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3665 pointer is not null before dereferencing it.
3667 2018-04-30 Tom Tromey <tom@tromey.com>
3669 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3672 2018-04-30 Tom Tromey <tom@tromey.com>
3674 * breakpoint.c (mention): Remove use of is_mi_like_p.
3675 (print_mention_ranged_breakpoint): Likewise.
3676 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3679 2018-04-30 Tom Tromey <tom@tromey.com>
3681 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3683 2018-04-30 Tom Tromey <tom@tromey.com>
3685 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3686 (info_spu_event_command): Remove some uses of is_mi_like_p.
3688 2018-04-30 Tom Tromey <tom@tromey.com>
3690 * python/py-framefilter.c (py_print_single_arg)
3691 (enumerate_locals, py_print_args, py_print_frame): Remove some
3692 uses of is_mi_like_p.
3694 2018-04-30 Tom Tromey <tom@tromey.com>
3697 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3698 * ui-out.h (ui_out::is_mi_like_p): Now const.
3699 (ui_out::do_is_mi_like_p): Now const.
3700 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3702 2018-04-30 Tom Tromey <tom@tromey.com>
3704 * varobj.c (varobj_set_visualizer): Use new_reference.
3705 * python/python.c (gdbpy_decode_line): Use new_reference.
3706 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3709 2018-04-30 Tom Tromey <tom@tromey.com>
3711 * varobj.c (install_new_value): Use new_reference.
3712 * value.h (value_incref): Return void. Swap intro comment with
3714 * value.c (set_value_parent): Use new_reference.
3715 (value_incref): Return void. Update intro comment.
3716 (release_value): Use new_reference.
3717 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3719 2018-04-30 Tom Tromey <tom@tromey.com>
3721 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3722 * gdb_bfd.h (new_bfd_ref): Remove.
3723 (gdb_bfd_open): Update comment.
3724 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3725 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3726 (gdb_bfd_fdopenr): Use new_reference.
3727 * exec.c (exec_file_attach): Use new_reference.
3729 2018-04-30 Tom Tromey <tom@tromey.com>
3731 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3734 2018-04-30 Tom Tromey <tom@tromey.com>
3736 * jit.c (jit_read_code_entry): Use type_align.
3737 * i386-tdep.c (i386_gdbarch_init): Don't call
3738 set_gdbarch_long_long_align_bit.
3739 * gdbarch.sh: Remove long_long_align_bit.
3740 * gdbarch.c, gdbarch.h: Rebuild.
3741 * arc-tdep.c (arc_type_align): New function.
3742 (arc_gdbarch_init): Use arc_type_align. Don't call
3743 set_gdbarch_long_long_align_bit.
3745 2018-04-30 Tom Tromey <tom@tromey.com>
3747 * rust-lang.c (rust_type_alignment): Remove.
3748 (rust_composite_type): Use type_align.
3750 2018-04-30 Tom Tromey <tom@tromey.com>
3752 * NEWS: Mention Type.align.
3753 * python/py-type.c (typy_get_alignof): New function.
3754 (type_object_getset): Add "alignof".
3756 2018-04-30 Tom Tromey <tom@tromey.com>
3760 * std-operator.def (UNOP_ALIGNOF): New operator.
3761 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3763 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3764 * c-lang.c (c_op_print_tab): Add alignof.
3765 * c-exp.y (ALIGNOF): New token.
3766 (exp): Add "ALIGNOF" production.
3767 (ident_tokens): Add _Alignof and alignof.
3769 2018-04-30 Tom Tromey <tom@tromey.com>
3771 * i386-tdep.c (i386_type_align): New function.
3772 (i386_gdbarch_init): Update.
3773 * gdbarch.sh (type_align): New method.
3774 * gdbarch.c, gdbarch.h: Rebuild.
3775 * arch-utils.h (default_type_align): Declare.
3776 * arch-utils.c (default_type_align): New function.
3777 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3778 (struct type) <align_log2>: New field.
3779 <instance_flags>: Now a bitfield.
3780 (TYPE_RAW_ALIGN): New macro.
3781 (type_align, type_raw_align, set_type_align): Declare.
3782 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3784 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3785 (get_alignment, maybe_set_alignment): New functions.
3786 (read_structure_type, read_enumeration_type, read_array_type)
3787 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3788 (read_subrange_type, read_base_type): Set type alignment.
3790 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3792 * dwarf2read.c (read_index_from_section): Use bool.
3794 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3797 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3800 2018-04-29 John Reiser <jreiser@BitWagon.com>
3803 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3804 last step, and do it atomically.
3806 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3808 * compile/compile-c-types.c (convert_int, convert_float):
3811 2018-04-27 Tom Tromey <tom@tromey.com>
3814 * rust-lang.c (rust_inclusive_range_type_p): New function.
3815 (rust_range): Handle inclusive ranges.
3816 (rust_compute_range): Likewise.
3817 * rust-exp.y (struct rust_op) <inclusive>: New field.
3818 (DOTDOTEQ): New constant.
3819 (range_expr): Add "..=" productions.
3820 (operator_tokens): Add "..=" token.
3821 (ast_range): Add "inclusive" parameter.
3822 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3824 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3826 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3827 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3829 * expprint.c (print_subexp_standard): Handle new bounds values.
3830 (dump_subexp_body_standard): Likewise.
3832 2018-04-27 Tom Tromey <tom@tromey.com>
3834 * configure: Rebuild.
3835 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3836 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3838 (class symbol_needs_eval_context): Likewise.
3839 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3840 (mock_mapped_index::symbol_name_at): Use "override". Remove
3842 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3844 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3845 * aarch64-tdep.c (instruction_reader::read): Use "override".
3846 (instruction_reader_test::read): Likewise.
3847 * arm-tdep.c (instruction_reader::read): Use "override".
3848 (instruction_reader_thumb::read): Likewise.
3850 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3853 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3854 instead of remote_send.
3855 (remote_send): Remove.
3857 2018-04-26 Pedro Alves <palves@redhat.com>
3859 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3860 find_function_start_sal instead of find_pc_line.
3862 2018-04-26 Pedro Alves <palves@redhat.com>
3864 * breakpoint.c (set_breakpoint_location_function): Handle
3866 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3867 * elfread.c (elf_symtab_read): Give data symbols with
3868 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3869 (elf_rel_plt_read): Update comment.
3870 * linespec.c (convert_linespec_to_sals): Handle
3872 (minsym_found): Handle mst_data_gnu_ifunc.
3873 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3874 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3875 * parse.c (find_minsym_type_and_address): Handle
3877 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3878 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3879 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3881 <mst_data_gnu_ifunc>: New enumerator.
3883 2018-04-26 Pedro Alves <palves@redhat.com>
3885 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3886 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3887 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3889 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3890 (lookup_minimal_symbol_by_pc): Adjust.
3891 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3892 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3893 * minsyms.h (lookup_msym_prefer): New enum.
3894 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3895 parameter by a lookup_msym_prefer parameter.
3897 2018-04-26 Pedro Alves <palves@redhat.com>
3899 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3900 ends in "@plt" instead of looking at the symbol's section.
3902 2018-04-26 Pedro Alves <palves@redhat.com>
3904 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3906 (find_pc_partial_function_gnu_ifunc): Rename to ...
3907 (find_pc_partial_function): ... this, and remove references to
3909 (find_pc_partial_function): Delete old implementation.
3910 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3912 2018-04-26 Pedro Alves <palves@redhat.com>
3914 * linespec.c (struct bound_minimal_symbol_search_key): New.
3915 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3916 skip first line if we found a GNU ifunc minimal symbol by name.
3917 (compare_msymbols): Change parameters to work with a destructured
3919 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3922 2018-04-26 Pedro Alves <palves@redhat.com>
3924 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3925 ifunc targets here. Instead, if we have an ifunc minsym, use its
3927 (add_location_to_breakpoint): Store the minsym and the objfile in
3928 the breakpoint location.
3929 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3930 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3931 Record the minsym in the sal.
3932 * symtab.h (symtab_and_line) <msymbol>: New field.
3934 2018-04-26 Pedro Alves <palves@redhat.com>
3936 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3937 unless we actually resolved the ifunc.
3939 2018-04-26 Pedro Alves <palves@redhat.com>
3941 * c-exp.y (variable production): Prefer ifunc minsyms over
3942 regular function symbols.
3943 * symtab.c (find_gnu_ifunc): New function.
3944 * minsyms.h (lookup_msym_prefer): New enum.
3945 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3946 parameter by a lookup_msym_prefer parameter.
3947 * symtab.h (find_gnu_ifunc): New declaration.
3949 2018-04-26 Pedro Alves <palves@redhat.com>
3951 * blockframe.c (find_gnu_ifunc_target_type): New function.
3952 (find_function_type): New.
3953 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3954 return a value with a memory address.
3955 (eval_call): For calls to GNU ifunc functions, try to find the
3956 type of the target function from the type that the resolver
3958 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3960 * infcall.c (find_function_return_type): Delete.
3961 (find_function_addr): Add 'function_type' parameter. For calls to
3962 GNU ifunc functions, try to find the type of the target function
3963 from the type that the resolver returns, and return it via
3965 (call_function_by_hand_dummy): Adjust to use the function type
3966 returned by find_function_addr.
3967 (find_function_addr): Add 'function_type' parameter and move
3969 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3972 2018-04-26 Pedro Alves <palves@redhat.com>
3974 * c-exp.y (variable production): Skip finding an alias for ifunc
3977 2018-04-26 Pedro Alves <palves@redhat.com>
3979 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3981 2018-04-25 Pedro Alves <palves@redhat.com>
3983 * infcmd.c (kill_command): Print the pid as string, not the whole
3984 thread's ptid. Add comment. s/has been killed/killed/ in output
3986 * remote.c (remote_detach_1): Print the pid as string, not the
3987 whole thread's ptid.
3989 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3990 Sergio Durigan Junior <sergiodj@redhat.com>
3991 Pedro Alves <palves@redhat.com>
3993 * infcmd.c (kill_command): Print message when inferior has
3995 * inferior.c (print_inferior_events): Remove 'static'. Set as
3997 (add_inferior): Improve message printed when
3998 'print_inferior_events' is on.
3999 (exit_inferior): Remove message printed when
4000 'print_inferior_events' is on.
4001 (detach_inferior): Improve message printed when
4002 'print_inferior_events' is on.
4003 (initialize_inferiors): Use 'add_inferior_silent' to set
4004 'current_inferior_'.
4005 * inferior.h (print_inferior_events): Declare here as
4007 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4008 '[Detaching...]' messages when 'print_inferior_events' is on.
4009 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4010 as prefix/suffix for messages. Remove periods. Fix erroneous
4011 'Detaching after fork from child...', replace it by '... from
4013 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4014 prefix/suffix when printing 'Detaching...' messages. Print
4015 them when 'print_inferior_events' is on.
4016 * remote.c (remote_detach_1): Print message when detaching
4017 from inferior and '!is_fork_parent'.
4019 2018-04-24 Tom Tromey <tom@tromey.com>
4021 * cli-out.h: Reindent.
4023 2018-04-24 Tom Tromey <tom@tromey.com>
4025 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4026 (cli_ui_out::do_field_string): Use fputs_filtered.
4027 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4029 2018-04-23 Tom Tromey <tom@tromey.com>
4031 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4032 gdb::unique_xmalloc_ptr.
4034 2018-04-23 Tom Tromey <tom@tromey.com>
4036 * configure: Rebuild.
4038 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4041 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4042 prepare_for_testing. Set normal_bp to r_debug_state if target
4045 2018-04-21 Pedro Alves <palves@redhat.com>
4046 Rajendra SY <rajendra.sy@gmail.com>
4048 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4049 * remote.c (extended_remote_attach): In all-stop mode, mark the
4050 thread as executing.
4052 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4054 * thread.c (thread_apply_all_command): Fix comment.
4055 (thread_command): Fix comment.
4057 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4059 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4061 * features/aarch64-core.c (create_feature_aarch64_core):
4063 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4065 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4067 * features/i386/32bit-avx512.c
4068 (create_feature_i386_32bit_avx512): Likewise.
4069 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4071 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4073 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4075 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4077 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4079 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4081 * features/i386/64bit-avx512.c
4082 (create_feature_i386_64bit_avx512): Likewise.
4083 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4085 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4087 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4089 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4091 * features/i386/64bit-segments.c
4092 (create_feature_i386_64bit_segments): Likewise.
4093 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4095 * features/i386/x32-core.c
4096 (create_feature_i386_x32_core): Likewise.
4097 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4098 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4099 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4100 * target-descriptions.c: In generated code, don't pass xml
4103 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4105 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4106 (print_xml_feature::visit_post): Likewise.
4107 (print_xml_feature::visit): Likewise.
4108 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4109 (print_xml_feature): Add new class.
4110 * regformats/regdat.sh: Null xmltarget on feature targets.
4111 * target-descriptions.c (struct target_desc): Add xmltarget.
4112 (maintenance_check_tdesc_xml_convert): Add unittest function.
4113 (tdesc_get_features_xml): Add function to get xml.
4114 (maintenance_check_xml_descriptions): Test xml generation.
4115 * xml-tdesc.c (string_read_description_xml): Add function.
4116 * xml-tdesc.h (string_read_description_xml): Add declaration.
4118 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4120 * features/Makefile: Add feature marker to targets with new style
4121 target descriptions.
4122 * regformats/aarch64.dat: Regenerate.
4123 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4124 * regformats/i386/amd64-avx-linux.dat: Likewise.
4125 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4126 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4127 * regformats/i386/amd64-linux.dat: Likewise.
4128 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4129 * regformats/i386/amd64.dat: Likewise.
4130 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4131 * regformats/i386/i386-avx-linux.dat: Likewise.
4132 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4133 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4134 * regformats/i386/i386-linux.dat: Likewise.
4135 * regformats/i386/i386-mmx-linux.dat: Likewise.
4136 * regformats/i386/i386-mpx-linux.dat: Likewise.
4137 * regformats/i386/i386.dat: Likewise.
4138 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4139 * regformats/i386/x32-avx-linux.dat: Likewise.
4140 * regformats/i386/x32-linux.dat: Likewise.
4141 * regformats/tic6x-c62x-linux.dat: Likewise.
4142 * regformats/tic6x-c64x-linux.dat: Likewise.
4143 * regformats/tic6x-c64xp-linux.dat: Likewise.
4144 * regformats/regdat.sh: Parse feature marker.
4146 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4148 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4149 (tdesc_osabi_name): Likewise.
4150 * target-descriptions.c (tdesc_architecture_name): Add new
4152 (tdesc_osabi_name): Likewise.
4154 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4156 * common/tdesc.c (tdesc_predefined_type): Move to here.
4157 (tdesc_named_type): Likewise.
4158 (tdesc_create_vector): Likewise.
4159 (tdesc_create_struct): Likewise.
4160 (tdesc_set_struct_size): Likewise.
4161 (tdesc_create_union): Likewise.
4162 (tdesc_create_flags): Likewise.
4163 (tdesc_create_enum): Likewise.
4164 (tdesc_add_field): Likewise.
4165 (tdesc_add_typed_bitfield): Likewise.
4166 (tdesc_add_bitfield): Likewise.
4167 (tdesc_add_flag): Likewise.
4168 (tdesc_add_enum_value): Likewise.
4169 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
4170 (struct tdesc_type_vector): Likewise.
4171 (struct tdesc_type_field): Likewise.
4172 (struct tdesc_type_with_fields): Likewise.
4173 (tdesc_create_enum): Add declaration.
4174 (tdesc_add_typed_bitfield): Likewise.
4175 (tdesc_add_enum_value): Likewise.
4176 * target-descriptions.c (tdesc_type_field): Move from here.
4177 (tdesc_type_builtin): Likewise.
4178 (tdesc_type_vector): Likewise.
4179 (tdesc_type_with_fields): Likewise.
4180 (tdesc_predefined_types): Likewise.
4181 (tdesc_named_type): Likewise.
4182 (tdesc_create_vector): Likewise.
4183 (tdesc_create_struct): Likewise.
4184 (tdesc_set_struct_size): Likewise.
4185 (tdesc_create_union): Likewise.
4186 (tdesc_create_flags): Likewise.
4187 (tdesc_create_enum): Likewise.
4188 (tdesc_add_field): Likewise.
4189 (tdesc_add_typed_bitfield): Likewise.
4190 (tdesc_add_bitfield): Likewise.
4191 (tdesc_add_flag): Likewise.
4192 (tdesc_add_enum_value): Likewise.
4193 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4194 (tdesc_add_typed_bitfield): Likewise.
4195 (tdesc_add_enum_value): Likewise.
4197 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4199 * common/tdesc.c (tdesc_feature::accept): Move to here.
4200 (tdesc_feature::operator==): Likewise.
4201 (tdesc_create_reg): Likewise.
4202 * common/tdesc.h (tdesc_type_kind): Likewise.
4203 (struct tdesc_type): Likewise.
4204 (struct tdesc_feature): Likewise.
4205 * regformats/regdat.sh: Create a feature.
4206 * target-descriptions.c (tdesc_type_kind): Move from here.
4207 (tdesc_type): Likewise.
4208 (tdesc_type_up): Likewise.
4209 (tdesc_feature): Likewise.
4210 (tdesc_create_reg): Likewise.
4212 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4214 * Makefile.in: Add arch/tdesc.c
4215 * common/tdesc.c: New file.
4216 * common/tdesc.h (tdesc_element_visitor): Move to here.
4217 (tdesc_element): Likewise.
4218 (tdesc_reg): Likewise.
4219 (tdesc_reg_up): Likewise.
4220 * regformats/regdef.h (reg): Add offset to constructors.
4221 * target-descriptions.c (tdesc_element_visitor): Move from here.
4222 (tdesc_element): Likewise.
4223 (tdesc_reg): Likewise.
4224 (tdesc_reg_up): Likewise.
4226 2018-04-17 Tom Tromey <tom@tromey.com>
4228 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4231 2018-04-17 Tom Tromey <tom@tromey.com>
4233 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4235 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
4237 * symtab.c (print_symbol_info): Skip printing filename and line
4238 number when `last' is NULL.
4239 (symtab_symbol_info): Use empty string instead of NULL for first
4240 invocation of print_symbol_info.
4241 (rbreak_command): Pass NULL to `last' parameter of
4244 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
4246 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4249 2018-04-16 Pedro Alves <palves@redhat.com>
4251 * MAINTAINERS (sh): Remove.
4252 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4253 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4254 (ALLDEPFILES): Remove sh64-tdep.c.
4255 * NEWS: Mentions that support for SH-5/SH64 is removed.
4256 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4257 (sh*-*-openbsd*): Ditto.
4258 (sh64-*-elf*): Remove.
4260 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4261 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4262 * sh-tdep.c: No longer include "sh64-tdep.h".
4263 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4264 * sh64-tdep.c, sh64-tdep.h: Remove files.
4266 2018-04-16 Pedro Alves <palves@redhat.com>
4268 * MAINTAINERS: Remove m88k.
4269 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4270 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4271 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4272 * NEWS: Mention that support for m88k was removed.
4273 * configure.host (m88*-*-*): Remove support.
4274 * configure.nat (m88k-*-*): Remove support.
4275 * configure.tgt (m88*-*-openbsd*): Remove.
4276 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
4278 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
4280 * configure.tgt (x86_tobjs): New variable.
4281 (amd64_tobjs, i386_tobjs): Use it.
4283 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4285 * symtab.c (print_symbol_info): Precede the symbol definition by
4286 the line number when available.
4287 * NEWS: Advertise this enhancement.
4289 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4291 * NEWS (New options): announce set/show record btrace cpu.
4292 * btrace.c: Include record-btrace.h.
4293 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4294 the vendor is unknown.
4295 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
4296 Maybe overwrite the btrace configuration's cpu.
4297 (btrace_compute_ftrace): Add cpu parameter. Update callers.
4298 (btrace_fetch): Add cpu parameter. Update callers.
4299 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4300 Maybe overwrite the btrace configuration's cpu. Skip enabling
4301 errata workarounds if the vendor is unknown.
4302 * python/py-record-btrace.c: Include record-btrace.h.
4303 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4304 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4305 * record-btrace.c (record_btrace_cpu_state_kind): New.
4306 (record_btrace_cpu): New.
4307 (set_record_btrace_cpu_cmdlist): New.
4308 (record_btrace_get_cpu): New.
4309 (require_btrace_thread, record_btrace_info)
4310 (record_btrace_resume_thread): Call record_btrace_get_cpu.
4311 (cmd_set_record_btrace_cpu_none): New.
4312 (cmd_set_record_btrace_cpu_auto): New.
4313 (cmd_set_record_btrace_cpu): New.
4314 (cmd_show_record_btrace_cpu): New.
4315 (_initialize_record_btrace): Initialize set/show record btrace cpu
4317 * record-btrace.h (record_btrace_get_cpu): New.
4319 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4321 * record.c (set_record_command): Fix typo in message.
4323 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4325 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4327 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4329 * infrun.c (process_event_stop_test): Call
4330 gdbarch_in_indirect_branch_thunk.
4331 * gdbarch.sh (in_indirect_branch_thunk): New.
4332 * gdbarch.c: Regenerated.
4333 * gdbarch.h: Regenerated.
4336 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
4337 (HFILES_NO_SRCDIR): Add x86-tdep.h.
4338 (ALLDEPFILES): Add x86-tdep.c.
4339 * arch-utils.h (default_in_indirect_branch_thunk): New.
4340 * arch-utils.c (default_in_indirect_branch_thunk): New.
4341 * i386-tdep: Include x86-tdep.h.
4342 (i386_in_indirect_branch_thunk): New.
4343 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
4345 * amd64-tdep: Include x86-tdep.h.
4346 (amd64_in_indirect_branch_thunk): New.
4347 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
4349 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4352 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
4353 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
4354 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4357 2018-04-12 Tom Tromey <tom@tromey.com>
4359 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4360 (rust_evaluate_subexp): Likewise.
4362 2018-04-12 Pedro Alves <palves@redhat.com>
4364 * procfs.c (procfs_detach): Make forward declaration's prototype
4365 match definition's protototype.
4366 (proc_get_LDT_entry): Remove stale do_cleanups call.
4368 2018-04-12 Pedro Alves <palves@redhat.com>
4370 * target.h (target_ops::to_has_exited): Delete.
4371 (target_has_exited): Delete.
4372 * target-delegates.c: Regenerate.
4374 2018-04-11 Pedro Alves <palves@redhat.com>
4376 * target.c (fileio_fh_t::t): Add comment.
4377 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4378 (target_fileio_close): Handle a NULL target.
4379 (invalidate_fileio_fh): New.
4380 (target_close): Call it.
4381 * remote.c (remote_hostio_send_command): No longer check whether
4382 remote_desc is open.
4384 2018-04-11 Pedro Alves <palves@redhat.com>
4386 * target.c (fileio_fh_t): Make it a named struct instead of a
4388 (fileio_fh_t::is_closed): New method.
4389 (DEF_VEC_O (fileio_fh_t)): Remove.
4390 (fileio_fhandles): Now a std::vector.
4391 (is_closed_fileio_fh): Delete.
4392 (acquire_fileio_fd): Adjust. Rename parameters.
4393 (release_fileio_fd): Adjust.
4394 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4395 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4396 (target_fileio_close): Adjust.
4398 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4400 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4403 2018-04-10 Pedro Alves <palves@redhat.com>
4405 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4406 (scoped_finish_thread_state): New class.
4407 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4409 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4410 (fetch_inferior_event, normal_stop): Likewise.
4411 * thread.c (finish_thread_state_cleanup): Delete.
4413 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4414 Pedro Alves <palves@redhat.com>
4416 * value.c: Include "selftest.h" and "common/array-view.h".
4417 (struct range) <operator ==>: New.
4418 (test_ranges_contain): New.
4419 (check_ranges_vector): New.
4420 (test_insert_into_bit_range_vector): New.
4421 (_initialize_values): Register selftests.
4422 * common/array-view.h (operator==, operator!=): New.
4424 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4426 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4428 * inline-frame.c: Include <algorithm>.
4429 (struct inline_state): Add constructor.
4430 (inline_state_s): Remove.
4431 (DEF_VEC_O(inline_state_s)): Remove.
4432 (inline_states): Change type to std::vector.
4433 (find_inline_frame_state): Adjust to std::vector.
4434 (allocate_inline_frame_state): Remove.
4435 (clear_inline_frame_state): Adjust to std::vector.
4436 (skip_inline_frames): Adjust to std::vector.
4438 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4440 * tracepoint.h (struct trace_state_variable): Add constructor.
4441 <name>: Change type to std::string.
4442 * tracepoint.c (tsv_s): Remove.
4443 (DEF_VEC_O(tsv_s)): Remove.
4444 (tvariables): Change to std::vector.
4445 (create_trace_state_variable): Adjust to std::vector.
4446 (find_trace_state_variable): Likewise.
4447 (find_trace_state_variable_by_number): Likewise.
4448 (delete_trace_state_variable): Likewise.
4449 (trace_variable_command): Adjust to std::string.
4450 (delete_trace_variable_command): Likewise.
4451 (tvariables_info_1): Adjust to std::vector.
4452 (save_trace_state_variables): Likewise.
4453 (start_tracing): Likewise.
4454 (merge_uploaded_trace_state_variables): Adjust to std::vector
4456 * target.h (struct target_ops)
4457 <to_download_trace_state_variable>: Pass reference to
4458 trace_state_variable.
4459 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4460 * target-delegates.c: Re-generate.
4461 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4462 (mi_tsv_deleted): Likewise.
4463 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4464 * remote.c (remote_download_trace_state_variable): Change
4465 pointer to reference and adjust.
4466 * make-target-delegates (parse_argtypes): Handle references.
4467 (write_function_header): Likewise.
4468 (munge_type): Likewise.
4470 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4472 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4473 string_view-selftests.c.
4474 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4476 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4477 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4478 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4479 * unittests/basic_string_view/element_access/char/1.cc:
4481 * unittests/basic_string_view/element_access/char/empty.cc:
4483 * unittests/basic_string_view/element_access/char/front_back.cc:
4485 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4486 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4488 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4490 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4492 * unittests/basic_string_view/operations/compare/char/1.cc:
4494 * unittests/basic_string_view/operations/compare/char/13650.cc:
4496 * unittests/basic_string_view/operations/copy/char/1.cc:
4498 * unittests/basic_string_view/operations/data/char/1.cc:
4500 * unittests/basic_string_view/operations/find/char/1.cc:
4502 * unittests/basic_string_view/operations/find/char/2.cc:
4504 * unittests/basic_string_view/operations/find/char/3.cc:
4506 * unittests/basic_string_view/operations/find/char/4.cc:
4508 * unittests/basic_string_view/operations/rfind/char/1.cc:
4510 * unittests/basic_string_view/operations/rfind/char/2.cc:
4512 * unittests/basic_string_view/operations/rfind/char/3.cc:
4514 * unittests/basic_string_view/operations/substr/char/1.cc:
4516 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4517 * unittests/string_view-selftests.c: New file.
4519 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4521 * unittests/basic_string_view/capacity/1.cc: New file.
4522 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4523 * unittests/basic_string_view/cons/char/1.cc: New file.
4524 * unittests/basic_string_view/cons/char/2.cc: New file.
4525 * unittests/basic_string_view/cons/char/3.cc: New file.
4526 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4527 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4528 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4529 * unittests/basic_string_view/element_access/char/1.cc: New file.
4530 * unittests/basic_string_view/element_access/char/2.cc: New file.
4531 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4532 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4533 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4534 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4535 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4536 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4537 * unittests/basic_string_view/include.cc: New file.
4538 * unittests/basic_string_view/inserters/char/1.cc: New file.
4539 * unittests/basic_string_view/inserters/char/2.cc: New file.
4540 * unittests/basic_string_view/inserters/char/3.cc: New file.
4541 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4542 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4543 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4544 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4545 * unittests/basic_string_view/literals/types.cc: New file.
4546 * unittests/basic_string_view/literals/values.cc: New file.
4547 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4548 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4549 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4550 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4551 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4552 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4553 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4554 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4555 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4556 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4557 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4558 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4559 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4560 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4561 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4562 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4563 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4564 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4565 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4566 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4567 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4568 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4569 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4570 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4571 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4572 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4573 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4574 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4575 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4576 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4577 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4578 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4579 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4580 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4581 * unittests/basic_string_view/operators/char/2.cc: New file.
4582 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4583 * unittests/basic_string_view/range_access/char/1.cc: New file.
4584 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4585 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4586 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4587 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4588 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4589 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4590 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4591 * unittests/basic_string_view/typedefs.cc: New file.
4592 * unittests/basic_string_view/types/1.cc: New file.
4594 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4596 * common/gdb_string_view.h: Remove libstdc++ implementation
4597 details, adjust to gdb reality.
4598 * common/gdb_string_view.tcc: Likewise.
4599 * cli/cli-script.c (struct string_view): Remove.
4600 (user_args) <m_args>: Change element type to gdb::string_view.
4601 (user_args::insert_args): Adjust.
4603 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4605 * common/gdb_string_view.h: New file.
4606 * common/gdb_string_view.tcc: New file.
4608 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4610 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4611 * configure: Re-generate.
4613 2018-04-09 Pedro Alves <palves@redhat.com>
4615 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4616 (set_target_gdbarch): Call
4617 gdb::observers::architecture_changed.notify instead of
4618 observer_notify_architecture_changed.
4620 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4622 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4623 (do_restore_current_traceframe_cleanup): Remove.
4624 (restore_current_traceframe_cleanup_dtor): Remove.
4625 (make_cleanup_restore_current_traceframe): Remove.
4626 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4628 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4629 * infrun.c (fetch_inferior_event): Use
4630 scoped_restore_current_traceframe.
4632 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4634 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4636 <n_allocated_type_units>: Remove.
4637 <all_type_units>: Change to std::vector.
4638 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4639 to std::vector change.
4640 (dwarf2_per_objfile::get_cutu): Likewise.
4641 (dwarf2_per_objfile::get_tu): Likewise.
4642 (create_signatured_type_table_from_index): Likewise.
4643 (create_signatured_type_table_from_debug_names): Likewise.
4644 (dw2_symtab_iter_next): Likewise.
4645 (dw2_print_stats): Likewise.
4646 (dw2_expand_all_symtabs): Likewise.
4647 (dw2_expand_marked_cus): Likewise.
4648 (dw2_debug_names_iterator::next): Likewise.
4649 (dwarf2_initialize_objfile): Likewise.
4650 (add_signatured_type_cu_to_table): Likewise.
4651 (create_all_type_units): Likewise.
4652 (add_type_unit): Likewise.
4653 (struct tu_abbrev_offset): Add constructor.
4654 (build_type_psymtabs_1): Adjust to std::vector change.
4655 (print_tu_stats): Likewise.
4656 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4657 (write_debug_names): Likewise.
4659 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4661 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4662 Make an std::vector.
4663 <n_comp_units>: Remove.
4664 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4665 to std::vector change.
4666 (dwarf2_per_objfile::get_cutu): Likewise.
4667 (dwarf2_per_objfile::get_cu): Likewise.
4668 (create_cus_from_index): Likewise.
4669 (create_addrmap_from_index): Likewise.
4670 (create_addrmap_from_aranges): Likewise.
4671 (dwarf2_read_index): Likewise.
4672 (dw2_find_last_source_symtab): Likewise.
4673 (dw2_map_symtabs_matching_filename): Likewise.
4674 (dw2_symtab_iter_next): Likewise.
4675 (dw2_print_stats): Likewise.
4676 (dw2_expand_all_symtabs): Likewise.
4677 (dw2_expand_symtabs_with_fullname): Likewise.
4678 (dw2_expand_marked_cus): Likewise.
4679 (dw2_map_symbol_filenames): Likewise.
4680 (create_cus_from_debug_names): Likewise.
4681 (dwarf2_read_debug_names): Likewise.
4682 (dw2_debug_names_iterator::next): Likewise.
4683 (dwarf2_initialize_objfile): Likewise.
4684 (set_partial_user): Likewise.
4685 (dwarf2_build_psymtabs_hard): Likewise.
4686 (read_comp_units_from_section): Remove arguments, adjust to
4688 (create_all_comp_units): Adjust to std::vector and
4689 read_comp_units_from_section changes.
4690 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4692 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4693 (psyms_seen_size): Likewise.
4694 (write_gdbindex): Likewise.
4695 (write_debug_names): Likewise.
4697 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4699 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4700 with dwarf2_per_objfile.
4701 (create_cus_from_index): Likewise.
4702 (create_signatured_type_table_from_index): Likewise.
4703 (dwarf2_read_index): Likewise.
4704 (dwarf2_initialize_objfile): Likewise.
4705 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4706 per_cu rather than get_dwarf2_per_objfile.
4708 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4710 * dwarf2read.h (struct signatured_type): Forward declare.
4711 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4713 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4714 (dw2_get_cutu): ...this.
4715 (dwarf2_per_objfile::get_cu): Rename from...
4716 (dw2_get_cu): ...this.
4717 (dwarf2_per_objfile::get_tu): New.
4718 (create_addrmap_from_index): Adjust.
4719 (create_addrmap_from_aranges): Adjust.
4720 (dw2_find_last_source_symtab): Adjust.
4721 (dw2_map_symtabs_matching_filename): Adjust.
4722 (dw2_symtab_iter_next): Adjust.
4723 (dw2_print_stats): Adjust.
4724 (dw2_expand_all_symtabs): Adjust.
4725 (dw2_expand_symtabs_with_fullname): Adjust.
4726 (dw2_expand_marked_cus): Adjust.
4727 (dw_expand_symtabs_matching_file_matcher): Adjust.
4728 (dw2_map_symbol_filenames): Adjust.
4729 (dw2_debug_names_iterator::next): Adjust.
4730 (dwarf2_initialize_objfile): Adjust.
4731 (set_partial_user): Adjust.
4732 (dwarf2_build_psymtabs_hard): Adjust.
4734 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4736 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4737 Remove unused variables.
4738 (dw2_map_symtabs_matching_filename): Likewise.
4739 (dwarf2_record_block_ranges): Likewise.
4740 (dwarf2_read_addr_index): Likewise.
4741 (follow_die_offset): Likewise.
4743 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4745 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4746 to symbol_file_add_main.
4748 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4751 * mi/mi-console.c (do_fputc_async_safe): New.
4752 (mi_console_file::write_async_safe): New.
4753 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4754 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4756 * ui-file.c (ui_file::putstrn): Adjust call to
4757 fputstrn_unfiltered.
4758 * utils.c (printchar): Replace do_fputs and do_fprintf
4759 parameters by do_fputc.
4760 (fputstr_filtered): Adjust call to printchar.
4761 (fputstr_unfiltered): Likewise.
4762 (fputstrn_filtered): Likewise.
4763 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4765 * utils.h (do_fputc_ftype): New typedef.
4766 (fputstrn_unfiltered): Add do_fputc parameter.
4768 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4770 * regformats/i386/i386-avx.dat: Remove.
4772 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4775 * amd64-tdep.c (amd64_none_init_abi): New function.
4776 (amd64_x32_none_init_abi): New function.
4777 (_initialize_amd64_tdep): Register handlers for x86-64 and
4778 x64_32 with GDB_OSABI_NONE.
4779 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4780 GDB_OSABI_NONE osabi.
4782 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4785 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4787 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4788 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4790 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4792 * common/byte-vector.h (char_vector): New type.
4793 * target.h (target_read_alloc): Return
4794 gdb::optional<byte_vector>.
4795 (target_read_stralloc): Return gdb::optional<char_vector>.
4796 (target_get_osdata): Return gdb::optional<char_vector>.
4797 * target.c (target_read_alloc_1): Templatize. Replacement
4798 manual memory management with vector.
4799 (target_read_alloc): Change return type, adjust.
4800 (target_read_stralloc): Change return type, adjust.
4801 (target_get_osdata): Change return type, adjust.
4802 * auxv.c (struct auxv_info) <length>: Remove.
4803 <data>: Change type to gdb::optional<byte_vector>.
4804 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4805 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4806 (target_auxv_search): Adjust.
4807 (fprint_target_auxv): Adjust.
4808 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4809 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4810 (linux_make_corefile_notes): Adjust.
4811 * osdata.c (get_osdata): Adjust.
4812 * remote.c (remote_get_threads_with_qxfer): Adjust.
4813 (remote_memory_map): Adjust.
4814 (remote_traceframe_info): Adjust.
4815 (btrace_read_config): Adjust.
4816 (remote_read_btrace): Adjust.
4817 (remote_pid_to_exec_file): Adjust.
4818 * solib-aix.c (solib_aix_get_library_list): Adjust.
4819 * solib-dsbt.c (decode_loadmap): Don't free buf.
4820 (dsbt_get_initial_loadmaps): Adjust.
4821 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4822 * solib-target.c (solib_target_current_sos): Adjust.
4823 * tracepoint.c (sdata_make_value): Adjust.
4824 * xml-support.c (xinclude_start_include): Adjust.
4825 (xml_fetch_content_from_file): Adjust.
4826 * xml-support.h (xml_fetch_another): Change return type.
4827 (xml_fetch_content_from_file): Change return type.
4828 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4829 * xml-tdesc.c (file_read_description_xml): Adjust.
4830 (fetch_available_features_from_target): Change return type.
4831 (target_fetch_description_xml): Adjust.
4832 (target_read_description_xml): Adjust.
4834 2018-04-06 Tom Tromey <tom@tromey.com>
4836 * value.c (~value): Update.
4837 (struct value) <contents>: Now unique_xmalloc_ptr.
4838 (value_contents_bits_eq, allocate_value_contents)
4839 (value_contents_raw, value_contents_all_raw)
4840 (value_contents_for_printing, value_contents_for_printing_const)
4841 (set_value_enclosing_type): Update.
4843 2018-04-06 Tom Tromey <tom@tromey.com>
4845 * value.c (range_s): Remove typedef, VEC.
4846 (struct range): Add operator<.
4847 (range_lessthan): Remove.
4848 (ranges_contain): Change type.
4850 (struct value) <unavailable, optimized_out>: Now std::vector.
4851 (value_entirely_available)
4852 (value_entirely_covered_by_range_vector)
4853 (value_entirely_unavailable, value_entirely_optimized_out):
4855 (insert_into_bit_range_vector): Change argument type.
4856 (find_first_range_overlap): Likewise.
4857 (struct ranges_and_idx, value_contents_bits_eq)
4858 (require_not_optimized_out, require_available): Update.
4859 (ranges_copy_adjusted): Change argument types.
4860 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4862 2018-04-06 Tom Tromey <tom@tromey.com>
4864 * value.c (~value): Update.
4865 (struct value) <parent>: Now a value_ref_ptr.
4866 (value_parent, set_value_parent, value_address, value_copy):
4869 2018-04-06 Tom Tromey <tom@tromey.com>
4871 * value.c (struct value): Add constructor, destructor, and member
4873 (allocate_value_lazy, value_decref): Update.
4875 2018-04-06 Tom Tromey <tom@tromey.com>
4877 * value.c (struct value) <released, next>: Remove.
4878 (all_values): Now a std::vector.
4879 (allocate_value_lazy): Update.
4880 (value_next): Remove.
4881 (value_mark, value_free_to_mark, release_value)
4882 (value_release_to_mark): Update.
4884 2018-04-06 Tom Tromey <tom@tromey.com>
4886 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4887 (free_value_chain): Remove.
4888 * value.c (free_value_chain): Remove.
4889 (value_release_to_mark): Return a std::vector.
4890 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4892 (check_condition): Update.
4893 * eval.c (fetch_subexp_value): Change "val_chain" to a
4895 * breakpoint.c (update_watchpoint): Update.
4896 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4898 2018-04-06 Tom Tromey <tom@tromey.com>
4900 * value.h (free_all_values): Remove.
4901 * value.c (free_all_values): Remove.
4903 2018-04-06 Tom Tromey <tom@tromey.com>
4905 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4906 (value_history_chain, value_history_count): Remove.
4907 (value_history): New global.
4908 (record_latest_value, access_value_history, show_values)
4909 (preserve_values): Update.
4911 2018-04-06 Tom Tromey <tom@tromey.com>
4913 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4914 * varobj.c (varobj_set_display_format, varobj_set_value)
4915 (install_default_visualizer, construct_visualizer)
4916 (install_new_value, ~varobj, varobj_get_value_type)
4917 (my_value_of_variable, varobj_editable_p): Update.
4918 * c-varobj.c (c_describe_child, c_value_of_variable)
4919 (cplus_number_of_children, cplus_describe_child): Update.
4920 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4921 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4922 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4924 2018-04-06 Tom Tromey <tom@tromey.com>
4926 * printcmd.c (last_examine_address): Change type to
4928 (do_examine, x_command): Update.
4930 2018-04-06 Tom Tromey <tom@tromey.com>
4932 * value.c (release_value): Update.
4933 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4934 (struct bpstats) <val>: Now a value_ref_ptr.
4935 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4936 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4937 (~watchpoint, print_it_watchpoint, watch_command_1)
4938 (invalidate_bp_value_on_memory_change): Update.
4940 2018-04-06 Tom Tromey <tom@tromey.com>
4942 * varobj.c (varobj_clear_saved_item)
4943 (update_dynamic_varobj_children, install_new_value, ~varobj):
4945 * value.h (value_incref): Move declaration earlier.
4946 (value_decref): Rename from value_free.
4947 (struct value_ref_policy): New.
4948 (value_ref_ptr): New typedef.
4949 (struct value_deleter): Remove.
4950 (gdb_value_up): Remove typedef.
4951 (release_value): Change return type.
4952 (release_value_or_incref): Remove.
4953 * value.c (set_value_parent): Update.
4954 (value_incref): Change return type.
4955 (value_decref): Rename from value_free.
4956 (value_free_to_mark, free_all_values, free_value_chain): Update.
4957 (release_value): Return value_ref_ptr.
4958 (release_value_or_incref): Remove.
4959 (record_latest_value, set_internalvar, clear_internalvar):
4961 * stack.c (info_frame_command): Don't call value_free.
4962 * python/py-value.c (valpy_dealloc, valpy_new)
4963 (value_to_value_object): Update.
4964 * printcmd.c (do_examine): Update.
4965 * opencl-lang.c (lval_func_free_closure): Update.
4966 * mi/mi-main.c (register_changed_p): Don't call value_free.
4967 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4968 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4969 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4971 * guile/scm-value.c (vlscm_free_value_smob)
4972 (vlscm_scm_from_value): Update.
4973 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4974 (frame_unwind_register_unsigned, get_frame_register_bytes)
4975 (put_frame_register_bytes): Don't call value_free.
4976 * findvar.c (address_from_register): Don't call value_free.
4977 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4978 * dwarf2loc.c (entry_data_value_free_closure)
4979 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4980 (dwarf2_evaluate_loc_desc_full): Update.
4981 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4982 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4983 (~watchpoint, watch_command_1)
4984 (invalidate_bp_value_on_memory_change): Update.
4985 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4987 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4990 * warning.m4: Add -Wno-error=deprecated-register.
4991 * configure: Re-generate.
4993 2018-04-05 Tom Tromey <tom@tromey.com>
4995 * linespec.h: Remove include of "vec.h".
4997 2018-04-05 Tom Tromey <tom@tromey.com>
4999 * linespec.c (typep): Remove typedef.
5000 (find_methods, find_superclass_methods): Take a std::vector.
5001 (find_method): Use std::vector.
5003 2018-04-05 Tom Tromey <tom@tromey.com>
5005 * utils.c (compare_strings): Remove.
5006 * utils.h (compare_strings): Remove.
5007 * objc-lang.h (find_imps): Update.
5008 * objc-lang.c (find_methods): Take a std::vector.
5009 (uniquify_strings, find_imps): Likewise.
5010 * linespec.c (find_methods): Take a std::vector.
5011 (decode_objc): Use std::vector.
5012 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5014 (find_method, find_function_symbols): Use std::vector.
5016 2018-04-05 Tom Tromey <tom@tromey.com>
5018 * completer.c (completion_tracker::completion_tracker): Remove
5020 (completion_tracker::discard_completions): Likewise.
5021 * breakpoint.c (ambiguous_names_p): Remove cast.
5022 * ada-lang.c (_initialize_ada_language): Remove cast.
5023 * utils.h (streq): Update.
5024 (streq_hash): Add new declaration.
5025 * utils.c (streq): Return bool.
5026 (streq_hash): New function.
5028 2018-04-05 Tom Tromey <tom@tromey.com>
5030 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5031 Remove a string copy.
5033 2018-04-05 Tom Tromey <tom@tromey.com>
5035 * linespec.c (filter_results): Use std::vector.
5036 (decode_line_2, decode_line_full): Update.
5038 2018-04-05 Tom Tromey <tom@tromey.com>
5040 * linespec.c (canonical_to_fullform): Return std::string.
5041 (filter_results): Update.
5042 (struct decode_line_2_item): Add constructor.
5043 <fullform, displayform>: Now std::string.
5044 (decode_line_2_compare_items): Now a std::sort comparator.
5045 (decode_line_2): Update.
5047 2018-04-05 Tom Tromey <tom@tromey.com>
5049 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5050 (unexpected_linespec_error): Update.
5051 (linespec_parse_basic, parse_linespec): Update.
5053 2018-04-05 Tom Tromey <tom@tromey.com>
5055 * linespec.c (linespec_parse_basic): Reindent.
5057 2018-04-05 Tom Tromey <tom@tromey.com>
5059 * minsyms.h (iterate_over_minimal_symbols): Update.
5060 * minsyms.c (iterate_over_minimal_symbols): Take a
5062 * linespec.c (struct collect_minsyms): Remove.
5063 (compare_msyms): Now a std::sort comparator.
5064 (add_minsym): Add parameters.
5065 (search_minsyms_for_name): Update. Use std::vector.
5067 2018-04-03 Tom Tromey <tom@tromey.com>
5069 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5072 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5074 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5076 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5079 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5080 printing static type.
5082 2018-04-01 Tom Tromey <tom@tromey.com>
5084 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5085 (rs6000_xfer_shared_libraries): Update.
5087 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5089 * common/gdb_vecs.h (char_ptr): Remove.
5090 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5092 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5094 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5096 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5098 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5100 * tracepoint.h (struct uploaded_tp): Initialize fields.
5101 <actions, step_actions, cmd_strings>: Change type to
5102 std::vector<char *>.
5103 * tracepoint.c (get_uploaded_tp): Allocate with new.
5104 (free_uploaded_tps): Free with delete.
5105 (parse_tracepoint_definition): Adjust to std::vector change.
5106 * breakpoint.c (read_uploaded_action): Likewise.
5107 (create_tracepoint_from_upload): Likewise.
5108 * ctf.c (ctf_write_uploaded_tp): Likewise.
5109 (SET_ARRAY_FIELD): Likewise.
5110 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5112 2018-03-30 Tom Tromey <tom@tromey.com>
5114 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5116 (svr4_keep_data_in_core): Update.
5117 (svr4_read_so_list): Update.
5119 2018-03-30 Tom Tromey <tom@tromey.com>
5121 * windows-nat.c (handle_output_debug_string, handle_exception):
5123 * target.h (target_read_string): Update.
5124 * target.c (target_read_string): Change "string" to
5126 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5128 * solib-frv.c (frv_current_sos): Update.
5129 * solib-dsbt.c (dsbt_current_sos): Update.
5130 * solib-darwin.c (darwin_current_sos): Update.
5131 * linux-thread-db.c (inferior_has_bug): Update.
5132 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5133 Update. Remove alloca.
5134 * ada-lang.c (ada_main_name): Update.
5136 2018-03-30 Tom Tromey <tom@tromey.com>
5138 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5139 (struct dwo_file_deleter): New.
5140 (dwo_file_up): New typedef.
5141 (open_and_init_dwo_file): Use dwo_file_up.
5142 (free_dwo_file_cleanup): Remove.
5144 2018-03-30 Tom Tromey <tom@tromey.com>
5146 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5147 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5149 2018-03-30 Tom Tromey <tom@tromey.com>
5151 * dwarf2read.c (class free_cached_comp_units): New class.
5152 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5153 (free_cached_comp_units): Remove function.
5155 2018-03-30 Tom Tromey <tom@tromey.com>
5157 * utils.h (make_cleanup_unpush_target): Remove.
5158 * inf-ptrace.c (struct target_unpusher): New.
5159 (target_unpush_up) New typedef.
5160 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
5162 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
5164 2018-03-27 Tom Tromey <tom@tromey.com>
5166 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
5168 2018-03-27 Pedro Alves <palves@redhat.com>
5169 Tom Tromey <tom@tromey.com>
5171 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
5172 destructor. Now a class.
5173 (gdb_readline_wrapper_cleanup): Remove function.
5174 (gdb_readline_wrapper): Remove cleanups.
5176 2018-03-27 Tom Tromey <tom@tromey.com>
5178 * typeprint.h (struct type_print_options) <local_typedefs,
5179 global_typedefs>: Remove "struct" keyword.
5180 (class typedef_hash_table): New class.
5181 (recursively_update_typedef_hash, add_template_parameters)
5182 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
5183 (find_typedef_in_hash): Don't declare.
5184 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
5185 (typedef_hash_table::recursively_update): Rename from
5186 recursively_update_typedef_hash. Now a member.
5187 (typedef_hash_table::add_template_parameters): Rename from
5188 add_template_parameters. Now a member.
5189 (typedef_hash_table::typedef_hash_table): Now a constructor;
5190 rename from create_typedef_hash.
5191 (typedef_hash_table::~typedef_hash_table): Now a destructor;
5192 rename from free_typedef_hash.
5193 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5194 (do_free_global_table): Remove.
5195 (typedef_hash_table::typedef_hash_table): New constructor; renamed
5196 from copy_type_recursive.
5197 (create_global_typedef_table): Remove.
5198 (typedef_hash_table::find_global_typedef): Now a member of
5200 (typedef_hash_table::find_typedef): Rename from
5201 find_typedef_in_hash; now a member.
5202 (whatis_exp): Update.
5203 * extension.h (struct ext_lang_type_printers): Add constructor and
5205 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5207 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5208 Now a constructor; rename from start_ext_lang_type_printers.
5209 (ext_lang_type_printers): Now a destructor; rename from
5210 free_ext_lang_type_printers.
5211 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5213 (c_type_print_base_struct_union): Update. Remove cleanups.
5215 2018-03-27 Tom Tromey <tom@tromey.com>
5217 * dwarf-index-write.c: Include <cmath>.
5219 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5221 * NEWS: Add entry describing new "set|show varsize-limit" command.
5222 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5224 * printcmd.c (_initialize_printcmd): Add "set var" alias of
5227 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
5229 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5231 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5232 * dwarf-index-common.c: New file.
5233 * dwarf-index-common.h: New file.
5234 * dwarf-index-write.c: New file.
5235 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5236 (struct dwarf2_section_info): Move from here.
5237 (dwarf2_section_info_def): Likewise.
5238 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5239 (offset_type): Likewise.
5240 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5241 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5242 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5243 (byte_swap): Likewise.
5244 (MAYBE_SWAP): Likewise.
5245 (dwarf2_per_cu_ptr): Likewise.
5246 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5247 (struct tu_stats): Likewise.
5248 (struct dwarf2_per_objfile): Likewise.
5249 (struct dwarf2_per_cu_data): Likewise.
5250 (struct signatured_type): Likewise.
5251 (sig_type_ptr): Likewise.
5252 (DEF_VEC_P (sig_type_ptr)): Likewise.
5253 (INDEX4_SUFFIX): Likewise.
5254 (INDEX5_SUFFIX): Likewise.
5255 (DEBUG_STR_SUFFIX): Likewise.
5256 (dwarf2_read_section): Make non-static.
5257 (mapped_index_string_hash): Move from here.
5258 (dwarf5_djb_hash): Likewise.
5259 (file_write): Likewise.
5260 (class data_buf): Likewise.
5261 (struct symtab_index_entry): Likewise.
5262 (struct mapped_symtab): Likewise.
5263 (find_slot): Likewise.
5264 (hash_expand): Likewise.
5265 (add_index_entry): Likewise.
5266 (uniquify_cu_indices): Likewise.
5267 (class c_str_view): Likewise.
5268 (class c_str_view_hasher): Likewise.
5269 (class vector_hasher): Likewise.
5270 (write_hash_table): Likewise.
5271 (psym_index_map): Likewise.
5272 (struct addrmap_index_data): Likewise.
5273 (add_address_entry): Likewise.
5274 (add_address_entry_worker): Likewise.
5275 (write_address_map): Likewise.
5276 (symbol_kind): Likewise.
5277 (write_psymbols): Likewise.
5278 (struct signatured_type_index_data): Likewise.
5279 (write_one_signatured_type): Likewise.
5280 (recursively_count_psymbols): Likewise.
5281 (recursively_write_psymbols): Likewise.
5282 (class debug_names): Likewise.
5283 (check_dwarf64_offsets): Likewise.
5284 (psyms_seen_size): Likewise.
5285 (write_gdbindex): Likewise.
5286 (write_debug_names): Likewise.
5287 (assert_file_size): Likewise.
5288 (write_psymtabs_to_index): Likewise.
5289 (save_gdb_index_command): Likewise.
5290 (_initialize_dwarf2_read): Don't register the "save gdb-index"
5292 * dwarf2read.h: New file.
5294 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5297 * dwarf2read.c (dwarf2_physname): Do not return the demangled
5298 symbol name if the CU's language stores symbol names in linkage
5300 * language.h (struct language_defn)
5301 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
5302 all instances of this struct.
5304 2018-03-26 Tom Tromey <tom@tromey.com>
5306 * stack.c (backtrace_command_1): Remove verbose code.
5308 2018-03-26 Tom Tromey <tom@tromey.com>
5310 * python/py-framefilter.c (py_print_type): Don't catch
5311 exceptions. Return void.
5312 (py_print_value): Likewise.
5313 (py_print_single_arg): Likewise.
5314 (enumerate_args): Don't catch exceptions.
5315 (py_print_args): Likewise.
5316 (py_print_frame): Likewise.
5317 (gdbpy_apply_frame_filter): Catch exceptions here.
5319 2018-03-26 Tom Tromey <tom@tromey.com>
5321 * stack.c (_initialize_stack): Remove trailing newlines from help
5322 text. Add "Usage" line to "backtrace" help.
5324 2018-03-26 Tom Tromey <tom@tromey.com>
5327 * python/py-framefilter.c (py_print_args): Call wrap_hint.
5329 2018-03-26 Tom Tromey <tom@tromey.com>
5331 * python/py-framefilter.c (py_print_single_arg): Return
5332 EXT_LANG_BT_ERROR from catch.
5334 2018-03-26 Tom Tromey <tom@tromey.com>
5337 * stack.c (backtrace_command_1): Move some code into no-filters
5340 2018-03-26 Tom Tromey <tom@tromey.com>
5342 * python/py-framefilter.c (throw_quit_or_print_exception): New
5344 (gdbpy_apply_frame_filter): Use it.
5346 2018-03-26 Tom Tromey <tom@tromey.com>
5349 * python/py-framefilter.c (py_print_type, py_print_value)
5350 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
5353 2018-03-26 Tom Tromey <tom@tromey.com>
5355 * python/py-framefilter.c (enumerate_args): Use
5356 gdb::unique_xmalloc_ptr.
5358 2018-03-26 Tom Tromey <tom@tromey.com>
5360 * python/py-framefilter.c (py_print_frame): Return
5362 (gdbpy_apply_frame_filter): Update comment.
5363 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5365 <EXT_LANG_BT_NO_FILTERS>: Change value.
5367 2018-03-26 Tom Tromey <tom@tromey.com>
5370 * stack.c (backtrace_command): Parse "hide" argument.
5371 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5372 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5375 2018-03-26 Tom Tromey <tom@tromey.com>
5377 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5379 (backtrace_command): Remove "fulltrace", add "flags".
5381 2018-03-26 Tom Tromey <tom@tromey.com>
5383 * stack.c (backtrace_command): Rewrite command line parsing.
5385 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5387 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5389 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5391 * filename-seen-cache.h: Add include guard.
5393 2018-03-26 Keith Seitz <keiths@redhat.com>
5395 * symfile.c (place_section): Remove "struct" from section_addr_info
5397 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5398 "struct" keyword from section_addr_info.
5400 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5402 * regformats/regdef.h (reg): Add constructors.
5404 2018-03-25 Pedro Alves <palves@redhat.com>
5406 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5407 if then/else bodies in var_func_name extraction.
5409 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5411 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5412 lookup_minimal_symbol() to find symbol entry.
5413 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5415 2018-03-23 Keith Seitz <keiths@redhat.com>
5418 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5419 nested type definitions for C++, too.
5421 2018-03-23 Tom Tromey <tom@tromey.com>
5423 * machoread.c (struct oso_el): Add a constructor. Don't define as
5425 (macho_register_oso): Remove.
5426 (macho_symtab_read): Take a std::vector.
5427 (oso_el_compare_name): Now a std::sort comparator.
5428 (macho_symfile_read_all_oso): Take a std::vector.
5429 (macho_symfile_read): Use std::vector. Remove cleanups.
5431 2018-03-22 Tom Tromey <tom@tromey.com>
5433 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5434 (record_full_goto_bookmark): Use std::string.
5436 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5439 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5442 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5444 * rs6000-tdep.c (store_insn_p): New function.
5445 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5446 and cr_reg to their unshifted values. Use store_insn_p to
5447 match LR saves using either R1 or fdata->alloca_reg. Use
5448 store_insn_p to match CR saves. Set alloca_reg_offset
5449 when alloca_reg and framep are set. Remove lr_reg shift
5450 when assigning to fdata->lr_register.
5452 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5454 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5455 command line args instead of emitting a warning.
5457 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5459 * tracepoint.h (struct static_tracepoint_marker): Initialize
5460 fields, define default constructor, move constructor and move
5461 assignment, disable the rest.
5462 <str_id, extra>: Make std::string.
5463 (release_static_tracepoint_marker): Remove.
5464 (free_current_marker): Remove.
5465 * tracepoint.c (free_current_marker): Remove.
5466 (parse_static_tracepoint_marker_definition): Adjust to
5467 std::string, use new hex2str overload.
5468 (release_static_tracepoint_marker): Remove.
5469 (print_one_static_tracepoint_marker): Get marker by reference
5470 and adjust to std::string.
5471 (info_static_tracepoint_markers_command): Adjust to std::vector
5473 * target.h (static_tracepoint_marker_p): Remove typedef.
5474 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5475 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5477 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5479 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5480 (target_debug_print_std_vector_static_tracepoint_marker): New.
5481 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5483 (target_debug_print_static_tracepoint_marker_p): ... this.
5484 * target-delegates.c: Re-generate.
5485 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5487 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5488 (decode_static_tracepoint_spec): Adjust to std::vector.
5489 (tracepoint_print_one_detail): Adjust to std::string.
5490 (strace_marker_decode_location): Adjust to std::string.
5491 (update_static_tracepoint): Adjust to std::string, remove call
5492 to release_static_tracepoint_marker.
5493 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5494 Adjust to std::vector.
5495 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5496 (remote_static_tracepoint_markers_by_strid): Adjust to
5498 * common/rsp-low.h (hex2str): New overload with explicit count
5500 * common/rsp-low.c (hex2str): New overload with explicit count
5502 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5503 (_initialize_rsp_low_selftests): Add test_hex2str test.
5504 * unittests/tracepoint-selftests.c
5505 (test_parse_static_tracepoint_marker_definition): Adjust to
5508 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5510 * tracepoint.c (parse_static_tracepoint_marker_definition):
5511 Consider case where the definition is followed by more
5513 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5514 tracepoint-selftests.c.
5515 * unittests/tracepoint-selftests.c: New.
5517 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5519 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5522 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5524 * symtab.c (find_pc_sect_line): fixed indentation.
5526 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5528 * symtab.c (find_pc_sect_line): now uses binary search.
5530 2018-03-19 Tom Tromey <tom@tromey.com>
5532 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5535 2018-03-19 Pedro Alves <palves@redhat.com>
5536 Tom Tromey <tom@tromey.com>
5538 * unittests/observable-selftests.c: New file.
5539 * common/observable.h: New file.
5540 * observable.h: New file.
5541 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5542 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5543 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5544 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5545 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5546 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5547 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5548 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5549 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5550 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5551 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5552 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5553 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5554 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5555 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5556 tui/tui-interp.c, valops.c: Update all users.
5557 * tui/tui-hooks.c (tui_bp_created_observer)
5558 (tui_bp_deleted_observer, tui_bp_modified_observer)
5559 (tui_inferior_exit_observer, tui_before_prompt_observer)
5560 (tui_normal_stop_observer, tui_register_changed_observer):
5562 (tui_observers_token): New global.
5563 (attach_or_detach, tui_attach_detach_observers): New functions.
5564 (tui_install_hooks, tui_remove_hooks): Use
5565 tui_attach_detach_observers.
5566 * record-btrace.c (record_btrace_thread_observer): Remove.
5567 (record_btrace_thread_observer_token): New global.
5568 * observer.sh: Remove.
5569 * observer.c: Rename to observable.c.
5570 * observable.c (namespace gdb_observers): Define new objects.
5571 (observer_debug): Move into gdb_observers namespace.
5572 (struct observer, struct observer_list, xalloc_observer_list_node)
5573 (xfree_observer_list_node, generic_observer_attach)
5574 (generic_observer_detach, generic_observer_notify): Remove.
5575 (_initialize_observer): Update.
5576 Don't include observer.inc.
5577 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5578 (clean mostlyclean): Likewise.
5579 (observer.h, observer.inc): Remove targets.
5580 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5581 (COMMON_SFILES): Use observable.c, not observer.c.
5582 * .gitignore: Remove observer.h.
5584 2018-03-18 Tom Tromey <tom@tromey.com>
5586 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5588 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5590 2018-03-17 Tom Tromey <tom@tromey.com>
5592 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5594 2018-03-17 Tom Tromey <tom@tromey.com>
5596 * target.c (class scoped_target_fd): New.
5597 (target_fileio_close_cleanup): Remove.
5598 (target_fileio_read_alloc_1): Use scoped_target_fd.
5600 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5602 * silent-rules.mk: New.
5603 * Makefile.in: Include silent-rules.mk
5604 (srcdir, VPATH, top_srcdir): Move up.
5605 (COMPILE): Add ECHO_CXX.
5606 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5607 (init.c): Add ECHO_INIT_C.
5608 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5609 (version.c): Add ECHO_GEN.
5610 (printcmd.o): Add ECHO_CXX.
5611 (target-float.o): Add ECHO_CXX.
5612 (ada-exp.o): Add ECHO_CXX.
5613 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5614 (insight$(EXEEXT)): Add ECHO_CXXLD.
5615 * gnulib/configure.ac: Add AM_SILENT_RULES.
5616 * gnulib/aclocal.m4: Re-generate.
5617 * gnulib/configure: Re-generate.
5618 * gnulib/import/Makefile.in: Re-generate.
5620 2018-03-16 Tom Tromey <tom@tromey.com>
5622 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5623 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5624 * utils.c (do_free_section_addr_info)
5625 (make_cleanup_free_section_addr_info): Remove.
5626 * symfile.h (struct other_sections): Add constructor.
5627 (struct section_addr_info): Remove.
5628 (section_addr_info): New typedef.
5629 (struct sym_fns) <sym_offsets>: Change type of parameter.
5630 (build_section_addr_info_from_objfile)
5631 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5632 (default_symfile_offsets, symbol_file_add)
5633 (symbol_file_add_from_bfd)
5634 (build_section_addr_info_from_section_table): Update.
5635 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5636 * symfile.c (alloc_section_addr_info): Remove.
5637 (build_section_addr_info_from_section_table): Change return type.
5639 (build_section_addr_info_from_bfd)
5640 (build_section_addr_info_from_objfile): Likewise.
5641 (free_section_addr_info): Remove.
5642 (relative_addr_info_to_section_offsets): Change type of "addrs".
5643 (addrs_section_compar): Now a std::sort comparator.
5644 (addrs_section_sort): Change return type.
5645 (addr_info_make_relative): Change type of "addrs". Update.
5646 (default_symfile_offsets, syms_from_objfile_1)
5647 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5648 (symbol_file_add_separate): Update.
5649 (symbol_file_add): Change type of "addrs". Update.
5650 (add_symbol_file_command): Update. Remove cleanups.
5651 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5653 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5654 * solib.c (solib_read_symbols): Update.
5655 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5656 * machoread.c (macho_symfile_offsets): Update.
5657 * jit.c (jit_bfd_try_read_symtab): Update.
5659 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5661 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5662 unittests/utils-selftests.c.
5663 * unittests/utils-selftests.c: New file.
5665 2018-03-14 Tom Tromey <tom@tromey.com>
5668 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5671 2018-03-14 Tom Tromey <tom@tromey.com>
5674 * printcmd.c (printf_pointer): Allow "-" in format.
5676 2018-03-14 Tom Tromey <tom@tromey.com>
5678 * printcmd.c (_initialize_printcmd): Add usage to printf.
5680 2018-03-14 Yao Qi <qiyao@sourceware.org>
5682 * MAINTAINERS: Update my email address.
5684 2018-03-13 Tom Tromey <tom@tromey.com>
5686 * machoread.c (macho_check_dsym): Change filenamep to a
5688 (macho_symfile_read): Update.
5689 * symfile.c (load_command): Use std::string.
5691 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5693 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5694 to error message string.
5695 (riscv_register_name): Use xsnprintf instead of sprintf.
5696 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5698 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5700 (riscv_push_dummy_call): Likewise.
5702 2018-03-12 Tom Tromey <tom@tromey.com>
5704 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5705 Use gdb::byte_vector.
5706 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5708 2018-03-12 Yao Qi <yao.qi@linaro.org>
5710 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5711 parameter type to readable_regcache.
5712 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5715 2018-03-11 Tom Tromey <tom@tromey.com>
5717 * dwarf2read.c (struct nextfield): Add initializers.
5718 (struct nextfnfield): Remove.
5719 (struct fnfieldlist): Add initializers. Remove "length" and
5720 "head", use std::vector.
5721 (struct decl_field_list): Remove.
5722 (struct field_info): Add initializers.
5723 <fields, baseclasses>: Now std::vector.
5724 <nbaseclasses, nfnfields, typedef_field_list_count,
5725 nested_types_list_count>: Remove.
5726 (dwarf2_add_field, dwarf2_add_type_defn)
5727 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5728 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5729 (process_structure_scope): Update.
5731 2018-03-11 Tom Tromey <tom@tromey.com>
5733 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5734 for use by std::sort.
5735 (build_type_psymtabs_1): Use std::vector.
5737 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5739 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5740 and LIBMPFR in the printed configuration.
5742 2018-03-08 Tom Tromey <tom@tromey.com>
5744 * source.c (get_filename_and_charpos): Use scoped_fd.
5745 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5746 (procfs_pidlist): Likewise.
5747 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5748 (iterate_over_mappings): Likewise.
5750 2018-03-08 Tom Tromey <tom@tromey.com>
5752 * infcall.c (struct call_return_meta_info)
5753 <stack_temporaries_enabled>: Remove.
5754 (get_call_return_value, call_function_by_hand_dummy): Update.
5755 * thread.c (disable_thread_stack_temporaries): Remove.
5756 (enable_thread_stack_temporaries): Remove.
5757 (thread_stack_temporaries_enabled_p): Return bool.
5758 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5759 (get_last_thread_stack_temporary): Update.
5760 * eval.c (evaluate_subexp): Update.
5761 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5762 class, not a function.
5763 (value_ptr, value_vec): Remove typedefs.
5764 (class thread_info) <stack_temporaries_enabled>: Now bool.
5765 <stack_temporaries>: Now a std::vector.
5766 (thread_stack_temporaries_enabled_p)
5767 (value_in_thread_stack_temporaries): Return bool.
5769 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5771 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5772 (getpkt_or_notif_sane_1): Likewise.
5774 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5776 * build-id.c (build_id_to_debug_bfd): Use std::string.
5778 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5780 * build-id.c (find_separate_debug_file_by_buildid): Return
5782 * build-id.h (find_separate_debug_file_by_buildid): Return
5784 * coffread.c (coff_symfile_read): Adjust to std::string.
5785 * elfread.c (elf_symfile_read): Adjust to std::string.
5786 * symfile.c (separate_debug_file_exists): Change parameter to
5788 (find_separate_debug_file): Return std::string.
5789 (find_separate_debug_file_by_debuglink): Return std::string.
5790 * symfile.h (find_separate_debug_file_by_debuglink): Return
5793 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5795 * common/xml-utils.c (xml_escape_text): Move code to...
5796 (xml_escape_text_append): ... this new function.
5797 * common/xml-utils.h (xml_escape_text_append): New declaration.
5798 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5800 (_initialize_xml_utils): register test_xml_escape_text_append as
5803 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5805 * defs.h: Remove MAX_REGISTER_SIZE.
5806 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5808 * python/py-unwind.c (pyuw_sniffer): Likewise.
5810 2018-03-07 Tom Tromey <tom@tromey.com>
5812 * linux-tdep.c (linux_info_proc): Update.
5813 * target.h (struct target_ops) <to_fileio_readlink>: Return
5815 (target_fileio_readlink): Return optional<string>.
5816 * remote.c (remote_hostio_readlink): Return optional<string>.
5817 * inf-child.c (inf_child_fileio_readlink): Return
5819 * target.c (target_fileio_readlink): Return optional<string>.
5821 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5823 * regcache.c (cooked_read_test): Add riscv to the list of
5824 architectures that have a save_reggroup.
5826 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5828 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5829 value is not a dynamic class object.
5831 2018-03-06 Tom Tromey <tom@tromey.com>
5833 * rust-exp.y: Formatting fixes.
5835 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5837 * riscv-tdep.c (riscv_register_name): Remove target description
5839 (riscv_gdbarch_init): Remove target description check.
5841 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5843 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5845 * riscv-tdep.h: Likewise.
5847 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5849 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5850 (riscv_pseudo_register_write): Delete.
5851 (riscv_gdbarch_init): Remove all use of pseudo registers.
5853 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5855 * record-btrace.c (btrace_print_lines): Replace cleanup
5856 parameter with RAII equivalents.
5857 (btrace_insn_history): Replace cleanup with RAII equivalents.
5858 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5859 make_cleanup_ui_out_tuple_begin_end): Remove.
5860 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5861 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5862 make_cleanup_ui_out_list_begin_end): Remove.
5864 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5866 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5867 parameter types to std::vector. Use bool.
5868 (record_btrace_wait): Replace VEC(tp_t) with
5869 std::vector<thread_info *>.
5870 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5872 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5874 * record-btrace.c (record_btrace_disable_callback): Remove.
5875 (struct scoped_btrace_disable): New.
5876 (record_btrace_open): Use scoped_btrace_disable.
5878 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5880 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5881 reading values from registers.
5883 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5885 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5888 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5890 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5891 change parameter type. Use GDB's print functions, and use
5892 core_addr_to_string where appropriate.
5893 (riscv_push_dummy_call): Use core_addr_to_string where
5894 appropriate, update call to riscv_print_arg_location, and reindent
5896 (riscv_return_value): Update call to riscv_print_arg_location.
5898 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5899 Tim Newsome <tim@sifive.com>
5900 Albert Ou <a0u@eecs.berkeley.edu>
5901 Darius Rad <darius@bluespec.com>
5903 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5904 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5905 (ALLDEPFILES): Add riscv-tdep.c
5906 * configure.tgt: Add riscv support.
5907 * riscv-tdep.c: New file.
5908 * riscv-tdep.h: New file.
5909 * NEWS: Mention new target.
5910 * MAINTAINERS: Add entry for riscv.
5912 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5914 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5915 fields within aggregates.
5917 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5919 * record-btrace.c (btrace_print_lines): Change type of flags to
5920 gdb_disassembly_flags.
5922 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5924 * fbsd-nat.c: Include "inf-ptrace.h".
5925 (USE_SIGTRAP_SIGINFO): Conditionally define.
5926 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5927 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5928 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5930 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5932 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5934 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5935 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5936 "supports_stopped_by_hw_breakpoint" target methods.
5938 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5940 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5941 * fbsd-nat.c (debug_fbsd_nat): New variable.
5942 (show_fbsd_nat_debug): New function.
5943 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5944 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5946 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5948 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5949 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5951 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5952 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5955 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5957 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5958 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5960 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5962 * charset.c (struct charset_vector): New.
5963 (charsets): Change type to charset_vector.
5964 (find_charset_names): Adjust.
5966 (_initialize_charset): Adjust.
5968 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5970 * progspace.h (struct program_space) <deleted_solibs>: Change
5971 type to std::vector<std::string>.
5972 * progspace.c (clear_program_space_solib_cache): Adjust.
5973 * breakpoint.c (print_solib_event): Adjust.
5974 (check_status_catch_solib): Adjust.
5975 * solib.c (update_solib_list): Adjust.
5976 * ui-out.h (class ui_out) <field_string>: New overload.
5977 * ui-out.c (ui_out::field_string): New overload.
5979 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5981 * progspace.h (struct program_space): Add constructor and
5982 destructor, initialize fields.
5983 (add_program_space): Remove.
5984 * progspace.c (add_program_space): Rename to...
5985 (program_space::program_space): ... this.
5986 (release_program_space): Rename to...
5987 (program_space::~program_space): ... this.
5988 (delete_program_space): Use delete to delete program_space.
5989 (initialize_progspace): Use new to allocate program_space.
5990 * inferior.c (add_inferior_with_spaces): Likewise.
5991 (clone_inferior_command): Likewise.
5992 * infrun.c (follow_fork_inferior): Likewise.
5993 (handle_vfork_child_exec_or_exit): Likewise.
5995 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5997 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5998 (delim_string_to_char_ptr_vec): Return std::vector of
5999 gdb::unique_xmalloc_ptr.
6000 (dirnames_to_char_ptr_vec_append): Take std::vector of
6001 gdb::unique_xmalloc_ptr.
6002 (dirnames_to_char_ptr_vec): Return std::vector of
6003 gdb::unique_xmalloc_ptr.
6004 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6005 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6006 (delim_string_to_char_ptr_vec): Return an std::vector of
6007 gdb::unique_xmalloc_ptr, adjust the code.
6008 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6009 gdb::unique_xmalloc_ptr, adjust the code.
6010 (dirnames_to_char_ptr_vec): Return an std::vector of
6011 gdb::unique_xmalloc_ptr, adjust the code.
6012 * auto-load.c (auto_load_safe_path_vec): Change type to
6013 std::vector of gdb::unique_xmalloc_ptr.
6014 (auto_load_expand_dir_vars): Return an std::vector of
6015 gdb::unique_xmalloc_ptr, adjust the code.
6016 (auto_load_safe_path_vec_update): Adjust.
6017 (filename_is_in_auto_load_safe_path_vec): Adjust.
6018 (auto_load_objfile_script_1): Adjust.
6019 * build-id.c (build_id_to_debug_bfd): Adjust.
6020 * linux-thread-db.c (thread_db_load_search): Adjust.
6021 * source.c (add_path): Adjust.
6023 * symfile.c (find_separate_debug_file): Adjust.
6024 * utils.c (do_free_char_ptr_vec): Remove.
6025 (make_cleanup_free_char_ptr_vec): Remove.
6027 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6030 * common/pathstuff.c: Conditionally include "<windows.h>".
6032 2018-03-01 Georg Sauthoff <mail@georg.so>
6035 * gcore.in: Quote variables and switch interpreter to bash.
6037 2018-03-01 Tom Tromey <tom@tromey.com>
6039 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6040 assertion. Add assertion for discriminant_index.
6041 (quirk_rust_enum): Use correct base type name in univariant case.
6043 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6045 * record.c (get_call_history_modifiers): Return a
6047 (cmd_record_call_history): Adjust.
6048 * record-btrace.c (record_btrace_call_history): Adjust.
6049 (record_btrace_call_history_range): Adjust.
6050 (record_btrace_call_history_from): Adjust.
6051 * target-debug.h (target_debug_print_record_print_flags): New.
6052 * target-delegates.c: Re-generate.
6053 * target.c (target_call_history): Change flags type.
6054 (target_call_history_from): Likewise.
6055 (target_call_history_range): Likewise.
6056 * target.h (struct target_ops) <target_call_history>: Likewise.
6057 (target_call_history_from): Likewise.
6058 (target_call_history_range): Likewise.
6060 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6061 Simon Marchi <simon.marchi@polymtl.ca>
6063 * common/common-utils.c: Include "sys/stat.h".
6064 (is_regular_file): Move here from "source.c"; change return
6066 * common/common-utils.h (is_regular_file): New prototype.
6067 * common/pathstuff.c (contains_dir_separator): New function.
6068 * common/pathstuff.h (contains_dir_separator): New prototype.
6069 * source.c: Don't include "sys/stat.h".
6070 (is_regular_file): Move to "common/common-utils.c".
6072 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6074 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6075 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6076 * auto-load.c: Include "common/pathstuff.h".
6077 * common/common-def.h (current_directory): Move here.
6078 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6080 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6082 * common/pathstuff.c: New file.
6083 * common/pathstuff.h: New file.
6084 * compile/compile.c: Include "common/pathstuff.h".
6085 * defs.h (current_directory): Move to "common/common-defs.h".
6086 * dwarf2read.c: Include "common/pathstuff.h".
6088 * guile/scm-safe-call.c: Likewise.
6089 * linux-thread-db.c: Likewise.
6091 * nto-tdep.c: Likewise.
6092 * objfiles.c: Likewise.
6093 * source.c: Likewise.
6094 * symtab.c: Likewise.
6095 * utils.c: Include "common/pathstuff.h".
6096 (gdb_realpath): Move to "common/pathstuff.c".
6097 (gdb_realpath_keepfile): Likewise.
6098 (gdb_abspath): Likewise.
6099 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6100 (gdb_realpath_keepfile): Likewise.
6101 (gdb_abspath): Likewise.
6103 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6105 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6106 wildcard process pid for super_resume for kernels with a
6109 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6111 * compile/compile.c (get_args): Add additional comments
6112 explaining function.
6114 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6115 Tom Tromey <tom@tromey.com>
6117 * target.h (memory_write_request_s): Remove typedef. Don't define
6119 (target_write_memory_blocks): Change argument to std::vector.
6120 (struct memory_write_request): Add constructor.
6121 * target-memory.c (compare_block_starting_address): Return bool.
6122 Change argument types.
6123 (claim_memory): Change arguments to use std::vector.
6124 (split_regular_and_flash_blocks, blocks_to_erase)
6125 (compute_garbled_blocks): Likewise.
6126 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6127 (target_write_memory_blocks): Change argument to std::vector.
6128 * symfile.c (struct load_section_data): Add constructor and
6129 destructor. Use std::vector for "requests".
6130 (struct load_progress_data): Add initializers.
6131 (load_section_callback): Update. Use "new".
6132 (clear_memory_write_data): Remove.
6133 (generic_load): Update.
6135 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6137 * arch/aarch64.h: Use common/tdesc.h.
6139 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6141 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6142 architecture with a 64-bit ABI.
6144 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6146 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6147 ahead of target description loading.
6149 2018-02-26 Tom Tromey <tom@tromey.com>
6151 * stack.c (backtrace_command_1): Update.
6152 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6154 * python/py-framefilter.c (py_print_frame)
6155 (gdbpy_apply_frame_filter): Change type of "flags".
6156 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
6158 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
6159 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
6160 * extension.h (enum frame_filter_flag): Rename from
6162 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
6163 (apply_ext_lang_frame_filter): Change type of "flags".
6164 * extension.c (apply_ext_lang_frame_filter): Change type of
6166 * extension-priv.h (struct extension_language_ops)
6167 <apply_frame_filter>: Change type of "flags".
6169 2018-02-26 Tom Tromey <tom@tromey.com>
6172 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
6173 off-by-one in py_end computation.
6174 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
6176 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
6179 2018-02-26 Tom Tromey <tom@tromey.com>
6181 * dwarf2read.c (struct variant_field): New.
6182 (struct nextfield) <variant>: New field.
6183 (dwarf2_add_field): Handle DW_TAG_variant_part.
6184 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
6185 discriminated union.
6186 (read_structure_type): Handle DW_TAG_variant_part.
6187 (handle_struct_member_die): New function, extracted from
6188 process_structure_scope. Handle DW_TAG_variant.
6189 (process_structure_scope): Handle discriminated unions. Call
6190 handle_struct_member_die.
6192 2018-02-26 Tom Tromey <tom@tromey.com>
6194 * rust-lang.h (rust_last_path_segment): Declare.
6195 * rust-lang.c (rust_last_path_segment): Now public. Change
6197 (struct disr_info): Remove.
6198 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6199 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6200 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6201 (rust_enum_p, rust_enum_variant): New function.
6202 (rust_underscore_fields): Remove "offset" parameter.
6203 (rust_print_enum): New function.
6204 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6205 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6206 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
6208 (rust_internal_print_type): New function, from rust_print_type.
6210 (rust_print_type): Call rust_internal_print_type.
6211 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6212 Update enum handling.
6213 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6214 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6215 (rust_union_quirks): New functions.
6216 (process_full_comp_unit, process_full_type_unit): Call
6218 (process_structure_scope): Update rust_unions if necessary.
6220 2018-02-26 Tom Tromey <tom@tromey.com>
6222 * value.h (value_union_variant): Declare.
6223 * valops.c (value_union_variant): New function.
6224 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6225 (struct discriminant_info): New.
6226 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6228 (struct main_type) <flag_discriminated_union>: New field.
6230 2018-02-26 Tom Tromey <tom@tromey.com>
6232 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6233 unittests/unpack-selftests.c.
6234 * unittests/unpack-selftests.c: New file.
6235 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6237 2018-02-26 Yao Qi <yao.qi@linaro.org>
6239 * dwarf2read.c (struct partial_die_info) <read>: New method.
6240 (read_partial_die): Remove the declaration.
6241 (load_partial_dies): Update.
6242 (partial_die_info::partial_die_info):
6243 (read_partial_die): Change it to partial_die_info::read.
6245 2018-02-26 Yao Qi <yao.qi@linaro.org>
6247 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6248 (fixup_partial_die): Remove declaration.
6249 (scan_partial_symbols): Update.
6250 (partial_die_parent_scope): Likewise.
6251 (partial_die_full_name): Likewise.
6252 (fixup_partial_die): Change it to partial_die_info::fixup.
6254 2018-02-26 Yao Qi <yao.qi@linaro.org>
6256 * dwarf2read.c (read_partial_die): Update the declaration.
6257 (load_partial_dies): Caller update.
6258 (read_partial_die): Remove one argument abbrev_len.
6260 2018-02-26 Yao Qi <yao.qi@linaro.org>
6262 * dwarf2read.c (struct partial_die_info): Add ctor, delete
6263 assignment operator.
6264 (load_partial_dies): Use ctor and copy ctor.
6265 (read_partial_die): Update.
6266 (dwarf2_cu::find_partial_die): Use ctor.
6268 2018-02-26 Yao Qi <yao.qi@linaro.org>
6270 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6271 (find_partial_die_in_comp_unit): Change it to
6272 dwarf2_cu::find_partial_die.
6273 (find_partial_die): Update.
6275 2018-02-26 Yao Qi <yao.qi@linaro.org>
6277 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
6280 2018-02-26 Yao Qi <yao.qi@linaro.org>
6282 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
6284 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6286 * arch/amd64.h: Use common/tdesc.h.
6287 * arch/i386.c: Likewise.
6288 * arch/i386.h: Likewise.
6289 * arch/tic6x.c: Likewise.
6290 * arch/tdesc.h: Move file from here...
6291 * common/tdesc.h: ...to here.
6292 * features/aarch64-core.c: Regenerate.
6293 * features/aarch64-fpu.c: Regenerate.
6294 * features/i386/32bit-avx.c: Regenerate.
6295 * features/i386/32bit-avx512.c: Regenerate.
6296 * features/i386/32bit-core.c: Regenerate.
6297 * features/i386/32bit-linux.c: Regenerate.
6298 * features/i386/32bit-mpx.c: Regenerate.
6299 * features/i386/32bit-pkeys.c: Regenerate.
6300 * features/i386/32bit-sse.c: Regenerate.
6301 * features/i386/64bit-avx.c: Regenerate.
6302 * features/i386/64bit-avx512.c: Regenerate.
6303 * features/i386/64bit-core.c: Regenerate.
6304 * features/i386/64bit-linux.c: Regenerate.
6305 * features/i386/64bit-mpx.c: Regenerate.
6306 * features/i386/64bit-pkeys.c: Regenerate.
6307 * features/i386/64bit-segments.c: Regenerate.
6308 * features/i386/64bit-sse.c: Regenerate.
6309 * features/i386/x32-core.c: Regenerate.
6310 * features/tic6x-c6xp.c: Regenerate.
6311 * features/tic6x-core.c: Regenerate.
6312 * features/tic6x-gp.c: Regenerate.
6313 * target-descriptions.c: Use common/tdesc.h.
6314 * target-descriptions.h: Likewise.
6316 2018-02-24 Tom Tromey <tom@tromey.com>
6318 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
6319 (try_thread_db_load_from_dir, thread_db_load_search): Use
6321 (info_auto_load_libthread_db_compare): Return bool. Change
6323 (info_auto_load_libthread_db): Use std::vector, std::string.
6326 2018-02-24 Tom Tromey <tom@tromey.com>
6328 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
6330 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
6332 * gdbarch.c: Rebuild.
6333 * gdbarch.h: Rebuild.
6334 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
6335 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
6336 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
6339 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
6341 * gdbtypes.h (sect_offset): Change type to uint64_t.
6342 (sect_offset_str): New function.
6343 * dwarf2read.c (create_addrmap_from_aranges): Use
6345 (error_check_comp_unit_head): Likewise.
6346 (create_debug_type_hash_table): Likewise.
6347 (read_cutu_die_from_dwo): Likewise.
6348 (init_cutu_and_read_dies): Likewise.
6349 (init_cutu_and_read_dies_no_follow): Likewise.
6350 (process_psymtab_comp_unit_reader): Likewise.
6351 (partial_die_parent_scope): Likewise.
6352 (peek_die_abbrev): Likewise.
6353 (process_queue): Likewise.
6354 (dwarf2_physname): Likewise.
6355 (read_namespace_alias): Likewise.
6356 (read_import_statement): Likewise.
6357 (create_dwo_cu_reader): Likewise.
6358 (create_cus_hash_table): Likewise.
6359 (lookup_dwo_cutu): Likewise.
6360 (inherit_abstract_dies): Likewise.
6361 (read_func_scope): Likewise.
6362 (read_call_site_scope): Likewise.
6363 (dwarf2_add_member_fn): Likewise.
6364 (read_common_block): Likewise.
6365 (read_module_type): Likewise.
6366 (read_typedef): Likewise.
6367 (read_subrange_type): Likewise.
6368 (load_partial_dies): Likewise.
6369 (read_partial_die): Likewise.
6370 (find_partial_die): Likewise.
6371 (read_str_index): Likewise.
6372 (dwarf2_string_attr): Likewise.
6373 (build_error_marker_type): Likewise.
6374 (lookup_die_type): Likewise.
6375 (dump_die_shallow): Likewise.
6376 (follow_die_ref): Likewise.
6377 (dwarf2_fetch_die_loc_sect_off): Likewise.
6378 (dwarf2_fetch_constant_bytes): Likewise.
6379 (follow_die_sig): Likewise.
6380 (get_signatured_type): Likewise.
6381 (get_DW_AT_signature_type): Likewise.
6382 (dwarf2_find_containing_comp_unit): Likewise.
6383 (set_die_type): Likewise.
6385 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6387 * arch/aarch64.c: Include "common-defs.h".
6388 * arch/amd64.c: Likewise.
6389 * arch/i386.c: Likewise.
6391 2018-02-21 Tom Tromey <tom@tromey.com>
6393 * value.h: (extract_field_op): Update.
6394 * eval.c (extract_field_op): Return a const char *.
6395 * expression.h (parse_expression_for_completion): Update.
6396 * completer.c (complete_expression): Update.
6397 (add_struct_fields): Make fieldname const.
6398 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6399 (mark_completion_tag, parse_exp_in_context_1): Update.
6400 (parse_expression_for_completion): Change "name" to
6401 unique_xmalloc_ptr*.
6403 2018-02-21 Tom Tromey <tom@tromey.com>
6405 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6407 2018-02-21 Yao Qi <yao.qi@linaro.org>
6409 * avr-tdep.c (avr_read_pc): Change parameter type to
6411 * gdbarch.sh (read_pc): Likewise.
6412 * gdbarch.c: Re-generated.
6413 * gdbarch.h: Re-generated.
6414 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6416 * ia64-tdep.c (ia64_read_pc): Likewise.
6417 * mips-tdep.c (mips_read_pc): Likewise.
6418 * spu-tdep.c (spu_read_pc): Likewise.
6420 2018-02-21 Yao Qi <yao.qi@linaro.org>
6422 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6423 * regcache-dump.c: New file.
6424 * regcache.c: Move register_dump to regcache-dump.c.
6425 (maintenance_print_registers): Likewise.
6426 (maintenance_print_raw_registers): Likewise.
6427 (maintenance_print_cooked_registers): Likewise.
6428 (maintenance_print_register_groups): Likewise.
6429 (maintenance_print_remote_registers): Likewise.
6430 (_initialize_regcache): Likewise.
6431 * regcache.h (register_dump): Moved from regcache.c.
6433 2018-02-21 Yao Qi <yao.qi@linaro.org>
6435 * regcache.c (regcache::regcache): Update.
6436 (regcache::invalidate): Move it to detached_regcache::invalidate.
6437 (get_thread_arch_aspace_regcache): Update.
6438 (regcache::raw_update): Update.
6439 (regcache::cooked_read): Remove some code.
6440 (regcache::cooked_read_value): Likewise.
6441 (regcache::raw_write): Remove assert on m_readonly_p.
6442 (regcache::raw_supply_integer): Move it to
6443 detached_regcache::raw_supply_integer.
6444 (regcache::raw_supply_zeroed): Likewise.
6445 * regcache.h (detached_regcache) <raw_supply_integer>: New
6447 <raw_supply_zeroed, invalidate>: Likewise.
6448 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6449 <invalidate>: Likewise.
6450 <m_readonly_p>: Removed.
6452 2018-02-21 Yao Qi <yao.qi@linaro.org>
6454 * infcmd.c (get_return_value): Let stop_regs point to
6455 get_current_regcache.
6456 * regcache.c (regcache::regcache): Remove.
6457 (register_dump_reg_buffer): New class.
6458 (regcache_print): Adjust.
6459 * regcache.h (regcache): Remove constructors.
6461 2018-02-21 Yao Qi <yao.qi@linaro.org>
6463 * regcache.c (class register_dump): New class.
6464 (register_dump_regcache, register_dump_none): New class.
6465 (register_dump_remote, register_dump_groups): New class.
6466 (regcache_print): Update.
6467 * regcache.h (regcache_dump_what): Move it to regcache.c.
6468 (regcache) <dump>: Remove.
6470 2018-02-21 Yao Qi <yao.qi@linaro.org>
6472 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6474 (jit_unwind_reg_set_impl): Call raw_supply.
6475 (jit_frame_sniffer): Use reg_buffer_rw.
6476 * record-full.c (record_full_core_regbuf): Change its type.
6477 (record_full_core_open_1): Use reg_buffer_rw.
6478 (record_full_close): Likewise.
6479 (record_full_core_fetch_registers): Use regcache->raw_supply.
6480 (record_full_core_store_registers): Likewise.
6481 * regcache.c (regcache::get_register_status): Move it to
6483 (regcache_raw_set_cached_value): Remove.
6484 (regcache::raw_set_cached_value): Remove.
6485 (regcache::raw_write): Call raw_supply.
6486 (regcache::raw_supply): Move it to reg_buffer_rw.
6487 * regcache.h (regcache_raw_set_cached_value): Remove.
6488 (reg_buffer_rw): New class.
6490 2018-02-21 Yao Qi <yao.qi@linaro.org>
6492 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6493 readonly_detached_regcache.
6494 (dummy_frame_prev_register): Use regcache->cooked_read.
6495 * frame.c (frame_save_as_regcache): Change return type.
6496 (frame_pop): Update.
6497 * frame.h (frame_save_as_regcache): Update declaration.
6498 * inferior.h (get_infcall_suspend_state_regcache): Update
6500 * infrun.c (infcall_suspend_state) <registers>: use
6501 readonly_detached_regcache.
6502 (save_infcall_suspend_state): Don't use regcache_dup.
6503 (get_infcall_suspend_state_regcache): Change return type.
6504 * linux-fork.c (struct fork_info) <savedregs>: Change to
6505 readonly_detached_regcache.
6507 (fork_save_infrun_state): Don't use regcache_dup.
6508 (info_checkpoints_command): Adjust.
6509 * mi/mi-main.c (register_changed_p): Update declaration.
6510 (mi_cmd_data_list_changed_registers): Use
6511 readonly_detached_regcache.
6512 (register_changed_p): Change parameter type to
6513 readonly_detached_regcache.
6514 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6515 readonly_detached_regcache.
6516 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6517 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6519 (regcache::save): Move it to reg_buffer.
6520 (regcache::restore): Change parameter type.
6521 (regcache_dup): Remove.
6522 * regcache.h (reg_buffer) <save>: New method.
6523 (readonly_detached_regcache): New class.
6524 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6525 readonly_detached_regcache.
6526 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6528 2018-02-21 Yao Qi <yao.qi@linaro.org>
6530 * frame.c (frame_save_as_regcache): Use regcache method save.
6531 (frame_pop): Use regcache method restore.
6532 * infrun.c (restore_infcall_suspend_state): Likewise.
6533 * linux-fork.c (fork_load_infrun_state): Likewise.
6534 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6536 * regcache.c (regcache_save): Remove.
6537 (regcache::restore): More asserts.
6538 (regcache_cpy): Remove.
6539 * regcache.h (regcache_save): Remove the declaration.
6540 (regcache::restore): Move from private to public.
6541 Remove the friend declaration of regcache_cpy.
6542 (regcache_cpy): Remove declaration.
6544 2018-02-21 Yao Qi <yao.qi@linaro.org>
6546 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6547 parameter type to 'readable_regcache *'.
6548 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6549 * arm-tdep.c (arm_neon_quad_read): Likewise.
6550 (arm_pseudo_read): Likewise.
6551 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6552 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6553 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6554 * gdbarch.c: Re-generated.
6555 * gdbarch.h: Re-generated.
6556 * gdbarch.sh (pseudo_register_read): Change parameter type to
6557 'readable_regcache *'.
6558 (pseudo_register_read_value): Likewise.
6559 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6560 (h8300_pseudo_register_read): Likewise.
6561 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6562 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6563 (i386_pseudo_register_read_into_value): Likewise.
6564 (i386_pseudo_register_read_value): Likewise.
6565 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6567 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6568 * m32c-tdep.c (m32c_raw_read): Likewise.
6569 (m32c_read_flg): Likewise.
6570 (m32c_banked_register): Likewise.
6571 (m32c_banked_read): Likewise.
6572 (m32c_sb_read): Likewise.
6573 (m32c_part_read): Likewise.
6574 (m32c_cat_read): Likewise.
6575 (m32c_r3r2r1r0_read): Likewise.
6576 (m32c_pseudo_register_read): Likewise.
6577 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6578 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6579 (mep_pseudo_cr64_read): Likewise.
6580 (mep_pseudo_register_read): Likewise.
6581 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6582 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6583 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6584 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6585 (regcache::cooked_read): Likewise.
6586 (regcache::cooked_read_value): Likewise.
6587 (regcache_cooked_read_signed):
6588 (regcache::cooked_read): Likewise.
6589 * regcache.h (readable_regcache): New class.
6590 (regcache): Inherit readable_regcache. Move some methods to
6592 * rl78-tdep.c (rl78_pseudo_register_read): Change
6593 parameter type to 'readable_regcache *'.
6594 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6595 (e500_pseudo_register_read): Change parameter type to
6596 'readable_regcache *'.
6597 (dfp_pseudo_register_read): Likewise.
6598 (vsx_pseudo_register_read): Likewise.
6599 (efpr_pseudo_register_read): Likewise.
6600 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6601 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6602 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6603 (sh64_pseudo_register_read): Likewise.
6604 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6605 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6606 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6607 (spu_pseudo_register_read): Likewise.
6608 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6609 (xtensa_pseudo_register_read): Likewise.
6611 2018-02-21 Yao Qi <yao.qi@linaro.org>
6613 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6614 (regcache::arch): Move it to reg_buffer::arch.
6615 (regcache::register_buffer): Likewise.
6616 (regcache::assert_regnum): Likewise.
6617 (regcache::num_raw_registers): Likewise.
6618 * regcache.h (reg_buffer): New class.
6619 (regcache): Inherit reg_buffer.
6621 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6623 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6624 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6626 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6628 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6630 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6632 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6633 (SFILES): Remove common/*.c files.
6634 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6635 * common/common.host: Add common reference.
6636 * configure.ac: Likewise.
6637 * configure: Regenerate.
6639 2018-02-16 Yao Qi <yao.qi@linaro.org>
6641 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6642 (block_initialize_namespace): Use new.
6643 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6644 (dwarf2_free_objfile): Use delete.
6645 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6646 (copy_type_recursive): Use new.
6647 * gdb_obstack.h (allocate_on_obstack): New.
6649 2018-02-15 Yao Qi <yao.qi@linaro.org>
6652 * inferior.c (exit_inferior_1): Reset inf->control.
6654 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6656 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6659 2018-02-14 Pedro Alves <palves@redhat.com>
6661 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6662 frame_cleanup_after_sniffer on exception.
6664 2018-02-14 Tom Tromey <tom@tromey.com>
6666 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6668 (solib_bfd_open): Make pathname const.
6669 * solib.c (solib_bfd_open): Make pathname const.
6670 * solib-spu.c (spu_bfd_fopen): Make name const.
6671 (spu_bfd_open): Make pathname const.
6672 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6673 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6675 2018-02-14 Tom Tromey <tom@tromey.com>
6677 * symfile.c (symfile_bfd_open): Update.
6678 * source.h (openp, source_full_path_of, find_and_open_source):
6679 Change argument type to unique_xmalloc_ptr.
6680 * source.c (openp): Take a unique_xmalloc_ptr.
6681 (source_full_path_of, find_and_open_source): Likewise.
6682 (open_source_file, symtab_to_fullname): Update.
6683 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6685 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6686 (exec_file_find): Update.
6687 * psymtab.c (psymtab_to_fullname): Update.
6688 * nto-tdep.h (nto_find_and_open_solib): Update.
6689 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6691 * exec.c (exec_file_attach): Update.
6692 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6693 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6695 2018-02-14 Tom Tromey <tom@tromey.com>
6697 * solib.c: Include source.h.
6698 * nto-tdep.c: Include source.h.
6699 * mi/mi-cmd-env.c: Include source.h.
6700 * infcmd.c: Include source.h.
6701 * exec.c: Include source.h.
6702 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6703 (add_path, directory_switch, source_path, init_source_path): Move
6705 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6706 (add_path, directory_switch, source_path, init_source_path):
6709 2018-02-14 Tom Tromey <tom@tromey.com>
6711 * solist.h (exec_file_find, solib_find): Return
6713 (solib_bfd_fopen): Take a const char *.
6714 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6715 (exec_file_find, solib_find): Likewise.
6716 (solib_bfd_fopen): Do not take ownership of "pathname".
6717 (solib_bfd_open): Use unique_xmalloc_ptr.
6718 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6719 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6720 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6721 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6723 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6725 * ada-lang.c (name_match_type_from_name): Remove reference to
6726 ada_name_for_lookup in function's documentation.
6727 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6729 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6731 * defs.h (enum openp_flags): New enum.
6732 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6733 Move to enum openp_flags.
6734 (openp_flags): New enum flags.
6735 (openp): Change parameter type to openp_flags.
6736 * source.c (openp): Change parameter type to openp_flags.
6737 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6738 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6740 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6742 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6745 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6747 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6749 (class dwarf2_queue_guard): ...the destructor of this new class.
6750 (dw2_do_instantiate_symtab): Create instance of the new class
6751 dwarf2_queue_guard, remove cleanup.
6753 2018-02-09 Tom Tromey <tom@tromey.com>
6755 * source.c (find_source_lines): Don't reference past the end of
6758 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6760 * remote.c (remote_btrace_maybe_reopen): Change error message.
6761 * btrace.c (btrace_enable): Likewise.
6762 (parse_xml_btrace): Likewise.
6763 (parse_xml_btrace_conf): Likewise.
6765 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6767 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6768 (linux_enable_pt, linux_enable_bts): Call
6769 diagnose_perf_event_open_fail.
6771 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6773 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6774 Remove parameter and change return type. Update callers. Move it.
6775 (linux_enable_bts, linux_enable_pt): Improve error message.
6776 (linux_enable_pt): Remove zero buffer size check.
6777 (linux_enable_btrace): Improve error messages. Remove NULL return
6780 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6782 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6783 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6784 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6785 (linux_supports_pt, linux_supports_btrace): Remove.
6786 (linux_enable_bts): Call cpu_supports_bts.
6787 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6788 * remote.c (remote_supports_btrace): Remove.
6789 (init_remote_ops): Remove remote_supports_btrace.
6790 * target-delegates.c: Regenerated.
6791 * target.c (target_supports_btrace): Remove.
6792 * target.h (target_ops) <to_supports_btrace>: Remove
6793 (target_supports_btrace): Remove.
6794 * x86-linux-nat.c (x86_linux_create_target): Remove
6795 linux_supports_btrace.
6797 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6799 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6801 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6802 exception and use message in own exception.
6804 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6806 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6807 (perf_event_pt_event_type): Use gdb_file_up.
6808 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6809 scoped_fd, and scoped_mmap.
6811 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6813 * common/scoped_mmap.h: New.
6814 * unittests/scoped_mmap-selftest.c: New.
6815 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6816 unittests/scoped_mmap-selftest.c.
6818 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6820 * common/scoped_fd.h: New.
6821 * unittests/scoped_fd-selftest.c: New.
6822 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6823 unittests/scoped_fd-selftest.c.
6825 2018-02-09 Tom Tromey <tom@tromey.com>
6827 * auto-load.c (auto_load_section_scripts): Use
6828 gdb::unique_xmalloc_ptr.
6830 2018-02-09 Tom Tromey <tom@tromey.com>
6832 * auto-load.c (execute_script_contents): Use std::string.
6834 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6836 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6837 Python function, rather than a new command.
6839 2018-02-08 Tom Tromey <tom@tromey.com>
6841 * solib.c (solib_find_1): Use std::string.
6842 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6844 2018-02-08 Tom Tromey <tom@tromey.com>
6846 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6848 2018-02-08 Tom Tromey <tom@tromey.com>
6850 * source.c (find_source_lines): Use gdb::def_vector.
6852 2018-02-08 Tom Tromey <tom@tromey.com>
6854 * macrocmd.c (struct temporary_macro_definition): New.
6855 (macro_define_command): Use temporary_macro_definition. Remove
6857 (free_macro_definition_ptr): Remove.
6859 2018-02-08 Tom Tromey <tom@tromey.com>
6861 * macroexp.c (maybe_expand): Use std::string.
6863 2018-02-08 Tom Tromey <tom@tromey.com>
6865 * macroexp.c (struct macro_buffer): Add initializers for some
6867 (init_buffer, init_shared_buffer, free_buffer)
6868 (free_buffer_return_text): Remove.
6869 (macro_buffer): New constructors.
6870 (~macro_buffer): New destructor.
6871 (macro_buffer::set_shared): New method.
6872 (macro_buffer::resize_buffer, macro_buffer::appendc)
6873 (macro_buffer::appendmem): Now methods, not free functions.
6874 (set_token, append_tokens_without_splicing, stringify)
6875 (macro_stringify): Update.
6876 (gather_arguments): Change return type. Remove argc_p argument,
6877 add args_ptr argument. Use std::vector.
6878 (substitute_args): Remove argc argument. Accept std::vector.
6879 (expand): Update. Use std::vector.
6880 (scan, macro_expand, macro_expand_next): Update.
6882 2018-02-08 Tom Tromey <tom@tromey.com>
6884 * symtab.c (default_collect_symbol_completion_matches_break_on):
6885 Use unique_xmalloc_ptr.
6886 * macroscope.h: (sal_macro_scope, user_macro_scope)
6887 (default_macro_scope): Return unique_xmalloc_ptr.
6888 * macroscope.c (sal_macro_scope, user_macro_scope)
6889 (default_macro_scope): Return unique_xmalloc_ptr.
6890 * macroexp.h (macro_expand, macro_expand_once): Return
6892 * macroexp.c (macro_expand, macro_expand_once): Return
6894 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6895 (info_macro_command, info_macros_command): Use
6897 * compile/compile-c-support.c (write_macro_definitions): Use
6899 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6901 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6903 * value.c (value_static_field): Assign field type instead of
6904 containing type when returning an optimized out value.
6906 2018-02-06 Yao Qi <yao.qi@linaro.org>
6908 * ft32-tdep.c (ft32_read_pc): Remove.
6909 (ft32_write_pc): Remove.
6910 (ft32_gdbarch_init): Update.
6911 * m32r-tdep.c (m32r_read_pc): Remove.
6912 (m32r_gdbarch_init): Update.
6913 * mep-tdep.c (mep_read_pc): Remove.
6914 (mep_gdbarch_init): Update.
6915 * microblaze-tdep.c (microblaze_write_pc): Remove.
6916 (microblaze_gdbarch_init): Update.
6917 * mn10300-tdep.c (mn10300_read_pc): Remove.
6918 (mn10300_write_pc): Remove.
6919 (mn10300_gdbarch_init): Update.
6920 * moxie-tdep.c (moxie_read_pc): Remove.
6921 (moxie_write_pc): Remove.
6922 (moxie_gdbarch_init): Update.
6924 2018-02-06 Yao Qi <yao.qi@linaro.org>
6926 * expprint.c (print_subexp_standard): Handle
6927 OP_F77_UNDETERMINED_ARGLIST.
6928 (dump_subexp_body_standard): Likewise.
6930 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6932 * target-descriptions.c (tdesc_element_visitor) Add empty
6934 (tdesc_type): Move make_gdb_type from here.
6935 (tdesc_type_builtin): Likewise.
6936 (tdesc_type_vector): Likewise.
6937 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6938 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6939 (make_gdb_type_union): Likewise.
6940 (make_gdb_type_flags): Likewise.
6941 (make_gdb_type_enum): Likewise.
6942 (make_gdb_type): New function.
6943 (tdesc_register_type): Use static make_gdb_type.
6945 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6947 * infcmd.c (default_print_one_register_info): Align natural-format
6948 column values consistently one under another.
6949 (pad_to_column): New function.
6951 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6953 * dwarf2read.c (dwarf2_physname): Move commment.
6955 2018-02-01 Leszek Swirski <leszeks@google.com>
6957 * varobj.c (varobj_formatted_print_options): Allow recursive
6958 pretty printing if pretty printing is enabled.
6960 2018-02-01 Leszek Swirski <leszeks@google.com>
6962 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6963 names after a structop as a filename.
6965 2018-02-01 Yao Qi <yao.qi@linaro.org>
6967 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6968 (arm_record_coproc_data_proc): Likewise.
6970 2018-02-01 Yao Qi <yao.qi@linaro.org>
6972 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6974 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6976 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6977 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6979 2018-01-31 Pedro Alves <palves@redhat.com>
6981 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6982 * inflow.c (child_terminal_save_inferior): Wrap reference to
6983 tcgetpgrp in HAVE_TERMIOS_H.
6984 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6986 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6987 always iterate over all inferiors.
6988 (gdbsim_cntrl_c): Adjust.
6989 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6991 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6993 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6994 index type is objfile-owned if the element type is as well.
6996 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7000 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7002 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7003 "features/s390x-linux64.c".
7004 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7005 s390_linux32 and s390x_linux64.
7006 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7008 * s390-tdep.c: Include "features/s390-linux32.c" and
7009 "features/s390x-linux64.c".
7010 (s390_tdesc_valid): Add check for tdesc_has_registers.
7011 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7012 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7013 tdesc_s390x_linux64.
7014 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7015 tdesc_s390x_linux64 to...
7016 * s390-tdep.h: ...here.
7018 2018-01-30 Pedro Alves <palves@redhat.com>
7021 * config.in, configure: Regenerate.
7022 * configure.ac: Check for getpgid.
7023 * go32-nat.c (go32_pass_ctrlc): New.
7024 (go32_target): Install it.
7025 * inf-child.c (inf_child_target): Install
7026 child_terminal_save_inferior, child_pass_ctrlc and
7028 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7029 (inf_ptrace_target): No longer install it.
7030 * infcmd.c (interrupt_target_1): Adjust.
7031 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7032 (child_interrupt): Declare.
7033 (inferior::terminal_state): New.
7034 * inflow.c (struct terminal_info): Update comments.
7035 (inferior_process_group): Delete.
7036 (terminal_is_ours): Delete.
7037 (gdb_tty_state): New.
7038 (child_terminal_init): Adjust.
7039 (is_gdb_terminal, sharing_input_terminal_1)
7040 (sharing_input_terminal): New functions.
7041 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7042 Set the process's actual process group in the foreground if
7043 possible. Handle is_ours_for_output/is_ours distinction. Don't
7044 mark terminal as the inferior's if not sharing GDB's terminal.
7045 Don't check attach_flag.
7046 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7047 pass down a target_terminal_state.
7048 (child_terminal_save_inferior): New, factored out from ...
7049 (child_terminal_ours_1): ... this. Handle
7050 target_terminal_state::is_ours_for_output.
7051 (child_interrupt, child_pass_ctrlc): New.
7052 (inflow_inferior_exit): Clear the inferior's terminal_state.
7053 (copy_terminal_info): Copy the inferior's terminal state.
7054 (_initialize_inflow): Remove reference to terminal_is_ours.
7055 * inflow.h (inferior_process_group): Delete.
7056 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7057 * procfs.c (procfs_target): Don't install procfs_interrupt.
7058 (procfs_interrupt): Delete.
7059 * remote.c (remote_serial_quit_handler): Adjust.
7060 (remote_interrupt): Remove ptid parameter. Adjust.
7061 * target-delegates.c: Regenerate.
7062 * target.c: Include "terminal.h".
7063 (target_terminal::terminal_state): Rename to ...
7064 (target_terminal::m_terminal_state): ... this.
7065 (target_terminal::init): Adjust.
7066 (target_terminal::inferior): Adjust to per-inferior
7068 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7069 (target_terminal::ours, target_terminal::ours_for_output): Use
7070 target_terminal_is_ours_kind.
7071 (target_interrupt): Remove ptid parameter. Adjust.
7072 (default_target_pass_ctrlc): Adjust.
7073 * target.h (target_ops::to_terminal_save_inferior): New field.
7074 (target_ops::to_interrupt): Remove ptid_t parameter.
7075 (target_interrupt): Remove ptid_t parameter. Update comment.
7076 (target_pass_ctrlc): Update comment.
7077 * target/target.h (target_terminal_state): New scoped enum,
7079 (target_terminal::terminal_state): ... here.
7080 (target_terminal::inferior): Update comments.
7081 (target_terminal::restore_inferior): New.
7082 (target_terminal::is_inferior, target_terminal::is_ours)
7083 (target_terminal::is_ours_for_output): Adjust.
7084 (target_terminal::scoped_restore_terminal_state): Adjust to
7085 rename, and call restore_inferior() instead of inferior().
7086 (target_terminal::scoped_restore_terminal_state::m_state): Change
7088 (target_terminal::terminal_state): Rename to ...
7089 (target_terminal::m_terminal_state): ... this and change type.
7091 2018-01-30 Pedro Alves <palves@redhat.com>
7093 * linux-nat.c (wait_for_signal): New function.
7094 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7096 (async_terminal_is_ours)
7097 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7098 (linux_nat_add_target): Don't override
7099 to_terminal_inferior/to_terminal_ours.
7101 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7103 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7105 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7107 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7108 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7109 dwarf2_per_objfile_free here.
7110 (dwarf2_per_objfile_free): Remove.
7111 (_initialize_dwarf2_read): Don't register
7112 dwarf2_per_objfile_free as a registry cleanup.
7114 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7116 Avoid compilation errors in MinGW native builds
7118 The error is triggered by including python-internal.h, and the
7121 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7122 from build-gnulib/import/math.h:27,
7123 from d:/usr/Python26/include/pyport.h:235,
7124 from d:/usr/Python26/include/Python.h:58,
7125 from python/python-internal.h:94,
7126 from python/py-arch.c:24:
7127 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7131 This happens because Python headers define 'hypot' to expand t
7132 '_hypot' in the Windows builds.
7133 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7134 'hypoth'. This avoids a compilation error.
7136 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7138 * MAINTAINERS (Write After Approval): Fix ordering.
7140 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7142 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7144 2018-01-26 Alan Modra <amodra@gmail.com>
7146 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7147 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7148 Remove nop. Make const. Comment.
7149 (powerpc32_plt_stub_so_2): New.
7150 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7151 Correct count. Update uses.
7152 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7153 Move common code reading PLT entry word. Correct
7154 powerpc32_plt_stub PLT address calculation.
7155 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7156 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
7157 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
7158 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
7159 (ppc64_standard_linkage8): Likewise.
7160 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
7161 Correct insns description.
7162 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
7164 2018-01-24 Pedro Alves <palves@redhat.com>
7166 GCC PR libstdc++/83906
7167 * gdbtypes.c (operator==(const dynamic_prop &,
7168 const dynamic_prop &)): New.
7169 (operator==(const range_bounds &, const range_bounds &)): New.
7170 (check_types_equal): Use them instead of memcmp.
7171 * gdbtypes.h (operator==(const dynamic_prop &,
7172 const dynamic_prop &)): Declare.
7173 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
7174 (operator==(const range_bounds &, const range_bounds &)): Declare.
7175 (operator!=(const range_bounds &, const range_bounds &)): Declare.
7177 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7179 * s390-linux-tdep.c (s390_record_address_mask)
7180 (s390_record_calc_disp_common, s390_record_calc_disp)
7181 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7182 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7183 (s390_process_record): Move to s390-tdep.c.
7184 (s390_linux_init_abi_any): Adjust.
7185 * s390-tdep.c (s390_record_address_mask)
7186 (s390_record_calc_disp_common, s390_record_calc_disp)
7187 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7188 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7189 (s390_process_record): Moved from s390-linux-tdep.c
7190 (s390_gdbarch_init): Adjust.
7192 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7194 * s390-linux-nat.c (s390-tdep.h): New include.
7195 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7196 (HFILES_NO_SRCDIR): Add s390-tdep.h.
7197 (ALLDEPFILES): Add s390-tdep.c.
7198 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7199 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7200 * s390-tdep.h: ...this. New file.
7201 * s390-linux-tdep.c (s390-tdep.h): New include.
7202 (_initialize_s390_tdep): Rename to...
7203 (_initialize_s390_linux_tdep): ...this and adjust.
7204 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7205 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7207 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7208 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7209 (s390_is_partial_instruction, s390_software_single_step)
7210 (is_non_branch_ril, s390_displaced_step_copy_insn)
7211 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7212 (s390_prologue_data, s390_addr, s390_store, s390_load)
7213 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7214 (s390_register_call_saved, s390_guess_tracepoint_registers)
7215 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7216 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7217 (s390_pseudo_register_name, s390_pseudo_register_type)
7218 (s390_pseudo_register_read, s390_pseudo_register_write)
7219 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7220 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7221 (s390_addr_bits_remove, s390_address_class_type_flags)
7222 (s390_address_class_type_flags_to_name)
7223 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7224 (s390_function_arg_float, s390_function_arg_vector)
7225 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7226 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7227 (s390_frame_align, s390_register_return_value, s390_return_value)
7228 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7229 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7230 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7231 (s390_trad_frame_prev_register, s390_unwind_cache)
7232 (s390_prologue_frame_unwind_cache)
7233 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7234 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7235 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7236 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7237 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7238 (s390_frame_base_address, s390_local_base_address)
7239 (s390_frame_base, s390_gcc_target_options)
7240 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7241 (s390_validate_reg_range, s390_tdesc_valid)
7242 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7243 * s390-tdep.c: ...this. New file.
7245 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7247 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7248 (s390_process_record, s390_gdbarch_tdep_alloc)
7249 (s390_linux_init_abi_any): Use/set new hook.
7251 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7253 * s390-linux-tdep.c (osabi.h): New include.
7254 (s390_linux_init_abi_31, s390_linux_init_abi_64)
7255 (s390_linux_init_abi_any): New functions.
7256 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7258 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7260 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7261 tdesc_has_registers check
7263 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7265 * s390-linux-tdep.c (s390_tdesc_valid): New function.
7266 (s390_validate_reg_range): New macro.
7267 (s390_gdbarch_init): Adjust.
7269 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7271 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7272 (s390_gdbarch_tdep_alloc): Adjust.
7273 (s390_gdbarch_init): Adjust.
7275 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7277 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
7278 <have_tdb>: Change type to bool.
7279 (s390_gdbarch_tdep_alloc): Adjust.
7280 (s390_gdbarch_init): Adjust.
7282 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7284 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
7285 (gdbarch_tdep) <have_upper, have_vx>: New fields.
7286 (s390_gdbarch_tdep_alloc): New function.
7287 (s390_gdbarch_init): Allocate tdep at start and use its fields
7288 instead of separate variables.
7290 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7292 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7293 when looking for cached gdbarch and add comment for remaining.
7295 2018-01-22 Pedro Alves <palves@redhat.com>
7296 Sergio Durigan Junior <sergiodj@redhat.com>
7298 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7301 2018-01-22 Maciej W. Rozycki <macro@mips.com>
7303 * MAINTAINERS: Update my company e-mail address.
7305 2018-01-22 Yao Qi <yao.qi@linaro.org>
7307 * regcache.c (cooked_write_test): New function.
7308 (_initialize_regcache): Register the test.
7310 2018-01-22 Yao Qi <yao.qi@linaro.org>
7312 * ia64-tdep.c (ia64_pseudo_register_read): Call
7313 regcache->cooked_read instead of regcache_cooked_read_unsigned.
7314 * m32c-tdep.c (m32c_cat_read): Likewise.
7315 (m32c_r3r2r1r0_read): Likewise.
7316 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7317 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7319 2018-01-22 Yao Qi <yao.qi@linaro.org>
7321 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
7322 method raw_read instead of regcache_raw_read.
7323 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7324 * arm-tdep.c (arm_neon_quad_read): Likewise.
7325 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7326 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7327 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7328 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
7329 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7330 (i386_pseudo_register_read_into_value): Likewise.
7331 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7332 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7333 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7334 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
7335 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
7336 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7337 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7338 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7339 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
7341 2018-01-22 Yao Qi <yao.qi@linaro.org>
7343 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
7344 * configure.tgt: Remove target mt.
7345 * mt-tdep.c: Remove.
7346 * regcache.c (cooked_read_test): Remove the check for mt.
7348 2018-01-22 Yao Qi <yao.qi@linaro.org>
7350 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
7351 instead of gdbarch_pseudo_register_read_value.
7353 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7355 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7358 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7360 * linespec.c (create_sals_line_offset): Remove code that preserved
7361 the symtab_and_line's line number.
7363 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7365 * varobj.c (varobj_create): Don't set valid_block when creating a
7368 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7370 * varobj.c (varobj_create): Remove out of date comment.
7372 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7375 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7376 updating innermost block.
7377 * parse.c (innermost_block_tracker::update): Take extra type
7378 parameter, and check types match before updating innermost block.
7379 (write_dollar_variable): Update innermost block for registers.
7380 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7381 (innermost_block_tracker::innermost_block_tracker): Initialise
7383 (innermost_block_tracker::reset): Take type parameter.
7384 (innermost_block_tracker::update): Take type parameter, and pass
7385 type through as needed.
7386 (innermost_block_tracker::m_types): New member.
7387 * varobj.c (varobj_create): Pass type when reseting innermost
7390 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7392 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7393 * ada-lang.c (resolve_subexp): Likewise.
7394 * breakpoint.c (set_breakpoint_condition) Likewise.
7395 (watch_command_1) Likewise.
7396 * c-exp.y (variable): Likewise.
7397 * d-exp.y (PrimaryExpression): Likewise.
7398 * f-exp.y (variable): Likewise.
7399 * go-exp.y (variable): Likewise.
7400 * m2-exp.y (variable): Likewise.
7401 * objfiles.c (objfile::~objfile): Likewise.
7402 * p-exp.y (variable): Likewise.
7403 * parse.c (innermost_block): Change type.
7404 * parser-defs.h (class innermost_block_tracker): New.
7405 (innermost_block): Change to innermost_block_tracker.
7406 * printcmd.c (display_command): Switch to innermost_block API.
7407 (do_one_display): Likewise.
7408 * rust-exp.y (do_one_display): Likewise.
7409 * symfile.c (clear_symtab_users): Likewise.
7410 * varobj.c (varobj_create): Switch to innermost_block API, replace
7411 use of innermost_block with block stored on varobj object.
7413 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7415 * expression.h (innermost_block): Remove declaration.
7416 * varobj.c: Add 'parser-defs.h' include.
7418 2018-01-19 Tom Tromey <tom@tromey.com>
7420 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7421 symbols in the static and global blocks.
7423 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7425 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7426 gdb_ptrace.h, and move including gdb_wait.h ...
7427 * nat/linux-ptrace.h: ... to here.
7429 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7431 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7432 inf_ptrace_detach_success.
7433 (inf_ptrace_detach_success): Add inferior parameter, use it
7434 instead of inferior_ptid, pass it to detach_inferior.
7435 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7437 * inferior.c (detach_inferior): Add overload that takes an
7439 * inferior.h (detach_inferior): Likewise.
7440 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7441 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7442 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7444 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7446 * target.h (struct target_ops) <to_detach>: Add inferior
7448 (target_detach): Likewise.
7449 * target.c (dispose_inferior): Pass inferior down.
7450 (target_detach): Pass inferior down. Assert that it is equal to
7451 the current inferior.
7452 * aix-thread.c (aix_thread_detach): Pass inferior down.
7453 * corefile.c (core_file_command): Pass current_inferior() down.
7454 * corelow.c (core_detach): Add inferior parameter.
7455 * darwin-nat.c (darwin_detach): Likewise.
7456 * gnu-nat.c (gnu_detach): Likewise.
7457 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7458 * infcmd.c (detach_command): Pass current_inferior() down to
7460 * infrun.c (follow_fork_inferior): Pass parent_inf to
7462 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7464 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7465 * linux-thread-db.c (thread_db_detach): Likewise.
7466 * nto-procfs.c (procfs_detach): Likewise.
7467 * procfs.c (procfs_detach): Likewise.
7468 * record.c (record_detach): Likewise.
7469 * record.h (struct inferior): Forward-declare.
7470 (record_detach): Add inferior parameter.
7471 * remote-sim.c (gdbsim_detach): Likewise.
7472 * remote.c (remote_detach_1): Likewise.
7473 (remote_detach): Likewise.
7474 (extended_remote_detach): Likewise.
7475 * sol-thread.c (sol_thread_detach): Likewise.
7476 * target-debug.h (target_debug_print_inferior_p): New macro.
7477 * target-delegates.c: Re-generate.
7478 * top.c (kill_or_detach): Pass inferior down to target_detach.
7479 * windows-nat.c (windows_detach): Add inferior parameter.
7481 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7483 * target.h (struct target_ops) <to_detach>: Remove args
7485 (target_detach): Likewise.
7486 * target.c (dispose_inferior): Adjust.
7487 (target_detach): Remove args parameter, adjust.
7488 * aix-thread.c (aix_thread_detach): Adjust.
7489 * corefile.c (core_file_command): Adjust.
7490 * corelow.c (core_detach): Adjust.
7491 * darwin-nat.c (darwin_detach): Adjust.
7492 * gnu-nat.c (gnu_detach): Adjust.
7493 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7494 * infcmd.c (detach_command): Adjust
7495 * infrun.c (follow_fork_inferior): Adjust.
7496 (handle_vfork_child_exec_or_exit): Adjust.
7497 * linux-fork.c (linux_fork_detach): Remove args parameter.
7498 * linux-fork.h (linux_fork_detach): Likewise.
7499 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7500 * linux-thread-db.c (thread_db_detach): Likewise.
7501 * nto-procfs.c (procfs_detach): Likewise.
7502 * procfs.c (procfs_detach): Likewise.
7503 (do_detach): Remove signo parameter.
7504 * record.c (record_detach): Remove args parameter.
7505 * record.h (record_detach): Likewise.
7506 * remote-sim.c (gdbsim_detach): Likewise.
7507 * remote.c (remote_detach_1): Likewise.
7508 (remote_detach): Likewise.
7509 (extended_remote_detach): Likewise.
7510 * sol-thread.c (sol_thread_detach): Likewise.
7511 * target-delegates.c: Re-generate.
7512 * top.c (struct qt_args) <args>: Remove field.
7513 (kill_or_detach): Don't pass args.
7514 (quit_force): Don't set args.
7515 * windows-nat.c (windows_detach): Remove args parameter.
7517 2018-01-19 Yao Qi <yao.qi@linaro.org>
7519 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7520 (arm_linux_init_abi): Install it.
7522 2018-01-19 Yao Qi <yao.qi@linaro.org>
7524 * osabi.c (gdb_osabi_names): Extend the regexp for
7525 arm-linux-gnueabihf.
7527 2018-01-18 Yao Qi <yao.qi@linaro.org>
7529 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7531 (abbrev_table::add_abbrev): Update.
7532 (abbrev_table::lookup_abbrev): Update.
7534 2018-01-18 Yao Qi <yao.qi@linaro.org>
7536 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7538 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7540 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7543 2018-01-17 Tom Tromey <tom@tromey.com>
7545 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7547 2018-01-17 Tom Tromey <tom@tromey.com>
7549 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7550 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7551 (create_array_type_with_stride): Update.
7552 * dwarf2read.c (set_die_type): Update.
7554 2018-01-17 Tom Tromey <tom@tromey.com>
7556 * dwarf2read.c (delayed_method_info): Remove typedef.
7557 (dwarf2_cu::method_info): Now a std::vector.
7558 (add_to_method_list): Update.
7559 (free_delayed_list): Remove.
7560 (compute_delayed_physnames): Update.
7561 (process_full_comp_unit, process_full_type_unit): Clear the method
7562 list. Remove cleanups.
7563 (psymtab_include_file_name): Add name_holder parameter. Use
7565 (dwarf_decode_lines): Update.
7567 2018-01-17 Tom Tromey <tom@tromey.com>
7568 Simon Marchi <simon.marchi@ericsson.com>
7570 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7571 (dwarf2_per_objfile::free_cached_comp_units)
7572 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7573 (init_cutu_and_read_dies_no_follow): Update.
7574 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7575 (dwarf2_cu::~dwarf2_cu): New.
7576 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7577 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7579 2018-01-17 Tom Tromey <tom@tromey.com>
7580 Simon Marchi <simon.marchi@ericsson.com>
7582 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7583 (struct die_reader_specs) <abbrev_table>: New member.
7584 (struct abbrev_table): Add constructor.
7585 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7586 <abbrev_obstack>: Now an auto_obstack.
7587 (abbrev_table_up): New typedef.
7588 (init_cu_die_reader): Add abbrev_table parameter.
7589 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7590 Add result_dwo_abbrev_table.
7591 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7592 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7594 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7596 (skip_children): Update.
7597 (abbrev_table::alloc_abbrev): Rename from
7598 abbrev_table_alloc_abbrev.
7599 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7600 (abbrev_table::lookup_abbrev): Rename from
7601 abbrev_table_lookup_abbrev.
7602 (abbrev_table_read_table): Return abbrev_table_up.
7603 (abbrev_table_free, abbrev_table_free_cleanup)
7604 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7605 (load_partial_dies): Update.
7607 2018-01-17 Tom Tromey <tom@tromey.com>
7609 * dwarf2read.c (dwarf2_compute_name): Update comment.
7610 (read_func_scope, read_variable): Update.
7611 (new_symbol): Remove.
7612 (new_symbol_full): Rename to new_symbol.
7614 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7617 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7618 a warning instead of throwing an error, set section size to 0 and return
7620 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7622 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7624 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7626 (linux_ptrace_attach_fail_reason_string): Likewise.
7627 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7629 (linux_ptrace_attach_fail_reason_string): Likewise.
7630 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7632 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7634 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7636 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7639 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7640 checking for fs_base/gs_base fields in struct user_regs_struct.
7641 * configure: Regenerate.
7643 2018-01-17 Yao Qi <yao.qi@linaro.org>
7645 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7647 (aarch64_linux_init_abi): Install it to gdbarch hook
7650 2018-01-15 Pedro Alves <palves@redhat.com>
7652 * common/signals-state-save-restore.c
7653 (save_original_signals_state): Fix typos.
7655 2017-01-12 Tom Tromey <tom@tromey.com>
7656 Sergio Durigan Junior <sergiodj@redhat.com>
7658 * Makefile.in (install-only): Install gdb-add-index.
7660 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7662 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7664 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7666 * infrun.c (keep_going_pass_signal): Clear step-over info when
7667 insert_breakpoints fails.
7669 2018-01-11 Pedro Alves <palves@redhat.com>
7672 * infrun.c (resume): Rename to ...
7673 (resume_1): ... this.
7674 (resume): Reimplement as wrapper around resume_1.
7676 2018-01-11 Pedro Alves <palves@redhat.com>
7679 * remote.c (remote_parse_stop_reply): Default to the last-set
7680 general thread instead of to 'magic_null_ptid'.
7682 2018-01-10 Pedro Alves <palves@redhat.com>
7684 * language.h (language_get_symbol_name_matcher): Rename ...
7685 (get_symbol_name_matcher): ... this.
7686 * language.c (language_get_symbol_name_matcher): Ditto.
7687 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7690 2018-01-10 Pedro Alves <palves@redhat.com>
7694 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7695 Adjust to use language_get_symbol_name_matcher instead of
7696 language_defn::la_get_symbol_name_matcher.
7697 * language.c (language_get_symbol_name_matcher): If in Ada mode
7698 and the lookup name is a verbatim match, return Ada's matcher.
7699 * language.h (language_get_symbol_name_matcher): Adjust comment.
7700 (ada_lookup_name_info::verbatim_p):: New method.
7702 2018-01-10 Pedro Alves <palves@redhat.com>
7705 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7706 minsym's language is language_auto or language_cplus, pass down
7707 language_ada instead.
7708 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7710 2018-01-10 Pedro Alves <palves@redhat.com>
7713 * minsyms.c (linkage_name_str): New function.
7714 (iterate_over_minimal_symbols): Use it.
7716 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7718 * NEWS: Document that 'info proc' now works on FreeBSD.
7720 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7722 * configure.ac: Check for kinfo_getfile in libutil.
7723 * configure: Regenerate.
7724 * config.in: Regenerate.
7725 * fbsd-nat.c: Include "fbsd-tdep.h".
7726 (fbsd_fetch_cmdline): New.
7727 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7728 rather than calling error.
7729 (fbsd_info_proc): New.
7730 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7731 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7732 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7734 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7736 * fbsd-nat.c (struct free_deleter): Remove.
7737 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7739 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7741 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7742 NULL for an empty pathname.
7744 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7746 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7747 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7748 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7749 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7750 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7751 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7752 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7753 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7754 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7755 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7756 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7757 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7758 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7759 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7760 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7762 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7764 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7765 (gnu_xfer_auxv): New function.
7766 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7769 2018-01-08 Yao Qi <yao.qi@linaro.org>
7770 Simon Marchi <simon.marchi@ericsson.com>
7772 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7774 (COMMON_OBS): Remove selftest.o.
7775 * configure.ac: Append selftest-arch.c and common/selftest.c to
7776 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7777 * configure: Re-generated.
7778 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7780 (maintenance_info_selftests): Likewise.
7782 2018-01-08 Xavier Roirand <roirand@adacore.com>
7784 * ada-valprint.c (val_print_packed_array_elements): Use
7785 proper number of elements when printing an array indexed
7786 by an enumeration type.
7788 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7790 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7791 (dw2_get_file_names_reader): Adjust.
7792 (lookup_dwo_signatured_type): Adjust.
7793 (lookup_dwp_signatured_type): Adjust.
7794 (lookup_signatured_type): Adjust.
7795 (create_type_unit_group): Adjust.
7796 (get_type_unit_group): Adjust.
7797 (process_psymtab_comp_unit_reader): Adjust.
7798 (build_type_psymtabs_reader): Adjust.
7799 (scan_partial_symbols): Adjust.
7800 (add_partial_symbol): Adjust.
7801 (add_partial_subprogram): Adjust.
7802 (peek_die_abbrev): Adjust.
7803 (fixup_go_packaging): Adjust.
7804 (process_imported_unit_die): Adjust.
7805 (dwarf2_compute_name): Adjust.
7806 (dwarf2_physname): Adjust.
7807 (read_import_statement): Adjust.
7808 (handle_DW_AT_stmt_list): Adjust.
7809 (read_file_scope): Adjust.
7810 (read_func_scope): Adjust.
7811 (read_lexical_block_scope): Adjust.
7812 (read_call_site_scope): Adjust.
7813 (read_variable): Adjust.
7814 (dwarf2_rnglists_process): Adjust.
7815 (dwarf2_ranges_process): Adjust.
7816 (dwarf2_ranges_read): Adjust.
7817 (dwarf2_get_pc_bounds): Adjust.
7818 (dwarf2_record_block_ranges): Adjust.
7819 (dwarf2_add_field): Adjust.
7820 (dwarf2_add_member_fn): Adjust.
7821 (read_structure_type): Adjust.
7822 (process_structure_scope): Adjust.
7823 (read_enumeration_type): Adjust.
7824 (read_array_type): Adjust.
7825 (mark_common_block_symbol_computed): Adjust.
7826 (read_common_block): Adjust.
7827 (read_namespace_type): Adjust.
7828 (read_namespace): Adjust.
7829 (read_module_type): Adjust.
7830 (read_tag_pointer_type): Adjust.
7831 (read_tag_ptr_to_member_type): Adjust.
7832 (read_tag_string_type): Adjust.
7833 (read_subroutine_type): Adjust.
7834 (read_typedef): Adjust.
7835 (read_base_type): Adjust.
7836 (attr_to_dynamic_prop): Adjust.
7837 (read_subrange_type): Adjust.
7838 (read_unspecified_type): Adjust.
7839 (dwarf2_read_abbrevs): Adjust.
7840 (load_partial_dies): Adjust.
7841 (read_partial_die): Adjust.
7842 (find_partial_die): Adjust.
7843 (guess_partial_die_structure_name): Adjust.
7844 (fixup_partial_die): Adjust.
7845 (read_attribute_value): Adjust.
7846 (read_addr_index): Adjust.
7847 (read_addr_index_from_leb128): Adjust.
7848 (read_str_index): Adjust.
7849 (dwarf2_string_attr): Adjust.
7850 (get_debug_line_section): Adjust.
7851 (dwarf_decode_line_header): Adjust.
7852 (lnp_state_machine::check_line_address): Adjust.
7853 (dwarf_decode_lines_1): Adjust.
7854 (dwarf_decode_lines): Adjust.
7855 (dwarf2_start_symtab): Adjust.
7856 (var_decode_location): Adjust.
7857 (new_symbol_full): Adjust.
7858 (dwarf2_const_value_data): Adjust.
7859 (dwarf2_const_value_attr): Adjust.
7860 (dwarf2_const_value): Adjust.
7862 (die_containing_type): Adjust.
7863 (build_error_marker_type): Adjust.
7864 (lookup_die_type): Adjust.
7865 (guess_full_die_structure_name): Adjust.
7866 (anonymous_struct_prefix): Adjust.
7867 (determine_prefix): Adjust.
7868 (dwarf2_name): Adjust.
7869 (follow_die_ref_or_sig): Adjust.
7870 (follow_die_offset): Adjust.
7871 (follow_die_ref): Adjust.
7872 (follow_die_sig_1): Adjust.
7873 (follow_die_sig): Adjust.
7874 (get_signatured_type): Adjust.
7875 (get_DW_AT_signature_type): Adjust.
7876 (decode_locdesc): Adjust.
7877 (dwarf_decode_macros): Adjust.
7878 (cu_debug_loc_section): Adjust.
7879 (fill_in_loclist_baton): Adjust.
7880 (dwarf2_symbol_mark_computed): Adjust.
7881 (init_one_comp_unit): Don't assign
7882 dwarf2_cu::dwarf2_per_objfile.
7883 (set_die_type): Adjust.
7885 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7887 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7888 <dwarf2_per_objfile>: New field.
7889 (dwarf2_per_objfile): Remove global.
7890 (get_dwarf2_per_objfile): New function.
7891 (set_dwarf2_per_objfile): New function.
7892 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7894 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7895 (read_abbrev_offset): Likewise.
7896 (read_indirect_string): Likewise.
7897 (read_indirect_line_string): Likewise.
7898 (read_indirect_string_at_offset): Likewise.
7899 (read_indirect_string_from_dwz): Likewise.
7900 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7902 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7903 (create_all_comp_units): Change objfile parameter to
7905 (create_all_type_units): Likewise.
7906 (process_queue): Add dwarf2_per_objfile parameter.
7907 (read_and_check_comp_unit_head): Likewise.
7908 (lookup_dwo_unit_in_dwp): Likewise.
7909 (get_dwp_file): Likewise.
7910 (process_cu_includes): Likewise.
7911 (struct free_dwo_file_cleanup_data): New struct.
7912 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7913 set_dwarf2_per_objfile.
7914 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7915 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7916 context, adjust calls.
7917 (dw2_instantiate_symtab): Likewise.
7918 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7919 (dw2_get_cu): Likewise.
7920 (create_cu_from_index_list): Change objfile parameter to
7922 (create_cus_from_index_list): Get dwarf2_per_objfile from
7923 context, adjust calls.
7924 (create_cus_from_index): Likewise.
7925 (create_signatured_type_table_from_index): Change objfile
7926 parameter to dwarf2_per_objfile.
7927 (create_signatured_type_table_from_debug_names): Change objfile
7928 parameter to dwarf2_per_objfile.
7929 (create_addrmap_from_index): Likewise.
7930 (create_addrmap_from_aranges): Likewise.
7931 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7932 (dw2_setup): Remove.
7933 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7935 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7936 get_dwarf2_per_objfile.
7937 (dw2_forget_cached_source_info): Likewise.
7938 (dw2_map_symtabs_matching_filename): Likewise.
7939 (struct dw2_symtab_iterator) <index>: Remove.
7940 <dwarf2_per_objfile>: New field.
7941 (dw2_symtab_iter_init): Replace index parameter with
7943 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7944 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7945 (dw2_print_stats): Likewise.
7946 (dw2_dump): Likewise.
7947 (dw2_expand_symtabs_for_function): Likewise.
7948 (dw2_expand_all_symtabs): Likewise.
7949 (dw2_expand_symtabs_with_fullname): Likewise.
7950 (dw2_expand_marked_cus): Replace index and objfile parameters
7951 with dwarf2_per_objfile.
7952 (dw_expand_symtabs_matching_file_matcher): Add
7953 dwarf2_per_objfile parameter and adjust calls.
7954 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7956 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7957 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7959 (create_cus_from_debug_names_list): Replace objfile parameter
7960 with dwarf2_per_objfile and adjust calls.
7961 (create_cus_from_debug_names): Likewise.
7962 (dwarf2_read_debug_names): Likewise.
7963 (mapped_debug_names::namei_to_name): Adjust call.
7964 (dw2_debug_names_iterator::next): Likewise.
7965 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7966 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7967 (dw2_debug_names_dump): Likewise.
7968 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7969 (dw2_debug_names_expand_symtabs_matching): Likewise.
7970 (dwarf2_initialize_objfile): Likewise.
7971 (dwarf2_build_psymtabs): Likewise.
7972 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7974 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7975 (read_and_check_comp_unit_head): Likewise.
7976 (read_abbrev_offset): Likewise.
7977 (create_debug_type_hash_table): Likewise.
7978 (create_debug_types_hash_table): Likewise.
7979 (create_all_type_units): Replace objfile parameter with
7981 (add_type_unit): Add dwarf2_per_objfile parameter.
7982 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7983 with dwarf2_per_objfile.
7984 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7985 (lookup_dwp_signatured_type): Likewise.
7986 (lookup_signatured_type): Likewise.
7987 (read_cutu_die_from_dwo): Likewise.
7988 (init_tu_and_read_dwo_dies): Likewise.
7989 (init_cutu_and_read_dies): Likewise.
7990 (init_cutu_and_read_dies_no_follow): Likewise.
7991 (allocate_type_unit_groups_table): Add objfile parameter.
7992 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7993 (get_type_unit_group): Likewise.
7994 (process_psymtab_comp_unit): Update call.
7995 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7996 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7997 (print_tu_stats): Likewise.
7998 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8000 (build_type_psymtabs): Change objfile parameter to
8002 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8003 passed in void* parameter.
8004 (process_skeletonless_type_units): Change objfile parameter to
8006 (set_partial_user): Likewise.
8007 (dwarf2_build_psymtabs_hard): Likewise.
8008 (read_comp_units_from_section): Likewise.
8009 (create_all_comp_units): Likewise.
8010 (scan_partial_symbols): Update calls.
8011 (add_partial_symbol): Likewise.
8012 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8013 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8014 (process_queue): Add dwarf2_per_objfile parameter.
8015 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8016 (compute_compunit_symtab_includes): Likewise.
8017 (process_cu_includes): Add dwarf2_per_objfile parameter.
8018 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8019 (process_full_type_unit): Likewise.
8020 (process_imported_unit_die): Update call.
8021 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8022 (read_file_scope): Likewise.
8023 (allocate_dwo_file_hash_table): Add objfile parameter.
8024 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8025 (create_cus_hash_table): Likewise.
8026 (create_dwp_hash_table): Likewise.
8027 (create_dwo_unit_in_dwp_v1): Likewise.
8028 (create_dwp_v2_section): Likewise.
8029 (create_dwo_unit_in_dwp_v2): Likewise.
8030 (lookup_dwo_unit_in_dwp): Likewise.
8031 (try_open_dwop_file): Likewise.
8032 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8033 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8034 cleanup to include a reference to dwarf2_per_objfile.
8035 (open_dwp_file): Add dwarf2_per_objfile parameter.
8036 (open_and_init_dwp_file): Likewise.
8037 (get_dwp_file): Likewise.
8038 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8039 (queue_and_load_all_dwo_tus): Update call.
8040 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8042 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8043 (dwarf2_ranges_process): Likewise.
8044 (dwarf2_get_pc_bounds): Likewise.
8045 (mark_common_block_symbol_computed): Likewise.
8046 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8047 (dwarf2_read_abbrevs): Update call.
8048 (read_partial_die): Use dwarf2_per_objfile from cu.
8049 (find_partial_die): Likewise.
8050 (fixup_partial_die): Likewise.
8051 (read_attribute_value): Likewise.
8052 (read_indirect_string_at_offset_from): Add objfile parameter.
8053 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8055 (read_indirect_string_from_dwz): Add objfile parameter.
8056 (read_indirect_string): Add objfile parameter.
8057 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8058 (read_addr_index): Use dwarf2_per_objfile from cu.
8059 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8061 (read_str_index): Use dwarf2_per_objfile from cu.
8062 (get_debug_line_section): Likewise.
8063 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8064 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8065 (new_symbol_full): Use dwarf2_per_objfile from cu.
8066 (build_error_marker_type): Likewise.
8067 (lookup_die_type): Likewise.
8068 (determine_prefix): Likewise.
8069 (follow_die_offset): Likewise.
8070 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8071 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8072 (dwarf2_fetch_die_type_sect_off): Likewise.
8073 (dwarf2_get_die_type): Likewise.
8074 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8075 (get_signatured_type): Likewise.
8076 (get_DW_AT_signature_type): Likewise.
8077 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8078 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8079 (cu_debug_loc_section): Likewise.
8080 (fill_in_loclist_baton): Likewise.
8081 (dwarf2_symbol_mark_computed): Likewise.
8082 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8084 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8086 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8087 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8088 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8089 (set_die_type): Use dwarf2_free_objfile from cu.
8090 (get_die_type_at_offset): Likewise.
8091 (dwarf2_per_objfile_free): Don't assign global variable.
8092 (debug_names) <constructor>: Add dwarf2_per_objfile
8093 parameter, update m_debugstrlookup construction.
8094 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8096 <m_dwarf2_per_objfile>: New field.
8097 <lookup>: Use m_dwarf2_per_objfile.
8098 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8099 (psyms_seen_size): Likewise.
8100 (write_gdbindex): Replace objfile parameter with
8102 (write_debug_names): Likewise.
8103 (write_psymtabs_to_index): Likewise.
8104 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8107 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8109 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8110 <dwarf2_per_objfile>: New field.
8111 (struct dwarf2_per_cu_data) <objfile>: Remove.
8112 <dwarf2_per_objfile>: New field.
8113 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8115 (create_signatured_type_table_from_index): Likewise.
8116 (create_debug_type_hash_table): Likewise.
8117 (fill_in_sig_entry_from_dwo_entry): Likewise.
8118 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8119 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8121 (create_partial_symtab): Access objfile through
8123 (process_psymtab_comp_unit_reader): Likewise.
8124 (read_comp_units_from_section): Likewise.
8125 (scan_partial_symbols): Likewise.
8126 (add_partial_symbol): Likewise.
8127 (add_partial_subprogram): Likewise.
8128 (peek_die_abbrev): Likewise.
8129 (fixup_go_packaging): Likewise.
8130 (process_full_comp_unit): Likewise.
8131 (process_full_type_unit): Likewise.
8132 (process_imported_unit_die): Likewise.
8133 (dwarf2_compute_name): Likewise.
8134 (dwarf2_physname): Likewise.
8135 (read_import_statement): Likewise.
8136 (create_cus_hash_table): Assign dwarf2_physname instead of
8138 (read_func_scope): Access objfile through dwarf2_per_objfile.
8139 (read_lexical_block_scope): Likewise.
8140 (read_call_site_scope): Likewise.
8141 (read_variable): Likewise.
8142 (dwarf2_rnglists_process): Likewise.
8143 (dwarf2_ranges_process): Likewise.
8144 (dwarf2_ranges_read): Likewise.
8145 (dwarf2_record_block_ranges): Likewise.
8146 (dwarf2_add_field): Likewise.
8147 (dwarf2_add_member_fn): Likewise.
8148 (read_structure_type): Likewise.
8149 (process_structure_scope): Likewise.
8150 (read_enumeration_type): Likewise.
8151 (read_array_type): Likewise.
8152 (read_common_block): Likewise.
8153 (read_namespace_type): Likewise.
8154 (read_namespace): Likewise.
8155 (read_module_type): Likewise.
8156 (read_tag_pointer_type): Likewise.
8157 (read_tag_ptr_to_member_type): Likewise.
8158 (read_tag_string_type): Likewise.
8159 (read_subroutine_type): Likewise.
8160 (read_typedef): Likewise.
8161 (read_base_type): Likewise.
8162 (attr_to_dynamic_prop): Likewise.
8163 (read_subrange_type): Likewise.
8164 (read_unspecified_type): Likewise.
8165 (load_partial_dies): Likewise.
8166 (read_partial_die): Likewise.
8167 (find_partial_die): Likewise.
8168 (guess_partial_die_structure_name): Likewise.
8169 (fixup_partial_die): Likewise.
8170 (read_attribute_value): Likewise.
8171 (read_addr_index_from_leb128): Likewise.
8172 (dwarf2_read_addr_index): Likewise.
8173 (dwarf2_string_attr): Likewise.
8174 (lnp_state_machine::check_line_address): Likewise.
8175 (dwarf_decode_lines_1): Likewise.
8176 (dwarf_decode_lines): Likewise.
8177 (dwarf2_start_symtab): Likewise.
8178 (var_decode_location): Likewise.
8179 (new_symbol_full): Likewise.
8180 (dwarf2_const_value_data): Likewise.
8181 (dwarf2_const_value_attr): Likewise.
8182 (dwarf2_const_value): Likewise.
8183 (die_type): Likewise.
8184 (die_containing_type): Likewise.
8185 (lookup_die_type): Likewise.
8186 (guess_full_die_structure_name): Likewise.
8187 (anonymous_struct_prefix): Likewise.
8188 (dwarf2_name): Likewise.
8189 (follow_die_ref_or_sig): Likewise.
8190 (follow_die_offset): Likewise.
8191 (follow_die_ref): Likewise.
8192 (dwarf2_fetch_die_loc_sect_off): Likewise.
8193 (dwarf2_fetch_constant_bytes): Likewise.
8194 (dwarf2_fetch_die_type_sect_off): Likewise.
8195 (dwarf2_get_die_type): Likewise.
8196 (follow_die_sig): Likewise.
8197 (decode_locdesc): Likewise.
8198 (dwarf2_per_cu_objfile): Likewise.
8199 (dwarf2_per_cu_text_offset): Likewise.
8200 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8202 (set_die_type): Access objfile through
8205 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8207 * valprint.c (converted_character_d): Remove typedef.
8208 (DEF_VEC_O (converted_character_d)): Remove.
8209 (count_next_character): Use std::vector.
8210 (print_converted_chars_to_obstack): Likewise.
8211 (generic_printstr): Likewise.
8213 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8215 * xml-support.h (struct gdb_xml_value): Add constructor.
8216 <value>: Change type to unique_xmalloc_ptr.
8217 (gdb_xml_value_s): Remove typedef.
8218 (DEF_VEC_O (gdb_xml_value_s)): Remove.
8219 (gdb_xml_element_start_handler): Change parameter type to
8221 (xml_find_attribute): Likewise.
8222 * xml-support.c (xml_find_attribute): Change parameter type to
8223 std::vector and adjust.
8224 (gdb_xml_values_cleanup): Remove.
8225 (gdb_xml_parser::start_element): Adjust to std::vector.
8226 (xinclude_start_include): Change paraeter type to std::vector
8228 * btrace.c (check_xml_btrace_version): Likewise.
8229 (parse_xml_btrace_block): Likewise.
8230 (parse_xml_btrace_pt_config_cpu): Likewise.
8231 (parse_xml_btrace_pt): Likewise.
8232 (parse_xml_btrace_conf_bts): Likewise.
8233 (parse_xml_btrace_conf_pt): Likewise.
8234 * memory-map.c (memory_map_start_memory): Likewise.
8235 (memory_map_start_property): Likewise.
8236 * osdata.c (osdata_start_osdata): Likewise.
8237 (osdata_start_item): Likewise.
8238 (osdata_start_column): Likewise.
8239 * remote.c (start_thread): Likewise.
8240 * solib-aix.c (library_list_start_library): Likewise.
8241 (library_list_start_list): Likewise.
8242 * solib-svr4.c (library_list_start_library): Likewise.
8243 (svr4_library_list_start_list): Likewise.
8244 * solib-target.c (library_list_start_segment): Likewise.
8245 (library_list_start_section): Likewise.
8246 (library_list_start_library): Likewise.
8247 (library_list_start_list): Likewise.
8248 * tracepoint.c (traceframe_info_start_memory): Likewise.
8249 (traceframe_info_start_tvar): Likewise.
8250 * xml-syscall.c (syscall_start_syscall): Likewise.
8251 * xml-tdesc.c (tdesc_start_target): Likewise.
8252 (tdesc_start_feature): Likewise.
8253 (tdesc_start_reg): Likewise.
8254 (tdesc_start_union): Likewise.
8255 (tdesc_start_struct): Likewise.
8256 (tdesc_start_flags): Likewise.
8257 (tdesc_start_enum): Likewise.
8258 (tdesc_start_field): Likewise.
8259 (tdesc_start_enum_value): Likewise.
8260 (tdesc_start_vector): Likewise.
8262 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8264 * extension.h (struct xmethod_worker) <clone>: Remove.
8265 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8267 (python_xmethod_worker::clone): Remove.
8268 * valops.c (find_overload_match): Use std::move instead of
8271 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8273 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8274 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8275 <free_xmethod_worker_data>: Remove.
8276 <get_matching_xmethod_workers>: Chance VEC to std::vector.
8277 <get_xmethod_arg_types>: Remove.
8278 <get_xmethod_result_type>: Remove.
8279 <invoke_xmethod>: Remove.
8280 * extension.c (new_xmethod_worker): Remove.
8281 (clone_xmethod_worker): Remove.
8282 (get_matching_xmethod_workers): Return void, pass std::vector by
8284 (get_xmethod_arg_types): Rename to...
8285 (xmethod_worker::get_arg_types): ... this, and adjust.
8286 (get_xmethod_result_type): Rename to...
8287 (xmethod_worker::get_result_type): ... this, and adjust.
8288 (invoke_xmethod): Remove.
8289 (free_xmethod_worker): Remove.
8290 (free_xmethod_worker_vec): Remove.
8291 * extension.h (enum ext_lang_rc): Move here from
8293 (struct xmethod_worker): Add constructor and destructor.
8296 <invoke, clone, do_get_result_type, do_get_arg_types>: New
8297 virtual pure methods.
8298 <get_arg_types, get_result_type>: New methods.
8299 (xmethod_worker_ptr): Remove typedef.
8300 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8301 (xmethod_worker_vec): Remove typedef.
8302 (xmethod_worker_up): New typedef.
8303 (invoke_xmethod): Remove.
8304 (clone_xmethod_worker): Remove.
8305 (free_xmethod_worker): Remove.
8306 (free_xmethod_worker_vec): Remove.
8307 (get_xmethod_arg_types): Remove.
8308 (get_xmethod_result_type): Remove.
8309 * valops.c (find_method_list): Use std::vector, don't use
8310 intermediate vector.
8311 (value_find_oload_method_list): Use std::vector.
8312 (find_overload_match): Use std::vector.
8313 (find_oload_champ): Use std::vector.
8314 * value.c (value_free): Use operator delete.
8315 (value_of_xmethod): Rename to...
8316 (value_from_xmethod): ... this. Don't assign
8317 xmethod_worker::value, take rvalue-reference.
8318 (result_type_of_xmethod): Adjust.
8319 (call_xmethod): Adjust.
8320 * value.h: Include extension.h.
8321 (struct xmethod_worker): Don't forward-declare.
8322 (value_of_xmethod): Rename to...
8323 (value_from_xmethod): ... this, take rvalue-reference.
8324 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
8325 (struct python_xmethod_worker): ... this, add constructor and
8327 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
8328 (gdbpy_free_xmethod_worker_data): Rename to...
8329 (python_xmethod_worker::~python_xmethod_worker): ... this and
8331 (gdbpy_clone_xmethod_worker_data): Rename to...
8332 (python_xmethod_worker::clone): ... this and adjust.
8333 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
8335 (gdbpy_get_xmethod_arg_types): Rename to...
8336 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
8337 (gdbpy_get_xmethod_result_type): Rename to...
8338 (python_xmethod_worker::do_get_result_type): ... this and
8340 (gdbpy_invoke_xmethod): Rename to...
8341 (python_xmethod_worker::invoke): ... this and adjust.
8342 (new_python_xmethod_worker): Rename to...
8343 (python_xmethod_worker::python_xmethod_worker): ... this and
8345 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
8347 (gdbpy_free_xmethod_worker_data): Remove.
8348 (gdbpy_get_matching_xmethod_workers): Use std::vector.
8349 (gdbpy_get_xmethod_arg_types): Remove.
8350 (gdbpy_get_xmethod_result_type): Remove.
8351 (gdbpy_invoke_xmethod): Remove.
8352 * python/python.c (python_extension_ops): Remove obsolete
8355 2018-01-05 Pedro Alves <palves@redhat.com>
8358 * common/signals-state-save-restore.c
8359 (save_original_signals_state): New parameter 'quiet'. Warn if we
8360 find a custom handler preinstalled, instead of internal erroring.
8361 But only warn if !quiet.
8362 * common/signals-state-save-restore.h
8363 (save_original_signals_state): New parameter 'quiet'.
8364 * main.c (captured_main_1): Move save_original_signals_state call
8365 after option handling, and pass QUIET.
8367 2018-01-05 Pedro Alves <palves@redhat.com>
8369 * spu-tdep.c (spu_catch_start): Pass
8370 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8372 2018-01-05 Pedro Alves <palves@redhat.com>
8375 * ada-lang.c (literal_symbol_name_matcher): New function.
8376 (ada_get_symbol_name_matcher): Use it for
8377 symbol_name_match_type::SEARCH_NAME.
8378 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8379 it down instead of assuming symbol_name_match_type::FULL.
8380 * block.h (block_lookup_symbol): New parameter 'match_type'.
8381 * c-valprint.c (print_unpacked_pointer): Use
8382 lookup_symbol_search_name instead of lookup_symbol.
8383 * compile/compile-object-load.c (get_out_value_type): Pass down
8384 symbol_name_match_type::SEARCH_NAME.
8385 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8386 symbol_name_match_type::FULL.
8387 * cp-support.c (cp_get_symbol_name_matcher): Handle
8388 symbol_name_match_type::SEARCH_NAME.
8389 * infrun.c (insert_exception_resume_breakpoint): Use
8390 lookup_symbol_search_name.
8391 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8392 * psymtab.c (maintenance_check_psymtabs): Use
8393 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8394 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8396 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8397 if symbol_name_match_type::SEARCH_NAME.
8398 (lookup_symbol_in_language): Pass down
8399 symbol_name_match_type::FULL.
8400 (lookup_symbol_search_name): New.
8401 (lookup_language_this): Pass down
8402 symbol_name_match_type::SEARCH_NAME.
8403 (lookup_symbol_aux, lookup_local_symbol): New parameter
8404 'match_type'. Pass it down.
8405 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8406 (lookup_symbol_search_name): New declaration.
8407 (lookup_symbol_in_block): New 'match_type' parameter.
8409 2018-01-05 Pedro Alves <palves@redhat.com>
8412 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8414 (ada_lookup_symbol): Reimplement in terms of
8415 ada_lookup_symbol_list, bits factored out from
8416 ada_lookup_encoded_symbol.
8418 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8420 * ada-exp.y (write_object_renaming): When subscripting an array
8421 using a symbol as the index, pass the block in call to
8422 ada_lookup_encoded_symbol when looking that symbol up.
8424 2018-01-05 Jerome Guitton <guitton@adacore.com>
8426 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8429 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8431 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8432 the case where VALUE_LVAL (val0) is not lval_memory.
8434 2018-01-05 Xavier Roirand <roirand@adacore.com>
8436 * ada-valprint.c (print_optional_low_bound): Handle
8437 character-indexed array printing like boolean-indexed array
8440 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8442 * NEWS: Create a new section for the next release branch.
8443 Rename the section of the current branch, now that it has
8446 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8448 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8449 * version.in: Bump version to 8.1.50.DATE-git.
8451 2018-01-03 Xavier Roirand <roirand@adacore.com>
8453 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8455 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8457 (default_exception_support_info) <catch_handlers_sym>: Add field.
8458 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8459 (ada_exception_name_addr_1): Add "catch handlers" handling.
8460 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8462 (create_excep_cond_exprs) <ex>: Add parameter.
8463 (re_set_exception): Update create_excep_cond_exprs call.
8464 (print_it_exception, print_one_exception, print_mention_exception)
8465 (print_recreate_exception): Add "catch handler" handling.
8466 (allocate_location_catch_handlers, re_set_catch_handlers)
8467 (check_status_catch_handlers, print_it_catch_handlers)
8468 (print_one_catch_handlers, print_mention_catch_handlers)
8469 (print_recreate_catch_handlers): New function.
8470 (catch_handlers_breakpoint_ops): New variable.
8471 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8472 Add parameter. Add "catch handler" handling.
8473 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8474 Add "catch handler" handling.
8475 (ada_exception_catchpoint_cond_string): Add "catch handler"
8477 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8479 (catch_ada_handlers_command): New function.
8480 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8481 operations structure.
8482 (_initialize_ada_language): Add "catch handlers" command entry.
8483 * NEWS: Document "catch handlers" feature.
8485 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8487 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8488 account when creating the array type of the slice.
8489 (ada_value_slice): Likewise.
8491 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8493 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8495 (create_array_type_with_stride): Add byte_stride_prop parameter.
8496 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8497 New parameter. Update all callers in this file.
8498 (array_type_has_dynamic_stride): New function.
8499 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8500 of arrays with dynamic byte strides.
8501 * dwarf2read.c (read_array_type): Add support for dynamic
8502 DW_AT_byte_stride attributes.
8504 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8506 * dwarf2read.c (read_unspecified_type): Treat
8507 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8509 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8511 Update copyright year range in all GDB files.
8513 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8515 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8516 and gdb/testsuite/gdb.base/step-line.c.
8518 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8520 * copyright.py (main): Dump the contents of
8521 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8522 even if BY_HAND is empty.
8524 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8526 * top.c (print_gdb_version): Update Copyright year in version
8529 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8531 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8533 For older changes see ChangeLog-2017.
8539 version-control: never