Debugging Graal on JDK 9
Doug Simon
doug.simon at oracle.com
Wed Oct 19 13:06:02 UTC 2016
The way I do it is to launch via mx with the -d option. For example:
dsimon at kurz ~/h/graal-core> mx -d vm -XX:+BootstrapJVMCI -XX:+UseJVMCICompiler -version
Listening for transport dt_socket at address: 8000
Then attach with the "graal-core-attach-localhost-8000” Remote Java Application launch configuration generated by `mx eclipseinit`.
Stepping through JDK9 code (including JVMCI) will be with incorrect or missing sources since Eclipse does not yet work with a JDK9 as you discovered. It’s not super convenient, but you can work around this by adding source paths from a JDK9 forest to your debug session:
Run -> Debug Configurations… -> Remote Java Application -> graal-core-attach-localhost-8000 -> “Source” tab
-Doug
> On 19 Oct 2016, at 14:52, Andrew Haley <aph at redhat.com> wrote:
>
> How is this to be done? Eclipse seems to be JDK 8 only, and it's
> not clear to me hos to switch the target VM. With "mx build", the
> first time you run it you get asked which VM to use, but never again.
>
> Thanks,
>
> Andrew.
More information about the graal-dev
mailing list