Difference between revisions of "Windows Debugging"

From Apache OpenOffice Wiki
Jump to: navigation, search
(migrate)
 
Line 20: Line 20:
  
 
This is currently not working. Trying to debug soffice.bin ends up with a segmentation fault. Any suggestions appreciated!
 
This is currently not working. Trying to debug soffice.bin ends up with a segmentation fault. Any suggestions appreciated!
 +
 +
== Other useful stuff ==
 +
 +
* [http://www.sysinternals.com/Utilities/ProcessExplorer.html Process Explorer]
 +
 +
* [http://www.sysinternals.com/Utilities/Filemon.html Filemonitor]

Revision as of 13:56, 5 March 2006

This is Windows-specific debugging information. There are also generic notes on Debugging.

General notes

You want to debug soffice.bin, as soffice.exe loads that in a separate process. You can copy soffice.bin to sofficebin.exe if it has to be called ".exe" for your debugger.

Debugging with Visual Studio

Debugging a non-debug exe

Problems tend to raise exceptions, you want to catch them before the exception happens. Run sofficebin.exe in the debugger and look at the Output window. Exceptions look like this:

First-chance exception at 0x7c81eb33 in sofficebin.exe: Microsoft C++ exception: com::sun::star::uno::RuntimeException @ 0x00e1e690.

0x7c81eb33 is the address of the instruction following the call to raise the exception. Go to this address in the disassembler, find the instruction before (which will be a call instruction), and set a break point there.

Then when an exception occurs, you can see in the call stack where it is coming from.

Debugging with gdb

This is currently not working. Trying to debug soffice.bin ends up with a segmentation fault. Any suggestions appreciated!

Other useful stuff

Personal tools