From 0f4d775085109981fbf00623d38da22655d04675 Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Thu, 22 Jan 2026 06:56:51 +0000 Subject: [PATCH] 8375534: Debug method 'pp' should support compressed oops Reviewed-by: vlivanov, phubner --- src/hotspot/share/utilities/debug.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/utilities/debug.cpp b/src/hotspot/share/utilities/debug.cpp index 0e1ca1efb98..504b923237e 100644 --- a/src/hotspot/share/utilities/debug.cpp +++ b/src/hotspot/share/utilities/debug.cpp @@ -429,10 +429,8 @@ extern "C" DEBUGEXPORT void pp(void* p) { tty->print_cr("null"); return; } - if (Universe::heap()->is_in(p)) { - oop obj = cast_to_oop(p); - obj->print(); - } else { + + if (!Universe::heap()->print_location(tty, p)) { // Ask NMT about this pointer. // GDB note: We will be using SafeFetch to access the supposed malloc header. If the address is // not readable, this will generate a signal. That signal will trip up the debugger: gdb will