Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: stacktrace.h 8321 2007-08-16 11:37:25Z michi $
-
*/
#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);