* src/vm/jit/jit.c (jit_asm_compile): Fixed xpc for extern
authoredwin <none@none>
Sun, 22 Oct 2006 00:38:21 +0000 (00:38 +0000)
committeredwin <none@none>
Sun, 22 Oct 2006 00:38:21 +0000 (00:38 +0000)
stackframeinfo by subtracting 1 from the return address.
This fixes stacktraces when exceptions are thrown out of
the compiler.

* tests/regression/extest.2output: Changed line numbers to
the values same the RI returns, which are correct upon inspection
of the Java code.

src/vm/jit/jit.c
tests/regression/extest.2output

index 4dd56390b76c4316aa2abefe055f6e62ed266756..cc3b85240dadf370302629ae3cc561657ef5c138 100644 (file)
@@ -31,7 +31,7 @@
             Christian Thalinger
             Christian Ullrich
 
-   $Id: jit.c 5814 2006-10-20 14:53:27Z twisti $
+   $Id: jit.c 5817 2006-10-22 00:38:21Z edwin $
 
 */
 
@@ -1529,9 +1529,10 @@ u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra)
        u1             *pa;
        ptrint         *p;
 
-       /* create the stackframeinfo (XPC is equal to RA) */
+       /* create the stackframeinfo (subtract 1 from RA as it points to the */
+       /* instruction after the call)                                       */
 
-       stacktrace_create_extern_stackframeinfo(&sfi, NULL, sp, ra, ra);
+       stacktrace_create_extern_stackframeinfo(&sfi, NULL, sp, ra, ra-1);
 
        /* actually compile the method */
 
index 58cfec85942e5b4239abda880a6d9c2c96f422e8..365c8b2ead2f4732289850d9cd8060e07fb61f3d 100644 (file)
@@ -114,10 +114,10 @@ java.lang.Exception
 ---------- native stub exceptions ---------------
 NullPointerException in <clinit>:             OK
 java.lang.ExceptionInInitializerError
-   at extest.main(extest.java:324)
+   at extest.main(extest.java:323)
 Caused by: java.lang.NullPointerException
    at extest_clinit.<clinit>(extest_clinit.java:4)
-   at extest.main(extest.java:324)
+   at extest.main(extest.java:323)
 
 UnsatisfiedLinkError:                         OK
 java.lang.UnsatisfiedLinkError: nsub