(src/vm/jit/m68k/md.c): md_stacktrace_get_returnaddress needs to be exported.
[cacao.git] / src / vm / jit / m68k / md.h
index de87abbb124ba0fca88d420b5c1bbcb9943a86dd..3ef67014ee853bdb893648fa7af0c4fc9f2e3b49 100644 (file)
 
 *******************************************************************************/
 
-inline static void *md_stacktrace_get_returnaddress(void *sp, int32_t stackframesize)
-{
-       void *ra;
-
-       /* return address is above stackpointer */
-
-       ra = *((void **) (((uintptr_t) sp) + stackframesize));
-       
-       /* XXX: This helps for now, but it's a ugly hack
-        * the problem _may_ be: the link instruction is used
-        * by some gcc generated code, and we get an additional word
-        * on the stack, the old framepointer. Its address is somewhere
-        * near sp, but that all depends the code generated by the compiler.
-        * I'm unsure about a clean solution.
-        */
-#if 0
-       if (!(ra > 0x40000000 && ra < 0x80000000))      {
-               ra = *((u1**)(sp + framesize + 4));
-       }
-#endif
-
-       /* assert(ra > 0x40000000 && ra < 0x80000000);
-       printf("XXXXXX=%x\n", ra);
-        */
-
-       return ra;
-}
+void *md_stacktrace_get_returnaddress(void *sp, int32_t stackframesize);
 
 
 /* md_codegen_get_pv_from_pc ***************************************************