diff options
author | Jim Blandy <jimb@codesourcery.com> | 2000-03-16 23:53:35 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2000-03-16 23:53:35 +0000 |
commit | 2caa680e2295e6e17c83290385d81c92f7c52df0 (patch) | |
tree | 75d34b35b2bbb6113c2f90b4f60b3338e34f0bd1 /gdb/i386-linux-nat.c | |
parent | 7ab8996c364a2290aa7e0d5907582dea4bc91a77 (diff) | |
download | gdb-2caa680e2295e6e17c83290385d81c92f7c52df0.tar.gz |
* 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.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index d5350dc0012..bf5e821a279 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. */ |