Skip to content

Commit ab27843

Browse files
committed
8283056: show abstract machine code in hs-err for all VM crashes
Backport-of: 69e4e338b19c0ffd2f0881be1bbb19a5642bc4d4
1 parent 9a49698 commit ab27843

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hotspot/share/utilities/vmError.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ void VMError::report(outputStream* st, bool _verbose) {
909909

910910
STEP("printing code blobs if possible")
911911

912-
if (_verbose && _context) {
912+
if (_verbose) {
913913
const int printed_capacity = max_error_log_print_code;
914914
address printed[printed_capacity];
915915
printed[0] = nullptr;
@@ -928,7 +928,8 @@ void VMError::report(outputStream* st, bool _verbose) {
928928
printed_len++;
929929
}
930930
} else {
931-
frame fr = os::fetch_frame_from_context(_context);
931+
frame fr = _context ? os::fetch_frame_from_context(_context)
932+
: os::current_frame();
932933
while (printed_len < limit && fr.pc() != nullptr) {
933934
if (print_code(st, _thread, fr.pc(), fr.pc() == _pc, printed, printed_capacity)) {
934935
printed_len++;

0 commit comments

Comments
 (0)