solib-svr4: Pass down svr4_info as much as possible
[external/binutils.git] / gdb / ChangeLog
index a0d8d09..35d54a5 100644 (file)
@@ -1,3 +1,458 @@
+2019-04-22  Simon Marchi  <simon.marchi@efficios.com>
+
+       * solib-svr4.c (get_svr4_info): Add pspace parameter.
+       (svr4_keep_data_in_core): Pass current_program_space to get_svr4_info.
+       (open_symbol_file_object): Likewise.
+       (svr4_default_sos): Add info parameter.
+       (svr4_read_so_list): Likewise.
+       (svr4_current_sos_direct): Adjust functions calls to pass down
+       info.
+       (svr4_current_sos_1): Add info parameter.
+       (svr4_current_sos): Call get_svr4_info, pass info down to
+       svr4_current_sos_1.
+       (svr4_fetch_objfile_link_map): Pass objfile->pspace to
+       get_svr4_info.
+       (svr4_in_dynsym_resolve_code): Pass current_program_space to
+       get_svr4_info.
+       (probes_table_htab_remove_objfile_probes): Pass objfile->pspace
+       to get_svr4_info.
+       (probes_table_remove_objfile_probes): Likewise.
+       (register_solib_event_probe): Add info parameter.
+       (solist_update_incremental): Pass info parameter down to
+       svr4_read_so_list.
+       (disable_probes_interface): Add info parameter.
+       (svr4_handle_solib_event): Pass current_program_space to
+       get_svr4_info.  Adjust disable_probes_interface cleanup.
+       (svr4_create_probe_breakpoints): Add info parameter, pass it
+       down to register_solib_event_probe.
+       (svr4_create_solib_event_breakpoints): Add info parameter,
+       pass it down to svr4_create_probe_breakpoints.
+       (enable_break): Pass info down to
+       svr4_create_solib_event_breakpoints.
+       (svr4_solib_create_inferior_hook): Pass current_program_space to
+       get_svr4_info.
+       (svr4_clear_solib): Likewise.
+
+2019-04-22  Pedro Alves  <palves@redhat.com>
+
+       * solib-svr4.c (svr4_free_objfile_observer): New.
+       (probe_and_action::objfile): New field.
+       (probes_table_htab_remove_objfile_probes)
+       (probes_table_remove_objfile_probes): New functions.
+       (register_solib_event_probe): Add 'objfile' parameter.  Store it
+       in the new probe_and_action.  Don't store the probe in 'lookup'.
+       (svr4_create_probe_breakpoints): Pass objfile to
+       register_solib_event_probe.
+       (_initialize_svr4_solib): Register a free_objfile observer.
+
+2019-04-19  Tom Tromey  <tom@tromey.com>
+
+       * common/queue.h: Remove.
+
+2019-04-19  Tom Tromey  <tom@tromey.com>
+
+       * event-loop.c: Don't include "common/queue.h".
+
+2019-04-19  Tom Tromey  <tom@tromey.com>
+
+       * remote.c (remote_target): Use delete.
+       * remote-notif.h: Include <list>, not "common/queue.h".
+       (notif_client_p): Remove typedef.
+       (remote_notif_state): Add constructor, destructor, initializer.
+       <notif_queue>: Now a std::list.
+       (remote_notif_state_xfree): Don't declare.
+       * remote-notif.c (remote_notif_process, handle_notification)
+       (remote_notif_state_allocate): Update.
+       (~remote_notif_state): Rename from remote_notif_state_xfree.
+
+2019-04-19  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (reread_symbols): Update.
+       * objfiles.c (objfile_register_static_link)
+       (objfile_lookup_static_link): Update
+       (~objfile) Don't delete static_links.
+       * objfiles.h (struct objfile) <static_links>: Now an htab_up.
+
+2019-04-19  Tom Tromey  <tom@tromey.com>
+
+       * type-stack.h (struct type_stack) <insert>: Constify string.
+       * type-stack.c (type_stack::insert): Constify string.
+       * gdbtypes.h (lookup_template_type): Update.
+       (address_space_name_to_int): Update.
+       * gdbtypes.c (address_space_name_to_int): Make space_identifier
+       const.
+       (lookup_template_type): Make name const.
+       * c-exp.y: Update rules.
+       (lex_one_token, classify_name, classify_inner_name)
+       (c_print_token): Update.
+       * p-exp.y: Update rules.
+       (yylex): Update.
+       * f-exp.y: Update rules.
+       (yylex): Update.
+       * d-exp.y: Update rules.
+       (lex_one_token, classify_name, classify_inner_name): Update.
+       * parse.c (write_dollar_variable, copy_name): Return std::string.
+       * parser-defs.h (copy_name): Change return type.
+       * m2-exp.y: Update rules.
+       (yylex): Update.
+       * go-exp.y (lex_one_token): Update.
+       Update rules.
+       (classify_unsafe_function, classify_packaged_name)
+       (classify_name, yylex): Update.
+
+2019-04-19  Sergei Trofimovich <siarheit@google.com>
+
+       * configure.ac: add --enable-source-highlight switch.
+       * configure: Regenerate.
+       * top.c (print_gdb_version): plumb --enable-source-highlight
+       status to "show configuration".
+
+2019-04-19  Tom Tromey  <tromey@adacore.com>
+
+       * ada-lang.c (ada_is_variant_part, ada_to_fixed_type_1):
+       Check ADA_TYPE_P.
+       (empty_record, ada_template_to_fixed_record_type_1)
+       (template_to_static_fixed_type)
+       (to_record_with_fixed_variant_part): Use INIT_NONE_SPECIFIC.
+       * cp-abi.c (value_rtti_type): Check HAVE_CPLUS_STRUCT.
+       * gdbtypes.h (INIT_NONE_SPECIFIC, ADA_TYPE_P): New
+       macros.
+
+2019-04-19  Ilya Yu. Malakhov  <malakhov@mcst.ru>
+
+       PR symtab/24423:
+       * source.c (print_source_lines_base): Advance "iter" when a
+       control character is seen.
+
+2019-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+       * inferior.h (struct infcall_suspend_state_deleter):
+       Catch exception in destructor to avoid crash.
+
+2019-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+       * cli/cli-cmds.c (_initialize_cli_cmds): Move "shell" "!" alias
+       close to the add_com "shell".
+
+2019-04-18  Tom Tromey  <tromey@adacore.com>
+
+       * process-stratum-target.h (class process_stratum_target)
+       <stratum>: Add "final".
+
+2019-04-17  Tom Tromey  <tromey@adacore.com>
+
+       * dwarf2read.c (dwarf2_init_complex_target_type): Check "tt"
+       against nullptr before use.
+
+2019-04-17  Alan Hayward  <alan.hayward@arm.com>
+
+       * nat/linux-waitpid.c (linux_debug): Call debug_vprintf.
+
+2019-04-17  Jim Wilson  <jimw@sifive.com>
+           Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * riscv-tdep.c (riscv_breakpoint_kind_from_pc): Hanndle case where
+       code read might fail, assume 4-byte breakpoint in that case.
+
+2019-04-15  Leszek Swirski  <leszeks@google.com>
+
+       * amd64-tdep.c (amd64_classify_aggregate): Use cp_pass_by_reference
+       rather than a hand-rolled POD check when checking for forced MEMORY
+       classification.
+
+2019-04-15  Alan Hayward  <alan.hayward@arm.com>
+
+       * aarch64-linux-nat.c (store_sveregs_to_thread): Set vector length.
+       * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): New
+       function.
+       (aarch64_sve_regs_copy_to_reg_buf): Remove VG checks.
+       (aarch64_sve_regs_copy_from_reg_buf): Likewise.
+       * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_set_vq): New
+       declaration.
+
+2019-04-15  Alan Hayward  <alan.hayward@arm.com>
+
+       * aarch64-linux-nat.c
+       (aarch64_linux_nat_target::thread_architecture): Add override.
+       * aarch64-tdep.c (aarch64_gdbarch_init): Ensure different tdesc for
+       each VQ.
+
+2019-04-15  Alan Hayward  <alan.hayward@arm.com>
+
+       * aarch64-tdep.c (aarch64_gdbarch_init): Move gdbarch lookup.
+
+2019-04-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * dwarf2read.c (dwarf2_init_complex_target_type): Handle complex
+       target types of size 96-bits, add some additional comments, and
+       check that the builtin type we found was the correct size.
+
+2019-04-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * utils.c (prompt_for_continue): Don't restore the styling at the
+       end, as applied_style has the wrong value.  This fixes styling in
+       long lists of file names that are interrupted by the "Continue?"
+       prompt.
+
+2019-04-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * ada-lang.c (ada_language_defn): Remove use of LANG_MAGIC.
+       * c-lang.c (c_language_defn): Likewise.
+       (cplus_language_defn): Likewise.
+       (asm_language_defn): Likewise.
+       (minimal_language_defn): Likewise.
+       * d-lang.c (d_language_defn): Likewise.
+       * f-lang.c (f_language_defn): Likewise.
+       * go-lang.c (go_language_defn): Likewise.
+       * language.c (unknown_language_defn): Likewise.
+       (auto_language_defn): Likewise.
+       * language.h (struct language_defn): Remove la_magic field.
+       (LANG_MAGIC): Delete.
+       * m2-lang.c (m2_language_defn): Remove use of LANG_MAGIC.
+       * objc-lang.c (objc_language_defn): Likewise.
+       * opencl-lang.c (opencl_language_defn): Likewise.
+       * p-lang.c (pascal_language_defn): Likewise.
+       * rust-lang.c (rust_language_defn): Likewise.
+
+2019-04-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * riscv-tdep.c (riscv_type_align): New function.
+       (riscv_type_alignment): Delete.
+       (riscv_arg_location): Use 'type_align'.
+       (riscv_gdbarch_init): Register riscv_type_align gdbarch function.
+
+2019-04-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdbtypes.c (type_align): A struct with no non-static fields also
+       has alignment of 1.
+
+2019-04-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * riscv-tdep.c (riscv_call_arg_complex_float): Fix offset of first
+       component to 0.
+       (riscv_struct_info::riscv_struct_info): Initialise m_offsets
+       member.
+       (riscv_struct_info::analyse): New implementation using new
+       analyse_inner member function.
+       (riscv_struct_info::field_offset): New member function.
+       (riscv_struct_info::m_offsets): New member variable.
+       (riscv_struct_info::analyse_inner): New private member function,
+       takes the old implementation of riscv_struct_info::analyse but
+       extended to track field offsets.
+       (riscv_call_arg_struct): Update the struct folding special cases
+       to handle cases where empty C++ structs, which are non-zero
+       length, are found.
+       (riscv_arg_location): Initialise the length of each location, a
+       non-zero length now indicates the location is in use.
+       (riscv_push_dummy_call): Allow for the first location having a
+       non-zero offset when setting up arguments.
+       (riscv_return_value): Likewise, but for return values.
+
+2019-04-11  Tom Tromey  <tromey@adacore.com>
+
+       * utils.c (internal_vproblem): Make "msg" const.
+
+2019-04-11  Alan Hayward  <alan.hayward@arm.com>
+
+       * aarch64-tdep.c (aarch64_analyze_prologue_test): Reset saved regs.
+       * trad-frame.c (trad_frame_reset_saved_regs): New function.
+       (trad_frame_alloc_saved_regs): Call trad_frame_reset_saved_regs.
+       * trad-frame.h (trad_frame_reset_saved_regs): New declaration.
+
+2019-04-10  Kevin Buettner  <kevinb@redhat.com>
+
+       * amd64-linux-nat.c (amd64_linux_collect_native_gregset): New
+       function.
+       (fill_gregset): Call amd64_linux_collect_native_gregset instead
+       of amd64_collect_native_gregset.
+       (amd64_linux_nat_target::store_registers): Likewise.
+
+2019-04-10  Tom Tromey  <tom@tromey.com>
+
+       * symtab.c (lookup_global_symbol_from_objfile)
+       (lookup_symbol_in_objfile_from_linkage_name): Use the iterator.
+       * objfiles.h (class separate_debug_iterator): New.
+       (class separate_debug_range): New.
+       (struct objfile) <separate_debug_objfiles>: New method.
+       (objfile_separate_debug_iterate): Don't declare.
+       * objfiles.c (separate_debug_iterator::operator++): Rename from
+       objfile_separate_debug_iterate.
+       (objfile_relocate, objfile_rebase, objfile_has_symbols): Use the
+       iterator.
+       * minsyms.c (lookup_minimal_symbol_by_pc_section): Use the
+       iterator.
+
+2019-04-10  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (reread_symbols): Remove old comment.
+       * objfiles.c (free_all_objfiles): Fix a typo.
+
+2019-04-10  Tom Tromey  <tom@tromey.com>
+
+       * ia64-tdep.c (ia64_get_dyn_info_list): Use foreach.
+       * minsyms.c (lookup_minimal_symbol): Use foreach.
+       (lookup_minimal_symbol_text, lookup_minimal_symbol_by_pc_name)
+       (lookup_minimal_symbol_solib_trampoline): Likewise.
+       * symfile.c (reread_symbols): Use foreach.
+
+2019-04-09  Ivan Begert  <ivanbegert@gmail.com>
+           Tom Tromey  <tromey@adacore.com>
+
+       PR rust/24414:
+       * rust-exp.y (rust_parser::lex_number): Use strtoulst.
+       (rust_lex_int_test): Change "value" to be LONGEST.
+       (rust_lex_tests): Add test for long integer literal.
+
+2019-04-09  Tom Tromey  <tromey@adacore.com>
+
+       * remote.c (remote_target::remote_add_inferior): Change fake_pid_p
+       to bool.
+       (extended_remote_target::attach): Update.
+       (remote_target::remote_notice_new_inferior): Update.
+       (remote_target::add_current_inferior_and_thread): Update.
+       * inferior.c (exit_inferior_1): Use "false".
+       * corelow.c (add_to_thread_list): Make fake_pid_p bool.
+
+2019-04-09  Simon Marchi  <simon.marchi@efficios.com>
+
+       * infcmd.c (run_command_1): Pass -qualified to tbreak when using
+       the "start" command.
+
+2019-04-08  Kevin Buettner  <kevinb@redhat.com>
+
+       * python/py-inferior.c (infpy_thread_from_thread_handle):
+       Adjust comments to reflect renaming of thread_from_thread_handle
+       to thread_from_handle.  Adjust keywords.  Fix type error message.
+       (inferior_object_methods): Add thread_from_handle.  Retain
+       thread_from_thread_handle, but mark it as deprecated.
+
+2019-04-08  Kevin Buettner  <kevinb@redhat.com>
+
+       * gdbthread.h (find_thread_by_handle): Revise declaration.
+       * thread.c (find_thread_by_handle): Likewise.  Adjust
+       implementation too.
+       * python/py-inferior.c (infpy_thread_from_thread_handle): Add
+       support for buffer objects as handles.
+
+2019-04-08  Kevin Buettner  <kevinb@redhat.com>
+
+       * python/py-infthread.c (thpy_thread_handle): New function.
+       (thread_object_methods): Register thpy_thread_handle.
+
+2019-04-08  Kevin Buettner  <kevinb@redhat.com>
+
+       * gdbthread.h (thread_to_thread_handle): Declare.
+       * thread.c (gdbtypes.h): Include.
+       (thread_to_thread_handle): New function.
+
+       * target.h (struct target_ops): Add thread_info_to_thread_handle.
+       (target_thread_info_to_thread_handle): Declare.
+       * target.c (target_thread_info_to_thread_handle): New function.
+       * target-debug.h (target_debug_print_gdb_byte_vector): Define.
+       * target-delegates.c: Regenerate.
+
+       * linux-thread-db.c (class thread_db_target): Add method
+       thread_info_to_thread_handle.
+       (thread_db_target::thread_info_to_thread_handle): Define.
+       * remote.c (class remote_target): Add new method
+       thread_info_to_thread_handle.
+       (remote_target::thread_info_to_thread_handle): Define.
+
+2019-04-08  Pedro Alves  <palves@redhat.com>
+
+       * common/common-exceptions.c (throw_exception): Don't create
+       named object to throw; throw directly.
+       (throw_it): Likewise.  Don't initialize gdb_exception::message
+       here, with new; pass FMT and AP to the ctor instead.
+       * common/common-exceptions.h: Include <string>.
+       (gdb_exception::gdb_exception(enum return_reason, enum errors,
+       const char *, va_list)): New ctor.  Use std::make_shared.
+       (gdb_exception_error::gdb_exception_error(enum return_reason, enum
+       errors)): Delete.
+       (gdb_exception_error::gdb_exception_error(enum errors, const char
+       *, va_list)): New.
+       (gdb_exception_error::gdb_exception_error(const gdb_exception &)):
+       Add assertion.
+       (gdb_exception_quit::gdb_exception_quit(enum return_reason, enum
+       errors)): Delete.
+       (gdb_exception_quit::gdb_exception_quit(const char *, va_list)): New.
+       (gdb_exception_quit::gdb_exception_quit(const gdb_exception &)):
+       Add assertion.
+
+2019-04-08  Tom Tromey  <tom@tromey.com>
+
+       * valops.c (value_rtti_indirect_type): Replace throw_exception
+       with throw.
+       * tracefile-tfile.c (tfile_target_open): Replace throw_exception
+       with throw.
+       * thread.c (thr_try_catch_cmd): Replace throw_exception with
+       throw.
+       * target.c (target_translate_tls_address): Replace throw_exception
+       with throw.
+       * stack.c (frame_apply_command_count): Replace throw_exception
+       with throw.
+       * solib-spu.c (append_ocl_sos): Replace throw_exception with
+       throw.
+       * s390-tdep.c (s390_frame_unwind_cache): Replace throw_exception
+       with throw.
+       * rs6000-tdep.c (rs6000_frame_cache)
+       (rs6000_epilogue_frame_cache): Replace throw_exception with throw.
+       * remote.c: Replace throw_exception with throw.
+       * record-full.c (record_full_message, record_full_wait_1)
+       (record_full_restore): Replace throw_exception with throw.
+       * record-btrace.c:
+       (get_thread_current_frame_id, record_btrace_start_replaying)
+       (cmd_record_btrace_bts_start, cmd_record_btrace_pt_start)
+       (cmd_record_btrace_start): Replace throw_exception with throw.
+       * parse.c (parse_exp_in_context_1): Replace throw_exception with
+       throw.
+       * linux-nat.c (detach_one_lwp, linux_resume_one_lwp)
+       (resume_stopped_resumed_lwps): Replace throw_exception with throw.
+       * linespec.c:
+       (find_linespec_symbols): Replace throw_exception with throw.
+       * infrun.c (displaced_step_prepare, resume): Replace
+       throw_exception with throw.
+       * infcmd.c (post_create_inferior): Replace throw_exception with
+       throw.
+       * inf-loop.c (inferior_event_handler): Replace throw_exception
+       with throw.
+       * i386-tdep.c (i386_frame_cache, i386_epilogue_frame_cache)
+       (i386_sigtramp_frame_cache): Replace throw_exception with throw.
+       * frame.c (frame_unwind_pc, get_prev_frame_if_no_cycle)
+       (get_prev_frame_always, get_frame_pc_if_available)
+       (get_frame_address_in_block_if_available, get_frame_language):
+       Replace throw_exception with throw.
+       * frame-unwind.c (frame_unwind_try_unwinder): Replace
+       throw_exception with throw.
+       * eval.c (fetch_subexp_value, evaluate_var_value)
+       (evaluate_funcall, evaluate_subexp_standard): Replace
+       throw_exception with throw.
+       * dwarf2loc.c (call_site_find_chain)
+       (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval):
+       Replace throw_exception with throw.
+       * dwarf2-frame.c (dwarf2_frame_cache): Replace throw_exception
+       with throw.
+       * darwin-nat.c (darwin_attach_pid): Replace throw_exception with
+       throw.
+       * cp-abi.c (baseclass_offset): Replace throw_exception with throw.
+       * completer.c (complete_line_internal): Replace throw_exception
+       with throw.
+       * compile/compile-object-run.c (compile_object_run): Replace
+       throw_exception with throw.
+       * cli/cli-script.c (process_next_line): Replace throw_exception
+       with throw.
+       * btrace.c (btrace_compute_ftrace_pt, btrace_compute_ftrace)
+       (btrace_enable, btrace_maint_update_pt_packets): Replace
+       throw_exception with throw.
+       * breakpoint.c (create_breakpoint, save_breakpoints): Replace
+       throw_exception with throw.
+       * break-catch-throw.c (re_set_exception_catchpoint): Replace
+       throw_exception with throw.
+       * amd64-tdep.c (amd64_frame_cache, amd64_sigtramp_frame_cache)
+       (amd64_epilogue_frame_cache): Replace throw_exception with throw.
+       * aarch64-tdep.c (aarch64_make_prologue_cache)
+       (aarch64_make_stub_cache): Replace throw_exception with throw.
+
 2019-04-08  Tom Tromey  <tom@tromey.com>
 
        * common/common-exceptions.c (throw_exception): Rename from