JDI binding for the Serviceability Agent
Jim.Holmlund at Sun.COM
Thu Mar 6 11:52:58 PST 2008
Hello Jie Yu. You are correct that the only way to debug without starting
the Java program in debug mode with -agentlib:.... is to use the
and then you can only read information out of the VM - you can't modify
For JDK 7, we are investigating a feature we call 'attach on demand
which would do just what you are asking for.
The 'SA' in SAPIDAttachingConnector stands for Serviceability Agent.
All the files under the hotspot/agent directory that you reference below
are part of the Serviceability Agent. You can find out more about the
SA is also used by HotSpot engineers to debug HotSpot itself. The
files you mention under the hotspot/livejvm are used for that.
Jie Yu wrote:
> I am a student from Fudan University, China. I am working on a project that uses JPDA of JDK6. I want to debug a live java program that is not start with any debug options (e.g. -agentlib:jdwp or -Xdebug). For this reason, I can choose the SAPIDAttachingConnector. But the VirtualMachine object returned by this connector's attach() method is 'read-only', meaning that I cannot modify the state of the live java program. Is there any other options for me? I scan the source tree of openjdk, and find that in hotspot/agent/src/share/classes/sun/jvm/hotspot/livejvm, there are some related source files. What are these files for? Are they related to my problem?
> Best regards,
> Jie Yu
More information about the serviceability-dev