How to debug HotSpot

Douglas Simon doug.simon at
Mon Sep 24 02:25:37 PDT 2012

On Sep 24, 2012, at 11:10 AM, Staffan Larsen <staffan.larsen at> wrote:

> Hi,
> First thing you need to do is to unzip the libjvm.diz file in the build directory. This will create a libjvm.debuginfo file which contains symbols for the debugger. This should really be done automatically, either when building or by the hotspot launcher.

You can force this during building by setting ZIP_DEBUGINFO_FILES=0.

> Then you can start your program with "hotspot -gdb MyClass". This will set a breakpoint in InitializeJVM where the is loaded. Type "fin" to step out of that method. Now is loaded and you can set breakpoints. For example "b os::sleep", then "cont".
> I hope this helps,
> /Staffan
> On 22 sep 2012, at 16:13, 饭桶 <athrun911500 at> wrote:
>> Hi all,
>> I need you guys' help. I'm reading and learning details in Hotspot, especially garbage collector. But I'm trapped in debug and trace hotspot itselp.
>> I have built hotspot in ubuntu 12.04 and entered gdb mode with "hotspot -gdb ....". But as is loaded at runtime, I can't step into that part in gdb. Is there any way to step into
>> Besides, here is how I build hotspot. Just check if there are some additional building parameters.
>> LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk/ HOTSPOT_BUILD_JOBS=5 ARCH_DATA_MODEL=64 ALT_OUTPUTDIR=../../build/hotspot_debug make jvmg jvmg1 2>&1 | tee ../../build/hotspot_debug
>> Thanks
>> Arthur

More information about the hotspot-dev mailing list