8375311: Some builds are missing debug helpers

Reviewed-by: mdoerr, aph
This commit is contained in:
Matthias Baesken 2026-01-16 08:03:55 +00:00
parent 5664d91484
commit b7346c307f

View File

@ -70,8 +70,10 @@
#include <stdarg.h>
#include <stdio.h>
// These functions needs to be exported on Windows only
#define DEBUGEXPORT WINDOWS_ONLY(JNIEXPORT)
// These functions needs to be exported on Windows
// On Linux it is also beneficial to export them to avoid
// losing them e.g. with linktime gc
#define DEBUGEXPORT JNIEXPORT
// Support for showing register content on asserts/guarantees.
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
@ -653,13 +655,12 @@ extern "C" DEBUGEXPORT intptr_t u5p(intptr_t addr,
void pp(intptr_t p) { pp((void*)p); }
void pp(oop p) { pp((void*)p); }
void help() {
extern "C" DEBUGEXPORT void help() {
Command c("help");
tty->print_cr("basic");
tty->print_cr(" pp(void* p) - try to make sense of p");
tty->print_cr(" ps() - print current thread stack");
tty->print_cr(" pss() - print all thread stacks");
tty->print_cr(" pm(int pc) - print Method* given compiled PC");
tty->print_cr(" findnm(intptr_t pc) - find nmethod*");
tty->print_cr(" findm(intptr_t pc) - find Method*");
tty->print_cr(" find(intptr_t x) - find & print nmethod/stub/bytecode/oop based on pointer into it");