* md_stacktrace_get_returnaddress: added
authortwisti <none@none>
Fri, 8 Jul 2005 11:45:43 +0000 (11:45 +0000)
committertwisti <none@none>
Fri, 8 Jul 2005 11:45:43 +0000 (11:45 +0000)
src/vm/jit/alpha/md.c

index 81c3a9a4d091fcfb2267c982db0c932fe5603aee..9062b085b9e7a393a50be50563164447d750b5c9 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Joseph Wenninger
             Christian Thalinger
 
-   $Id: md.c 2831 2005-06-26 11:39:18Z twisti $
+   $Id: md.c 2930 2005-07-08 11:45:43Z twisti $
 
 */
 
@@ -130,6 +130,25 @@ void thread_restartcriticalsection(ucontext_t *uc)
 #endif
 
 
+/* md_stacktrace_get_returnaddress *********************************************
+
+   Returns the return address of the current stackframe, specified by
+   the passed stack pointer and the stack frame size.
+
+*******************************************************************************/
+
+functionptr md_stacktrace_get_returnaddress(u1 *sp, u4 framesize)
+{
+       functionptr ra;
+
+       /* on Alpha the return address is located on the top of the stackframe */
+
+       ra = (functionptr) *((u1 **) (sp + framesize - SIZEOF_VOID_P));
+
+       return ra;
+}
+
+
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where