From 0d17c81d95377cc552092f5f92dc9221d562ef77 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 9 May 2001 16:16:33 +0000 Subject: * i386-tdep.c (i386_frame_saved_pc): New function. * config/i386/tm-i386.h (FRAME_SAVED_PC): Redefine in terms of i386_frame_saved_pc. (i386_frame_saved_pc): New prototype. --- gdb/i386-tdep.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gdb/i386-tdep.c') diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 446b268..0e3e340 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -378,6 +378,23 @@ i386_frameless_function_invocation (struct frame_info *frame) return frameless_look_for_prologue (frame); } +/* Return the saved program counter for FRAME. */ + +CORE_ADDR +i386_frame_saved_pc (struct frame_info *frame) +{ + /* FIXME: kettenis/2001-05-09: Conditionalizing the next bit of code + on SIGCONTEXT_PC_OFFSET and I386V4_SIGTRAMP_SAVED_PC should be + considered a temporary hack. I plan to come up with something + better when we go multi-arch. */ +#if defined (SIGCONTEXT_PC_OFFSET) || defined (I386V4_SIGTRAMP_SAVED_PC) + if (frame->signal_handler_caller) + return sigtramp_saved_pc (frame); +#endif + + return read_memory_unsigned_integer (frame->frame + 4, 4); +} + /* Immediately after a function call, return the saved pc. */ CORE_ADDR -- cgit v1.1