Skip to main content

Where can I find the source line information?

1 reply [Last post]
neojia
Offline
Joined: 2006-07-11

hi,

When I am going to debug JDK 1.6 b91 with gdb 6.5, I cannot get the source code line information for the hotspot components.

The following is the backtrace I got.
(gdb) bt
#0 0x00000035cbf2e4dd in raise () from /lib64/tls/libc.so.6
#1 0x00000035cbf2fc8e in abort () from /lib64/tls/libc.so.6
#2 0x0000002a95dd4b4e in os::abort ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#3 0x0000002a95afc2a8 in vm_exit_during_initialization ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#4 0x0000002a95961b3e in CollectorPolicy::initialize_size_info ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#5 0x0000002a95962091 in GenCollectorPolicy::initialize_size_info ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#6 0x0000002a95962124 in TwoGenerationCollectorPolicy::initialize_size_info ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#7 0x0000002a95dee499 in ParallelScavengeHeap::initialize ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#8 0x0000002a95f88b50 in Universe::initialize_heap ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
---Type to continue, or q to quit---
#9 0x0000002a95f8869e in universe_init ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#10 0x0000002a95a8e411 in init_globals ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#11 0x0000002a95f6619c in Threads::create_vm ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#12 0x0000002a95b5d2fa in JNI_CreateJavaVM ()
from /home/cjia/mustang-b91/jdk1.6.0/fastdebug/jre/lib/amd64/server/libjvm.so
#13 0x0000000040003648 in InitializeJVM ()
#14 0x000000004000203e in JavaMain ()
#15 0x000000304cb05f81 in start_thread () from /lib64/tls/libpthread.so.0
#16 0x00000035cbfc3af3 in thread_start () from /lib64/tls/libc.so.6
#17 0x0000000000000000 in ?? ()
(gdb) info line * 0x0000002a95961b3e
No line number information available for address
0x2a95961b3e <_ZN15CollectorPolicy20initialize_size_infoEv+174>
(gdb)

Any comments?

Thanks,
Neo

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kellyohair
Offline
Joined: 2004-09-03

I don't think the debug information is shipped as part of the Mustang binary drops, and even if it did I'm not sure the debugger would be able to find the matching source.

If you want full debugging you will need to build your own libjvm.so, and copy it into a jdk image.

The fastdebug libjvm.so is built with '-O -g' so may have limitations on what you can debug, or may not get source lines or variables correct all the time, depends on the debugger. So if you really want to do source line stepping and print local variables, you should probably build a debug version of libjvm.so. Just keep in mind that the debug VM will run slower.

-kto