739 check_failing_cds_access(st, _siginfo);
740 st->cr();
741 }
742
743 STEP("printing register info")
744
745 // decode register contents if possible
746 if (_verbose && _context && Universe::is_fully_initialized()) {
747 os::print_register_info(st, _context);
748 st->cr();
749 }
750
751 STEP("printing registers, top of stack, instructions near pc")
752
753 // registers, top of stack, instructions near pc
754 if (_verbose && _context) {
755 os::print_context(st, _context);
756 st->cr();
757 }
758
759 STEP("printing code blob if possible")
760
761 if (_verbose && _context) {
762 CodeBlob* cb = CodeCache::find_blob(_pc);
763 if (cb != NULL) {
764 if (Interpreter::contains(_pc)) {
765 // The interpreter CodeBlob is very large so try to print the codelet instead.
766 InterpreterCodelet* codelet = Interpreter::codelet_containing(_pc);
767 if (codelet != NULL) {
768 codelet->print_on(st);
769 Disassembler::decode(codelet->code_begin(), codelet->code_end(), st);
770 }
771 } else {
772 StubCodeDesc* desc = StubCodeDesc::desc_for(_pc);
773 if (desc != NULL) {
774 desc->print_on(st);
775 Disassembler::decode(desc->begin(), desc->end(), st);
776 } else if (_thread != NULL) {
777 // Disassembling nmethod will incur resource memory allocation,
778 // only do so when thread is valid.
|
739 check_failing_cds_access(st, _siginfo);
740 st->cr();
741 }
742
743 STEP("printing register info")
744
745 // decode register contents if possible
746 if (_verbose && _context && Universe::is_fully_initialized()) {
747 os::print_register_info(st, _context);
748 st->cr();
749 }
750
751 STEP("printing registers, top of stack, instructions near pc")
752
753 // registers, top of stack, instructions near pc
754 if (_verbose && _context) {
755 os::print_context(st, _context);
756 st->cr();
757 }
758
759 STEP("inspecting top of stack")
760
761 // decode stack contents if possible
762 if (_verbose && _context && Universe::is_fully_initialized()) {
763 frame fr = os::fetch_frame_from_context(_context);
764 const int slots = 8;
765 const intptr_t *start = fr.sp();
766 const intptr_t *end = start + slots;
767 if (is_aligned(start, sizeof(intptr_t)) && os::is_readable_range(start, end)) {
768 st->print_cr("Stack slot to memory mapping:");
769 for (int i = 0; i < slots; ++i) {
770 st->print("stack at sp + %d slots: ", i);
771 os::print_location(st, *(start + i));
772 }
773 }
774 st->cr();
775 }
776
777 STEP("printing code blob if possible")
778
779 if (_verbose && _context) {
780 CodeBlob* cb = CodeCache::find_blob(_pc);
781 if (cb != NULL) {
782 if (Interpreter::contains(_pc)) {
783 // The interpreter CodeBlob is very large so try to print the codelet instead.
784 InterpreterCodelet* codelet = Interpreter::codelet_containing(_pc);
785 if (codelet != NULL) {
786 codelet->print_on(st);
787 Disassembler::decode(codelet->code_begin(), codelet->code_end(), st);
788 }
789 } else {
790 StubCodeDesc* desc = StubCodeDesc::desc_for(_pc);
791 if (desc != NULL) {
792 desc->print_on(st);
793 Disassembler::decode(desc->begin(), desc->end(), st);
794 } else if (_thread != NULL) {
795 // Disassembling nmethod will incur resource memory allocation,
796 // only do so when thread is valid.
|