aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-04-17 23:20:55 +0000
committerMark Kettenis <kettenis@gnu.org>2001-04-17 23:20:55 +0000
commited84f6c14944278d643810232ce167b2f0c99fea (patch)
tree1b98b343c54a2395c892c840bb94e217032a1cc6 /gdb/i386-tdep.c
parent514e603dc095d50008d671e6d7bbe0e975fc2aaa (diff)
downloadgdb-ed84f6c14944278d643810232ce167b2f0c99fea.zip
gdb-ed84f6c14944278d643810232ce167b2f0c99fea.tar.gz
gdb-ed84f6c14944278d643810232ce167b2f0c99fea.tar.bz2
* i386-tdep.c (i386_saved_pc_after_call): New function.
* config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Redefine in terms of i386_saved_pc_after_call. (i386_saved_pc_after_call): New prototype.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index f654d6f..15b261c 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -365,6 +365,14 @@ i386_frame_chain (struct frame_info *frame)
return 0;
}
+/* Immediately after a function call, return the saved pc. */
+
+CORE_ADDR
+i386_saved_pc_after_call (struct frame_info *frame)
+{
+ return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
+}
+
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */