diff options
author | Kamil Rytarowski <n54@gmx.com> | 2020-04-06 20:08:46 +0200 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2020-04-07 19:12:03 +0200 |
commit | 063f8e80b0858f3dfc27f7f5bbc3ffb1967095bc (patch) | |
tree | 5a00bfc6d39013aebdcc7927aaedd261ef419166 /gdb/nbsd-tdep.c | |
parent | 85a9510ccbe8d897471cdd4f25a475329ae24498 (diff) | |
download | gdb-063f8e80b0858f3dfc27f7f5bbc3ffb1967095bc.zip gdb-063f8e80b0858f3dfc27f7f5bbc3ffb1967095bc.tar.gz gdb-063f8e80b0858f3dfc27f7f5bbc3ffb1967095bc.tar.bz2 |
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().
Diffstat (limited to 'gdb/nbsd-tdep.c')
-rw-r--r-- | gdb/nbsd-tdep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c index 6680d3c..1d7230f 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); } |