* Removed all Id tags.
[cacao.git] / src / vm / jit / stacktrace.h
index 2372ddd4c8df09a4f610fd8b6937c3d051ce4d5a..a2eddd4c4c4b7d6455e73663ec9af6cff35bd99d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stacktrace.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
@@ -39,12 +37,6 @@ typedef struct stacktrace_entry stacktrace_entry;
 #include "config.h"
 #include "vm/types.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/threads.h"
-#else
-# include "threads/none/threads.h"
-#endif
-
 #include "vmcore/class.h"
 #include "vmcore/method.h"
 
@@ -98,7 +90,7 @@ struct stacktracebuffer {
 *******************************************************************************/
 
 typedef struct stacktracecontainer {
-       java_arrayheader        header;     /* default array header for the GC    */
+       java_array_t            header;     /* default array header for the GC    */
        struct stacktracebuffer stb;        /* let entries point to data below    */
        stacktrace_entry        data[1];    /* the actual array of entries        */
 } stacktracecontainer;
@@ -111,9 +103,6 @@ void stacktrace_create_stackframeinfo(stackframeinfo *sfi, u1 *pv, u1 *sp,
                                                                          u1 *ra);
 #endif
 
-void stacktrace_create_inline_stackframeinfo(stackframeinfo *sfi, u1 *pv,
-                                                                                        u1 *sp, u1 *ra, u1 *xpc);
-
 void stacktrace_create_extern_stackframeinfo(stackframeinfo *sfi, u1 *pv,
                                                                                         u1 *sp, u1 *ra, u1 *xpc);
 
@@ -122,68 +111,28 @@ void stacktrace_create_native_stackframeinfo(stackframeinfo *sfi, u1 *pv,
 
 void stacktrace_remove_stackframeinfo(stackframeinfo *sfi);
 
-/* inline exception creating functions */
-java_objectheader *stacktrace_inline_arithmeticexception(u1 *pv, u1 *sp, u1 *ra,
-                                                                                                                u1 *xpc);
-#define STACKTRACE_inline_arithmeticexception \
-    (functionptr) stacktrace_inline_arithmeticexception
-                                                                                               
-
-java_objectheader *stacktrace_inline_arrayindexoutofboundsexception(u1 *pv,
-                                                                                                                                       u1 *sp,
-                                                                                                                                       u1 *ra,
-                                                                                                                                       u1 *xpc,
-                                                                                                                                       s4 index);
-#define STACKTRACE_inline_arrayindexoutofboundsexception \
-    (functionptr) stacktrace_inline_arrayindexoutofboundsexception
-
-java_objectheader *stacktrace_inline_arraystoreexception(u1 *pv, u1 *sp, u1 *ra,
-                                                                                                                u1 *xpc);
-#define STACKTRACE_inline_arraystoreexception \
-    (functionptr) stacktrace_inline_arraystoreexception
-
-java_objectheader *stacktrace_inline_classcastexception(u1 *pv, u1 *sp, u1 *ra,
-                                                                                                               u1 *xpc,
-                                                                                                               java_objectheader *o);
-#define STACKTRACE_inline_classcastexception \
-    (functionptr) stacktrace_inline_classcastexception
-
-java_objectheader *stacktrace_inline_nullpointerexception(u1 *pv, u1 *sp,
-                                                                                                                 u1 *ra, u1 *xpc);
-#define STACKTRACE_inline_nullpointerexception \
-    (functionptr) stacktrace_inline_nullpointerexception
-
-/* refill the stacktrace of an existing exception */
-java_objectheader *stacktrace_inline_fillInStackTrace(u1 *pv, u1 *sp, u1 *ra,
-                                                                                                         u1 *xpc);
-#define STACKTRACE_inline_fillInStackTrace \
-    (functionptr) stacktrace_inline_fillInStackTrace
-
-
-/* hardware exception creating functions */
-java_objectheader *stacktrace_hardware_arithmeticexception(u1 *pv, u1 *sp,
-                                                                                                                  u1 *ra, u1 *xpc);
-
-java_objectheader *stacktrace_hardware_nullpointerexception(u1 *pv, u1 *sp,
-                                                                                                                       u1 *ra, u1 *xpc);
 
+stacktracebuffer *stacktrace_create(stackframeinfo *sfi);
 
 stacktracecontainer *stacktrace_fillInStackTrace(void);
 
 #if defined(ENABLE_JAVASE)
-java_objectarray    *stacktrace_getClassContext(void);
-classinfo           *stacktrace_getCurrentClass(void);
-java_objectarray    *stacktrace_getStack(void);
+java_handle_objectarray_t *stacktrace_getClassContext(void);
+classinfo                 *stacktrace_getCurrentClass(void);
+java_handle_objectarray_t *stacktrace_getStack(void);
 #endif
 
-void stacktrace_dump_trace(threadobject *thread);
-void stacktrace_print_trace(java_objectheader *xptr);
-
+void stacktrace_print_trace_from_buffer(stacktracebuffer *stb);
+void stacktrace_print_trace(java_handle_t *xptr);
 
 /* machine dependent functions (code in ARCH_DIR/md.c) */
 
 #if defined(ENABLE_JIT)
 u1 *md_stacktrace_get_returnaddress(u1 *sp, u4 framesize);
+# if defined(__SPARC_64__)
+u1 *md_get_framepointer(u1 *sp);
+u1 *md_get_pv_from_stackframe(u1 *sp);
+# endif
 #endif
 
 #if defined(ENABLE_INTRP)