Debugging with Mono
bwok bwok bwok
Debugging with GDB
If you want to do deep debugging, you need to use gdb. gdb is useful when Smuxi
crashes with a SEGV, as gdb can debug into Mono itself too.
First you need gdb and Mono with debug symbols installed:
sudo apt-get install gdb mono-runtime-dbg mono-dbg
Now you can start smuxi-server with gdb like this:
gdb --args mono-sgen --debug /usr/lib/smuxi/smuxi-server.exe
Or smuxi-frontend-gnome like this:
gdb --args mono-sgen --debug /usr/lib/smuxi/smuxi-frontend-gnome.exe
Or test-cases like this:
gdb --args mono-sgen --debug /usr/lib/nunit/nunit-console.exe bin/debug/smuxi-engine-tests.dll
This starts a gdb shell that lets you control the process. Start the process
by entering:
run
Debugging with Windows Debugger (WinDbg)
Run! Ok, you don't want to listen. So here is the path of doom:
- Download and install the Windows SDK (you don't need all of the SDK,
Debugging Tools are sufficient)
- Start WinDbg X86 (not X64!) from the start menu
- Hit File -> Open Executable from the application menu
- Select smuxi-frontend-gnome.exe from Smuxi's application directory
(default install location is C:\Program Files (x86)\Smuxi)
- Set start directory to to Smuxi's application directory
- Confirm the Open button
- Acknowledge Save information for workspace with yes.
- Enter
- .sympath SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
- .symfix+ c:\symbols
- .reload /f
- .loadby sos clr
- or
- .load C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.dll
- Hit Debug -> Go from the application menu
- Use Smuxi very hard till it explodes with a Microsoft Visual C++ Runtime
Library error dialog
- Close error dialog
- Switch to WinDbg
- Enter
- ~* kp
- !PrintException
- !threads
- !dumpstack
- Copy/paste the complete output into the bugreport
- Feel tortured