in my project i want to debug the C/C++ source code of the OpenJDK version 8 using eclipse. For this purpose I have done following:
--with-debug-level=slowdebug
using this readme.With this approach, I am able to debug through the code of files like java.c
.
My problem is that somehow I still cannot debug through native code. Like for example java.lang.System.currentTimeMillis()
.
To me it looked like the libraries were not included into the eclipse gdb-run. I tried to run gdb manually, and it still didn't work to debug through that code section.
Has anybody expirienced same behavior, or did ever try to debug the JDK source code? I guess I am missing something here... Maybe my approach is just not correct for the task? Would be glad to hear any proposal about how to debug the JDK source code propperly.
Thank you in advance.
You may need to force eclipse into debug mode via the top right corner beetle icon.
Another possible option is to use an assert(false) line instead of a break point.
finally, it's possible that you need to specify a compiler in your eclipse project settings. Keep in mind that the Eclipse debugger does not work for all compilers, usually because of an incompatible linker. I would recommend looking online for a compatibility list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With