Module Name:    src
Committed By:   martin
Date:           Sat Oct 29 17:02:07 UTC 2016

Modified Files:
        src/external/gpl3/gdb/dist/gdb: alphanbsd-tdep.c

Log Message:
Add a skip_solib_resolver, from Rin Okuyama, fixes single stepping for
shared binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.11 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.12
--- src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.11	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c	Sat Oct 29 17:02:06 2016
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "gdbcore.h"
+#include "objfiles.h"
 #include "osabi.h"
 #include "regcache.h"
 #include "regset.h"
@@ -36,6 +37,19 @@
 #include "tramp-frame.h"
 #include "target.h"
 
+/* from obsd-tdep.c with symbol name adjusted to ours */
+static CORE_ADDR
+alphanbsd_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);
+}
+
 /* Core file support.  */
 
 /* Even though NetBSD/alpha used ELF since day one, it used the
@@ -333,6 +347,7 @@ alphanbsd_init_abi (struct gdbarch_info 
   /* NetBSD/alpha has SVR4-style shared libraries.  */
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_lp64_fetch_link_map_offsets);
+  set_gdbarch_skip_solib_resolver (gdbarch, alphanbsd_skip_solib_resolver);
 
 #ifdef notyet
   tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;

Reply via email to