views:

278

answers:

1

I wrote a piece of software in Java that communicates with USB hardware by using a DLL provided by the hardware vendor. I used the Java Native Access library to write the wrappers to native code. Sometimes when I am running it, only on native code related functions, JVM crashes and I cannot find what caused the bug because it happens in native code, to which I do not have the source code (MSVCRT71.DLL).

I am most of the time a Linux developer, so I'm not used to this situation. What can I do to attach a debugger from outside (say, Visual C++) to the JVM process and get something meaningful (that is, not Assembly instructions) from it?

+2  A: 

MSVCRT71.DLL is the dll for the c-runtime libraries included in Visual Studio 7.1.

Install Visual Studio 7.1, which has the crt source. Goto Debug->processes, find the java instance you are running, then click "attach".

If you can't get your hands on VS7, try this

[http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx][1]

make sure you get the symbols for that version of the crt

KenE
Installing Visual Studio 7.1 worked, thanks!
jfsantos