433 ss->print_cr("Unknown"); |
433 ss->print_cr("Unknown"); |
434 } |
434 } |
435 ss->print_cr(""); |
435 ss->print_cr(""); |
436 } |
436 } |
437 |
437 |
438 void ErrorContext::location_details(outputStream* ss, Method* method) const { |
438 void ErrorContext::location_details(outputStream* ss, const Method* method) const { |
439 if (_bci != -1 && method != NULL) { |
439 if (_bci != -1 && method != NULL) { |
440 streamIndentor si(ss); |
440 streamIndentor si(ss); |
441 const char* bytecode_name = "<invalid>"; |
441 const char* bytecode_name = "<invalid>"; |
442 if (method->validate_bci_from_bcx(_bci) != -1) { |
442 if (method->validate_bci_from_bcx(_bci) != -1) { |
443 Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci)); |
443 Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci)); |
468 streamIndentor si2(ss); |
468 streamIndentor si2(ss); |
469 _expected.frame()->print_on(ss); |
469 _expected.frame()->print_on(ss); |
470 } |
470 } |
471 } |
471 } |
472 |
472 |
473 void ErrorContext::bytecode_details(outputStream* ss, Method* method) const { |
473 void ErrorContext::bytecode_details(outputStream* ss, const Method* method) const { |
474 if (method != NULL) { |
474 if (method != NULL) { |
475 streamIndentor si(ss); |
475 streamIndentor si(ss); |
476 ss->indent().print_cr("Bytecode:"); |
476 ss->indent().print_cr("Bytecode:"); |
477 streamIndentor si2(ss); |
477 streamIndentor si2(ss); |
478 ss->print_data(method->code_base(), method->code_size(), false); |
478 ss->print_data(method->code_base(), method->code_size(), false); |
479 } |
479 } |
480 } |
480 } |
481 |
481 |
482 void ErrorContext::handler_details(outputStream* ss, Method* method) const { |
482 void ErrorContext::handler_details(outputStream* ss, const Method* method) const { |
483 if (method != NULL) { |
483 if (method != NULL) { |
484 streamIndentor si(ss); |
484 streamIndentor si(ss); |
485 ExceptionTable table(method); |
485 ExceptionTable table(method); |
486 if (table.length() > 0) { |
486 if (table.length() > 0) { |
487 ss->indent().print_cr("Exception Handler Table:"); |
487 ss->indent().print_cr("Exception Handler Table:"); |
492 } |
492 } |
493 } |
493 } |
494 } |
494 } |
495 } |
495 } |
496 |
496 |
497 void ErrorContext::stackmap_details(outputStream* ss, Method* method) const { |
497 void ErrorContext::stackmap_details(outputStream* ss, const Method* method) const { |
498 if (method != NULL && method->has_stackmap_table()) { |
498 if (method != NULL && method->has_stackmap_table()) { |
499 streamIndentor si(ss); |
499 streamIndentor si(ss); |
500 ss->indent().print_cr("Stackmap Table:"); |
500 ss->indent().print_cr("Stackmap Table:"); |
501 Array<u1>* data = method->stackmap_data(); |
501 Array<u1>* data = method->stackmap_data(); |
502 stack_map_table* sm_table = |
502 stack_map_table* sm_table = |