This is an introductory document for debugging DRLVM on Windows using the Microsoft Visual Studio Debugger.
Generating a Debug Build
Build DRLVM in the debug mode using Visual Studio.Net. For instructions on how to set your command-line environemnt and build DRLVM, read the Getting Started for Contributors Guide.
The build process generates and deploys the executables( .exe and .dll ) and debuginfo ( .pdb ) files in the build\win_XX_msvc_debug\deploy\jre\bin\default directory. Some of these files are em.dll, em.pdb, gc_cc.dll, gc_cc.pdb, gc_gen.dll, gc_gen.pdb, harmonyvm.dll, harmonyvm.pdb, jitrino.dll, jitrino.pdb etc.
Launching the Debugger
For launching the Visual Sudio debugger, you can use the same command prompt, as for building DRLVM. The environment variables are already set.
To launch the Visual Studio .Net 2003 debugger, do the following:
Open the build\custom\msvc_2003\drlvm.sln solution file with the Visual Studio IDE
- To generate a solution file on the fly and to prompt it for saving for the next debugging session:
Invoke devenv /debugexe absolute-pathname-of-drlvm-java.exe arguments
Attach to a running DRLVM process using vs7jit -p pid
The Windows pdb files have enough meta information to automatically point to the correct source file location etc. as default.
Some Debugging Tips
There are numerous documents available on the web on how to use the Visual Studio debugger effectively both for new and for advanced users. For example, Visual Studio Debugging.