8283056: show abstract machine code in hs-err for all VM crashes

Reviewed-by: thartmann, dholmes
This commit is contained in:
Doug Simon 2022-03-17 12:51:10 +00:00
parent bad658e8e9
commit 69e4e338b1

View File

@ -910,7 +910,7 @@ void VMError::report(outputStream* st, bool _verbose) {
STEP("printing code blobs if possible")
if (_verbose && _context) {
if (_verbose) {
const int printed_capacity = max_error_log_print_code;
address printed[printed_capacity];
printed[0] = nullptr;
@ -929,7 +929,8 @@ void VMError::report(outputStream* st, bool _verbose) {
printed_len++;
}
} else {
frame fr = os::fetch_frame_from_context(_context);
frame fr = _context ? os::fetch_frame_from_context(_context)
: os::current_frame();
while (printed_len < limit && fr.pc() != nullptr) {
if (print_code(st, _thread, fr.pc(), fr.pc() == _pc, printed, printed_capacity)) {
printed_len++;