diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-03-26 19:51:47 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-03-26 19:51:47 +0000 |
commit | 00d080b8f2a438476946b1354ebc1afdf4b1aeef (patch) | |
tree | 57c8cb3f2749a437142f9ab1556ade51b0406d77 /gdb/i386-linux-tdep.c | |
parent | e5cced4b8e09de25c8f529b2b2951dc17bbe249c (diff) | |
download | gdb-00d080b8f2a438476946b1354ebc1afdf4b1aeef.tar.gz |
* i386-linux-tdep.c (i386_linux_sigtramp_saved_pc,
i386_linux_sigtramp_saved_sp): Make static.
(i386_linux_frame_saved_pc): New function based on the old
FRAME_SAVED_PC macro, but use read_memory_unsigned_integer instead
of read_memory_integer.
* config/i386/tm-linux.h (sigtramp_saved_pc): Remove definition.
(i386_linux_sigtramp_saved_pc): Remove prototype.
(FRAME_SAVED_PC): Redefine in terms of i386_linux_frame_saved_pc.
(i386_linux_frame_saved_pc): New prototype.
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r-- | gdb/i386-linux-tdep.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index a973ac97f41..56a5eadecd9 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -255,7 +255,7 @@ i386_linux_sigcontext_addr (struct frame_info *frame) /* Assuming FRAME is for a Linux sigtramp routine, return the saved program counter. */ -CORE_ADDR +static CORE_ADDR i386_linux_sigtramp_saved_pc (struct frame_info *frame) { CORE_ADDR addr; @@ -269,7 +269,7 @@ i386_linux_sigtramp_saved_pc (struct frame_info *frame) /* Assuming FRAME is for a Linux sigtramp routine, return the saved stack pointer. */ -CORE_ADDR +static CORE_ADDR i386_linux_sigtramp_saved_sp (struct frame_info *frame) { CORE_ADDR addr; @@ -277,6 +277,28 @@ i386_linux_sigtramp_saved_sp (struct frame_info *frame) return read_memory_integer (addr + LINUX_SIGCONTEXT_SP_OFFSET, 4); } +/* Return the saved program counter for FRAME. */ + +CORE_ADDR +i386_linux_frame_saved_pc (struct frame_info *frame) +{ + if (frame->signal_handler_caller) + return i386_linux_sigtramp_saved_pc (frame); + + /* See comment in "i386/tm-linux.h" for an explanation what this + "FRAMELESS_SIGNAL" stuff is supposed to do. + + FIXME: kettenis/2001-03-26: That comment should eventually be + moved to this file. */ + if (FRAMELESS_SIGNAL (frame)) + { + CORE_ADDR sp = i386_linux_sigtramp_saved_sp (frame->next); + return read_memory_unsigned_integer (sp, 4); + } + + return read_memory_unsigned_integer (frame->frame + 4, 4); +} + /* Immediately after a function call, return the saved pc. */ CORE_ADDR |