diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c index 59abd4a49425a..a35458c2f1853 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c +++ b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c @@ -2586,6 +2586,17 @@ threadControl_dumpAllThreads() dumpThreadList(&otherThreads); } +void +threadControl_dumpThread(jthread thread) +{ + ThreadNode* node = findThread(NULL, thread); + if (node == NULL) { + tty_message("Thread not found"); + } else { + dumpThread(node); + } +} + static void dumpThreadList(ThreadList *list) { diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.h b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.h index c8210cfb99d2f..c58c066feb870 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.h +++ b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.h @@ -78,6 +78,7 @@ jlong threadControl_getFrameGeneration(jthread thread); #ifdef DEBUG void threadControl_dumpAllThreads(); +void threadControl_dumpThread(jthread thread); #endif #endif