diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-04-16 13:03:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-04-16 13:03:15 +0000 |
commit | 45e7c406c77ccb0a24cebb3871fe5bfc728e12a0 (patch) | |
tree | cc852425b0abe788c6cebf0bf5d9e4ff030c0980 /gdb/i386-tdep.c | |
parent | f1979f053805380269e618fabca71d5aff2507af (diff) | |
download | gdb-45e7c406c77ccb0a24cebb3871fe5bfc728e12a0.tar.gz |
* i386-tdep.c (i386_frame_chain): New function.
* config/i386/tm-i386.h (FRAME_CHAIN): Redefine in terms of
i386_frame_chain.
(i386_frame_chain): New prototype.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 49cc7966d7a..f654d6f3d51 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -349,6 +349,22 @@ i386_get_frame_setup (CORE_ADDR pc) return (-1); } +/* Return the chain-pointer for FRAME. In the case of the i386, the + frame's nominal address is the address of a 4-byte word containing + the calling frame's address. */ + +CORE_ADDR +i386_frame_chain (struct frame_info *frame) +{ + if (frame->signal_handler_caller) + return frame->frame; + + if (! inside_entry_file (frame->pc)) + return read_memory_unsigned_integer (frame->frame, 4); + + return 0; +} + /* Return number of args passed to a frame. Can return -1, meaning no way to tell. */ |