aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2000-03-08 22:34:19 +0000
committerMark Kettenis <kettenis@gnu.org>2000-03-08 22:34:19 +0000
commit4cc24188905500812f6951ff67f1799c57c7c858 (patch)
tree78e5c44220f5c0e4bc3016ef1a9717e9dbb7ac6b /gdb/i386-tdep.c
parente88acae7927b1144822572406f0ba9540e41e341 (diff)
downloadgdb-4cc24188905500812f6951ff67f1799c57c7c858.zip
gdb-4cc24188905500812f6951ff67f1799c57c7c858.tar.gz
gdb-4cc24188905500812f6951ff67f1799c57c7c858.tar.bz2
2000-03-08 Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_linux_saved_pc_after_call): New function. * config/i386/tm-linux.h (SAVED_PC_AFTER_CALL): Define to call i386_linux_saved_pc_after_call.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 10011f6..e940e2f 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1024,6 +1024,17 @@ i386_linux_sigtramp_saved_sp (struct frame_info *frame)
return read_memory_integer (addr + LINUX_SIGCONTEXT_SP_OFFSET, 4);
}
+/* Immediately after a function call, return the saved pc. */
+
+CORE_ADDR
+i386_linux_saved_pc_after_call (struct frame_info *frame)
+{
+ if (frame->signal_handler_caller)
+ return i386_linux_sigtramp_saved_pc (frame);
+
+ return read_memory_integer (read_register (SP_REGNUM), 4);
+}
+
#endif /* I386_LINUX_SIGTRAMP */
#ifdef STATIC_TRANSFORM_NAME