Unable to debug java code but able to debug c++

How can I debug java code from java applications using sun studio 11? I am able to debug c++ code which is native call from java from the same application.

To add, I cannot put breakpoints to the java code it gives "cannot find object file corresponding to ".."whereas sun studio allows me to put the breakpoints in the c++ code.

I run the application with gmake client and then attach the process in the sun studio.

I have tried lot of options like pathmap, loadobject,... none of them work.

Now if I load just the .class file without attaching the proces I am able to put breakpoints in java code but not when I attach the complete application with is a mix of java and c++. I need to this. Please help?

[737 byte] By [neeta_kadam@yahoo.coma] at [2007-11-26 21:32:28]
# 1

I didn't try to do this myself, but there's a section in user's manual devoted to mixed (Java-C++) applications debugging. It's not too obvious, so check out this document:

http://docs.sun.com/app/docs/doc/819-3683?q=Debugging+with+dbx&s=t

"Attaching dbx to a Running Java Application" is probably what you want.

MaximKartasheva at 2007-7-10 3:13:22 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Thanks for the reply, I had already been to that link.

On another note, using Load Program I could get java and c++ debug together but with two variations

1. Environment Variable javasrcpath would get reset to classpath.

2. Dbx configuration on Load program would get overriden with Dbx configuration from the Debug Menu

So had to reset these values (before issuing run) to get working.

neeta_kadam@yahoo.coma at 2007-7-10 3:13:22 > top of Java-index,Development Tools,Solaris and Linux Development Tools...