* i386-tdep.c (i386_linux_saved_pc_after_call): New function.
* config/i386/tm-linux.h (SAVED_PC_AFTER_CALL): Define to call
i386_linux_saved_pc_after_call.
+2000-03-08 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_linux_saved_pc_after_call): New function.
+ * config/i386/tm-linux.h (SAVED_PC_AFTER_CALL): Define to call
+ i386_linux_saved_pc_after_call.
+
2000-03-06 Jim Blandy <jimb@redhat.com>
From Tom Tromey <tromey@cygnus.com> and Keith Seitz <?>:
extern CORE_ADDR i386_linux_sigtramp_saved_sp (struct frame_info *);
+#undef SAVED_PC_AFTER_CALL
+#define SAVED_PC_AFTER_CALL(frame) i386_linux_saved_pc_after_call (frame)
+extern CORE_ADDR i386_linux_saved_pc_after_call (struct frame_info *);
+
/* When we call a function in a shared library, and the PLT sends us
into the dynamic linker to find the function's real address, we
need to skip over the dynamic linker call. This function decides
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);
+}
+
#endif /* I386_LINUX_SIGTRAMP */
#ifdef STATIC_TRANSFORM_NAME