Debugging JVM
Roman Kennke
rkennke at redhat.com
Tue Sep 22 10:05:36 UTC 2020
Hi Manavjeet Singh,
I am using gdb to debug Hotspot. It is important to build with debug
symbols (e.g. configure with --with-native-debug-symbols=internal).
Also, it is very useful to also compile with asserts and other checks
turned on (--with-debug-level=fastdebug). If you need to step through
code, it's usually a good idea to build without optimizations too (
--with-debug-level=slowdebug).
There are GUI debuggers that may or may not be useful (e.g. I know
people who use Emacs with GDB, I am using CLion - but not for
debugging, but I think it is possible, and uses GDB as 'backend' for
that).
I hope that helps!
Best regards,
Roman
> Hi!
> I am currently learning the working of G1GC by making little changes
> in the
> code. Initially, I used GDB to add breakpoints in the code and
> understand
> its working. But I was wondering if there are any advanced GUI
> debuggers
> that can be used for this purpose? I am using VS Code as my primary
> editor.
> Can someone put light on the debugging setups they are using?
> Thanks and regards
> Manavjeet Singh
>
More information about the hotspot-gc-dev
mailing list