Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug the openjdk 9 (mainly the hotspot) source code in Eclipse?

Tags:

java

jvm

openjdk

I want to debug the hotspot source code , such as set some breakpoints in the Native Code,to learn it. So I built the openjdk 9 source code by the Eclipse and successfully, and below is built setting and the output of the built.

Builder setting and built output folder

Then I tried to configure the "Debug Configurations", however I don't know how to set the c/c++ application, someone advise it to "openjdk/hotspot/build/Linux/linux_amd64_compiler2/jvmg" for JDK 7 , however I cannot find it in the built output folder for jdk 9, I tried to set it to "~/jdk9/build/linux-x86_64-normal-server-fastdebug/jdk/java" then click button "debug" to debug it, however it failed with information "No source code available for main". So my question is 1,)how to do the setting to let me debug the jdk source code successfully? 2,) If there are other places I need to set? enter image description here

like image 788
YuFeng Shen Avatar asked Feb 05 '17 12:02

YuFeng Shen


1 Answers

The issue fixed by setting the debug level to slowdebug for the JDK 9

like image 65
YuFeng Shen Avatar answered Oct 01 '22 04:10

YuFeng Shen