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