From: Kamil Rytarowski Date: Mon, 6 Apr 2020 18:08:46 +0000 (+0200) Subject: Define NetBSD specific skip_solib_resolver X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=063f8e80b0858f3dfc27f7f5bbc3ffb1967095bc;p=binutils-gdb.git Define NetBSD specific skip_solib_resolver gdb/ChangeLog: * nbsd-tdep.c: Include "objfiles.h". (nbsd_skip_solib_resolver): New. (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver(). --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 019b4d3e1d7..255262a2f27 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-04-07 Kamil Rytarowski + + * nbsd-tdep.c: Include "objfiles.h". + (nbsd_skip_solib_resolver): New. + (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver(). + 2020-04-07 Nitika Achra * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_ diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c index 6680d3c6fde..1d7230feef8 100644 --- a/gdb/nbsd-tdep.c +++ b/gdb/nbsd-tdep.c @@ -23,6 +23,7 @@ #include "solib-svr4.h" #include "nbsd-tdep.h" #include "gdbarch.h" +#include "objfiles.h" /* FIXME: kettenis/20060115: We should really eliminate the next two functions completely. */ @@ -339,6 +340,20 @@ nbsd_gdb_signal_to_target (struct gdbarch *gdbarch, return -1; } +/* Shared library resolver handling. */ + +static CORE_ADDR +nbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) +{ + struct bound_minimal_symbol msym; + + msym = lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL); + if (msym.minsym && BMSYMBOL_VALUE_ADDRESS (msym) == pc) + return frame_unwind_caller_pc (get_current_frame ()); + else + return find_solib_trampoline_target (get_current_frame (), pc); +} + /* See nbsd-tdep.h. */ void @@ -346,4 +361,5 @@ nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { set_gdbarch_gdb_signal_from_target (gdbarch, nbsd_gdb_signal_from_target); set_gdbarch_gdb_signal_to_target (gdbarch, nbsd_gdb_signal_to_target); + set_gdbarch_skip_solib_resolver (gdbarch, nbsd_skip_solib_resolver); }