* current.c (_stp_ret_addr): Fix computation for i386.
+2005-06-15 Martin Hunt <hunt@redhat.com>
+
+ * current.c (_stp_ret_addr): Fix computation for i386.
+
2005-06-14 Martin Hunt <hunt@redhat.com>
* README: Removed old docs and replaced with simple build
unsigned long _stp_ret_addr (struct pt_regs *regs)
{
- unsigned long *ra = (unsigned long *)REG_SP(regs);
-
+#ifdef __x86_64__
+ unsigned long *ra = (unsigned long *)regs->rsp;
if (ra)
return *ra;
else
return 0;
+#elif defined (__i386__)
+ return regs->esp;
+#else
+ #error Unimplemented architecture
+#endif
}
#ifdef __x86_64__