2008-11-12 Tristan Gingold <gingold@adacore.com>
[binutils-gdb.git] / gdb / alphanbsd-tdep.c
index 47b479157efa256dc78610258cfee51206289dfd..b5e161a2fccc5d64b1be8a4279c281e5266898a1 100644 (file)
@@ -35,6 +35,7 @@
 #include "alphabsd-tdep.h"
 #include "nbsd-tdep.h"
 #include "solib-svr4.h"
+#include "target.h"
 
 /* Core file support.  */
 
@@ -252,7 +253,9 @@ alphanbsd_sigcontext_addr (struct frame_info *frame)
   /* FIXME: This is not correct for all versions of NetBSD/alpha.
      We will probably need to disassemble the trampoline to figure
      out which trampoline frame type we have.  */
-  return get_frame_base (frame);
+  if (!get_next_frame (frame))
+    return 0;
+  return get_frame_base (get_next_frame (frame));
 }
 \f