How to debug hotspot integrated with java codes
Xiaobin Lu
Xiaobin.Lu at Sun.COM
Mon Dec 15 13:24:54 PST 2008
Hi Colin,
It looks like the process hang when it tried to load some classes. Did
the application work without dbx attached to it?
Along the link I sent to you, there is a link
(http://developers.sun.com/solaris/articles/Java_debug/Java_debug_content.html)
which tells you how to debug Java process, please take a look at it. We
have a script to launch dbx internally and it takes care of the
LD_LIBRARY_PATH problem as well. I am attaching it in the email. You can
start that script as the following:
dbxr <path to java executable> -server (or -client which loads the
server or client VM)
-Xiaobin
On 12/15/08 10:57, Colin(Du Li) wrote:
> Hi, Xiaobin,
>
> I tried dbx, but dbx will hang after echo "reading libzip.so" as below:
>
>> $ dbx $LD_LIBRARY_PATH/gamma
>>
> For information about new features see `help changes'
> To remove this message, put `dbxenv suppress_startup_message 7.6' in your
> .dbxrc
> Reading gamma
> Reading ld-linux.so.2
> Reading libjvm.so
> Reading libm.so.6
> Reading libdl.so.2
> Reading libpthread.so.0
> Reading libc.so.6
> (dbx) run -version
> Running: gamma -version
> (process id 5777)
> Reading librt.so.1
> Reading libhpi.so
> Reading libnsl.so.1
> Reading libnss_files.so.2
> Reading libverify.so
> Reading libjava.so
> Reading libzip.so
> ....
>
> Then I have to kill this process to stop it.
> Do you know how to resolve this problem and start dbx properly?
> Thanks.
>
>
> xiaobin.lu wrote:
>
>> Refer to
>> http://developers.sun.com/sunstudio/overview/topics/debug_index.html to
>> find more details on how to use Sun Studio which is available on Linux
>> to debug mixed Java and native code.
>>
>> -Xiaobin
>>
>> Colin(Du Li) wrote:
>>
>>> Hi, guys.
>>>
>>> Now I'm debugging Hotspot. I'm using GDB. When I debug the source codes
>>> written in c++, it's fine. But if the VM has launched, I cannot trace
>>> into
>>> the source codes written in java. e.g. When I find Hotspot cannot load
>>> some
>>> class, and I wanna step into the class java.lang.ClassLoader , I don't
>>> know
>>> how to trace it. Apparently, I cannot do that with GDB.
>>> Can you guys give me some suggestion for debug in this situation?
>>> I spend several days on this problem, and really need some help on the
>>> debug things.
>>>
>>> Thanks a lot in advance!!
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20081215/5312d9a8/attachment.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dbxr
Url: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20081215/5312d9a8/attachment.ksh
More information about the hotspot-dev
mailing list