Skip to content

Commit b7346c3

Browse files
committed
8375311: Some builds are missing debug helpers
Reviewed-by: mdoerr, aph
1 parent 5664d91 commit b7346c3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/hotspot/share/utilities/debug.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@
7070
#include <stdarg.h>
7171
#include <stdio.h>
7272

73-
// These functions needs to be exported on Windows only
74-
#define DEBUGEXPORT WINDOWS_ONLY(JNIEXPORT)
73+
// These functions needs to be exported on Windows
74+
// On Linux it is also beneficial to export them to avoid
75+
// losing them e.g. with linktime gc
76+
#define DEBUGEXPORT JNIEXPORT
7577

7678
// Support for showing register content on asserts/guarantees.
7779
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
@@ -653,13 +655,12 @@ extern "C" DEBUGEXPORT intptr_t u5p(intptr_t addr,
653655
void pp(intptr_t p) { pp((void*)p); }
654656
void pp(oop p) { pp((void*)p); }
655657

656-
void help() {
658+
extern "C" DEBUGEXPORT void help() {
657659
Command c("help");
658660
tty->print_cr("basic");
659661
tty->print_cr(" pp(void* p) - try to make sense of p");
660662
tty->print_cr(" ps() - print current thread stack");
661663
tty->print_cr(" pss() - print all thread stacks");
662-
tty->print_cr(" pm(int pc) - print Method* given compiled PC");
663664
tty->print_cr(" findnm(intptr_t pc) - find nmethod*");
664665
tty->print_cr(" findm(intptr_t pc) - find Method*");
665666
tty->print_cr(" find(intptr_t x) - find & print nmethod/stub/bytecode/oop based on pointer into it");

0 commit comments

Comments
 (0)