[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8294547: HotSpotAgent.setupVM() should include "cause" exception when throwing DebuggerExce
From:       Coleen Phillimore <coleenp () openjdk ! org>
Date:       2022-09-29 17:48:37
Message-ID: PU7NaifwAN4G6pDfATnXQ80xmDn-tYrg0Q73XtFHCLY=.58efc400-b6ec-4a57-b269-3aafb64b9566 () github ! com
[Download RAW message or body]

On Wed, 28 Sep 2022 22:38:44 GMT, Chris Plummer <cjplummer@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.

Thank you!

-------------

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10474


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic