aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-linux-nat.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2000-03-16 23:53:35 +0000
committerJim Blandy <jimb@codesourcery.com>2000-03-16 23:53:35 +0000
commit17f9defb0b0670c472e58af60cfa96ba4c3eaafb (patch)
tree7a240610be44c4b00472db0247d66f85310190c7 /gdb/i386-linux-nat.c
parenta37c8f88430e4afb9f8279e70b07e17c79cd8cce (diff)
downloadgdb-17f9defb0b0670c472e58af60cfa96ba4c3eaafb.zip
gdb-17f9defb0b0670c472e58af60cfa96ba4c3eaafb.tar.gz
gdb-17f9defb0b0670c472e58af60cfa96ba4c3eaafb.tar.bz2
* i386-linux-nat.c (i386_linux_saved_pc_after_call): Lost in the
merge; reinstated.
Diffstat (limited to 'gdb/i386-linux-nat.c')
-rw-r--r--gdb/i386-linux-nat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index d5350dc..bf5e821 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -1289,6 +1289,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);
+}
+
/* Register that we are able to handle Linux ELF core file formats. */