483 // Trace constants |
483 // Trace constants |
484 enum { |
484 enum { |
485 trace_methods_offset = 0, |
485 trace_methods_offset = 0, |
486 trace_bcis_offset = 1, |
486 trace_bcis_offset = 1, |
487 trace_mirrors_offset = 2, |
487 trace_mirrors_offset = 2, |
488 trace_next_offset = 3, |
488 trace_cprefs_offset = 3, |
489 trace_size = 4, |
489 trace_next_offset = 4, |
|
490 trace_size = 5, |
490 trace_chunk_size = 32 |
491 trace_chunk_size = 32 |
491 }; |
492 }; |
492 |
493 |
493 static int backtrace_offset; |
494 static int backtrace_offset; |
494 static int detailMessage_offset; |
495 static int detailMessage_offset; |
495 static int cause_offset; |
496 static int cause_offset; |
496 static int stackTrace_offset; |
497 static int stackTrace_offset; |
497 static int static_unassigned_stacktrace_offset; |
498 static int static_unassigned_stacktrace_offset; |
498 |
499 |
499 // Printing |
500 // Printing |
500 static char* print_stack_element_to_buffer(Handle mirror, int method, int version, int bci); |
501 static char* print_stack_element_to_buffer(Handle mirror, int method, int version, int bci, int cpref); |
501 // StackTrace (programmatic access, new since 1.4) |
502 // StackTrace (programmatic access, new since 1.4) |
502 static void clear_stacktrace(oop throwable); |
503 static void clear_stacktrace(oop throwable); |
503 // No stack trace available |
504 // No stack trace available |
504 static const char* no_stack_trace_message(); |
505 static const char* no_stack_trace_message(); |
505 // Stacktrace (post JDK 1.7.0 to allow immutability protocol to be followed) |
506 // Stacktrace (post JDK 1.7.0 to allow immutability protocol to be followed) |
517 static oop message(oop throwable); |
518 static oop message(oop throwable); |
518 static oop message(Handle throwable); |
519 static oop message(Handle throwable); |
519 static void set_message(oop throwable, oop value); |
520 static void set_message(oop throwable, oop value); |
520 static Symbol* detail_message(oop throwable); |
521 static Symbol* detail_message(oop throwable); |
521 static void print_stack_element(outputStream *st, Handle mirror, int method, |
522 static void print_stack_element(outputStream *st, Handle mirror, int method, |
522 int version, int bci); |
523 int version, int bci, int cpref); |
523 static void print_stack_element(outputStream *st, methodHandle method, int bci); |
524 static void print_stack_element(outputStream *st, methodHandle method, int bci); |
524 static void print_stack_usage(Handle stream); |
525 static void print_stack_usage(Handle stream); |
525 |
526 |
526 // Allocate space for backtrace (created but stack trace not filled in) |
527 // Allocate space for backtrace (created but stack trace not filled in) |
527 static void allocate_backtrace(Handle throwable, TRAPS); |
528 static void allocate_backtrace(Handle throwable, TRAPS); |
1312 static void set_methodName(oop element, oop value); |
1313 static void set_methodName(oop element, oop value); |
1313 static void set_fileName(oop element, oop value); |
1314 static void set_fileName(oop element, oop value); |
1314 static void set_lineNumber(oop element, int value); |
1315 static void set_lineNumber(oop element, int value); |
1315 |
1316 |
1316 // Create an instance of StackTraceElement |
1317 // Create an instance of StackTraceElement |
1317 static oop create(Handle mirror, int method, int version, int bci, TRAPS); |
1318 static oop create(Handle mirror, int method, int version, int bci, int cpref, TRAPS); |
1318 static oop create(methodHandle method, int bci, TRAPS); |
1319 static oop create(methodHandle method, int bci, TRAPS); |
1319 |
1320 |
1320 // Debugging |
1321 // Debugging |
1321 friend class JavaClasses; |
1322 friend class JavaClasses; |
1322 }; |
1323 }; |