jdk.jdi/com.sun.tools.example.debug.tty.TTY - "jdb" Command

Q

How to run "jdb" command from JDK lib\modules JImage file?

✍: FYIcenter

A

"jdb" command allows you to run the Java Debugger interactively.

"jdb" command is supported by the jmods\jdk.jdi.jmod module file, which is also linked into the lib\modules JImage file.

You can run the "jdb" command using the lib\modules JImage file as described below:

fyicenter> %JDK_HOME%\bin\java --module jdk.jdi/com.sun.tools.example.debug.tty.TTY

Initializing jdb ...
> help
** command list **
connectors                -- list available connectors and transports in this VM

run [class [args]]        -- start execution of application's main class

threads [threadgroup]     -- list threads
thread <thread id>        -- set default thread
suspend [thread id(s)]    -- suspend threads (default: all)
resume [thread id(s)]     -- resume threads (default: all)
where [<thread id> | all] -- dump a thread's stack
wherei [<thread id> | all]-- dump a thread's stack, with pc info
up [n frames]             -- move up a thread's stack
down [n frames]           -- move down a thread's stack
kill <thread id> <expr>   -- kill a thread with the given exception object
interrupt <thread id>     -- interrupt a thread
...

 

jdk.jfr/jdk.jfr.internal.cmd.Execute - JFR Tool

jdk.jdi/com.sun.tools.example.debug.expr.ExpressionParser - Expression Parser

Tools Supported from JDK 9+ lib\modules JImage

⇑⇑ FAQ for JDK (Java Development Kit)

2019-09-04, 1432🔥, 0💬