Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: stacktrace.h 8318 2007-08-16 10:05:34Z michi $
-
*/
#include "config.h"
#include "vm/types.h"
+#include "md-abi.h"
+
#include "vmcore/class.h"
#include "vmcore/method.h"
u1 *sp; /* SP of parent Java function */
u1 *ra; /* RA to parent Java function */
u1 *xpc; /* XPC (for inline stubs) */
+#if defined(ENABLE_GC_CACAO)
+ /*
+ * The exact GC needs to be able to recover saved registers, so the
+ * native-stub saves these registers here
+ */
+# if defined(HAS_ADDRESS_REGISTER_FILE)
+ ptrint adrregs[ADR_SAV_CNT];
+# else
+ ptrint intregs[INT_SAV_CNT];
+# endif
+#endif
};
#define STACKTRACE_CAPACITY_INCREMENT 80
struct stacktracebuffer {
- s4 capacity; /* size of the buffer */
- s4 used; /* current entries in the buffer */
- stacktrace_entry *entries; /* the actual entries */
+ s4 capacity; /* size of the buffer */
+ s4 used; /* current entries in the buffer */
+ stacktrace_entry entries[80]; /* the actual entries */
};
-/* stacktracecontainer ********************************************************
-
- ATTENTION: Use the stacktracecontainer to place a stacktrace onto the heap
- with stacktrace_fillInStackTrace() so that the GC does not get confused.
-
-*******************************************************************************/
-
-typedef struct stacktracecontainer {
- 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;
-
-
/* function prototypes ********************************************************/
-#if defined(ENABLE_INTRP)
-void stacktrace_create_stackframeinfo(stackframeinfo *sfi, u1 *pv, u1 *sp,
- u1 *ra);
-#endif
-
-void stacktrace_create_extern_stackframeinfo(stackframeinfo *sfi, u1 *pv,
- u1 *sp, u1 *ra, u1 *xpc);
-
-void stacktrace_create_native_stackframeinfo(stackframeinfo *sfi, u1 *pv,
- u1 *sp, u1 *ra);
-
-void stacktrace_remove_stackframeinfo(stackframeinfo *sfi);
+void stacktrace_stackframeinfo_add(stackframeinfo *sfi, u1 *pv, u1 *sp, u1 *ra, u1 *xpc);
+void stacktrace_stackframeinfo_remove(stackframeinfo *sfi);
stacktracebuffer *stacktrace_create(stackframeinfo *sfi);
-stacktracecontainer *stacktrace_fillInStackTrace(void);
+java_handle_bytearray_t *stacktrace_fillInStackTrace(void);
#if defined(ENABLE_JAVASE)
java_handle_objectarray_t *stacktrace_getClassContext(void);
* c-basic-offset: 4
* tab-width: 4
* End:
+ * vim:noexpandtab:sw=4:ts=4:
*/