Debugging Java apps with dbx
Hi, I have read about the new feature in SunOne Studio 7 that allows to debug an application that's written in Java as well as the underlying native code. I wanted to debug my Java app and the JVM that it's running on. So I downloaded the source code for Sun JVM and compiled it with debug symbols.
Now, however, I am having problems using dbx for debugging a Java app. I tried 2 options: (1) starting the Java app. within the dbx and (2) starting it separately and attaching to the running JVM with dbx. I did not have any luck in either scenario.
In scenario 1 I got the following errors reported to me by dbx:
(dbx) debug HelloWorld.class Debug target is "HelloWorld.class" Will be debugging "HelloWorld" AgentThread: JVM_OnLoad(): debugger not attaching dbx: Unable to start the Java virtual machine
(My LD_LIBRARY_PATH was set correctly so that the JVM could find libdbx_agent.so, and my jvm_invocation environmental variable was set to my jvm with -Xdebug flag).
In scenario (2), when I tried attaching with dbx to an already running JVM, I got the following output from dbx:
Reading java Reading ld.so.1 Reading libthread.so.1 Reading libdl.so.1 Reading libc.so.1 Reading libc_psr.so.1 Reading libjvm.so Reading libCrun.so.1 Reading libsocket.so.1 Reading libnsl.so.1 Reading libm.so.1 Reading libw.so.1 Reading libmp.so.2 Reading libhpi.so Reading libverify.so Reading libjava.so Reading libzip.so Reading libdbx_agent.so detected a multithreaded program Attached to process 6467 with 12 LWPs t@1 (l@1) stopped in _poll at 0xff29990c 0xff29990c: _poll+0x0004: ta 0x8 dbx: panic: "JThreadProxy::refresh"(): Assertion (t_thr != Thread::null) failed - "jvm.cc":1987
Does anyone have any ideas what I could be doing wrong? I understand that cross-language debugging with DBX is a very new feature. So if anyone could share their experience using it, I would greatly appreciate it.
Thanks!

