Changes:
- $Id: stacktrace.h 4406 2006-02-03 13:19:36Z twisti $
+ $Id: stacktrace.h 5088 2006-07-08 20:16:05Z twisti $
*/
u1 *xpc; /* XPC (for inline stubs) */
};
-#if defined(USE_THREADS)
-#define STACKFRAMEINFO (stackframeinfo **) (&THREADINFO->_stackframeinfo)
+#if defined(ENABLE_THREADS)
+#define STACKFRAMEINFO (&(THREADOBJECT->_stackframeinfo))
#else
extern stackframeinfo *_no_threads_stackframeinfo;
/* stacktracebuffer ***********************************************************/
-#define STACKTRACE_CAPACITY_DEFAULT 40
-#define STACKTRACE_CAPACITY_INCREMENT 40
+#define STACKTRACE_CAPACITY_DEFAULT 80
+#define STACKTRACE_CAPACITY_INCREMENT 80
struct stacktracebuffer {
- s4 capacity; /* size of the buffer */
- s4 used; /* current entries in the buffer */
- stacktrace_entry entries[1]; /* the actual entries */
+ s4 capacity; /* size of the buffer */
+ s4 used; /* current entries in the buffer */
+ stacktrace_entry *entries; /* the actual entries */
};
/* 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);
+ 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_nullpointerexception(u1 *pv, u1 *sp,
u1 *ra, u1 *xpc);
-/* refill the stacktrace of an existing exception */
-java_objectheader *stacktrace_inline_fillInStackTrace(u1 *pv, u1 *sp, u1 *ra,
- u1 *xpc);
stacktracebuffer *stacktrace_fillInStackTrace(void);
java_objectarray *stacktrace_getClassContext(void);
-java_objectheader *stacktrace_getCallingClassLoader(void);
+classinfo *stacktrace_getCurrentClass(void);
java_objectarray *stacktrace_getStack(void);
void stacktrace_dump_trace(void);
u1 *intrp_md_stacktrace_get_returnaddress(u1 *sp, u4 framesize);
#endif
+#if defined(ENABLE_CYCLES_STATS)
+void stacktrace_print_cycles_stats(FILE *file);
+#endif
+
#endif /* _STACKTRACE_H */