On Wed, 28 Sep 2022 22:38:44 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
> In `HotSpotAgent.setupVM()`, if there is an underlying exception in the vm > setup, the exception is consumed and a `DebuggerException` is thrown, hiding > the root cause. When throwing the `DebuggerException`, the "cause" exception > should be included. This provides a more detailed exception stack trace, such > as the following: > > > Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in > remote process) > sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM > (could not find symbol "gHotSpotVMTypes" in remote process) > at > jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:428) > at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:338) > at > jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:158) > at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:210) > at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:69) > at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:44) > at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:281) > at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500) > Caused by: sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find > symbol "gHotSpotVMTypes" in any of the known library names (jvm.dll) > at > jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:622) > at > jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:154) > at > jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:89) > at > jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:407) > ... 7 more > > > I'd like to push this as a trivial change. This pull request has now been integrated. Changeset: 5f6ad926 Author: Chris Plummer <cjplum...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/5f6ad926d7ea763bf61aa98c7be7087a7aa6089c Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8294547: HotSpotAgent.setupVM() should include "cause" exception when throwing DebuggerException Reviewed-by: sspitsyn, coleenp ------------- PR: https://git.openjdk.org/jdk/pull/10474