diff options
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 11 |
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 |