1 * Debugging information
3 Compile your programs using the `-g' flag in MCS, that will all a special
4 resource containing debugging information to your executable.
6 To get stack traces with line number information, you need to run your
10 mono --debug program.exe
13 Notice that the program will need to be compiled with the -g
14 flag and that running with --debug will slow down the execution.
18 If you use GDB to debug your mono process, you can use the function
19 mono_print_method_from_ip(void *address) to obtain the name of a method
26 #0 ves_icall_System_String_GetHashCode (me=0x80795d0) at string-icalls.c:861
27 #1 0x0817f490 in ?? ()
28 #2 0x0817f42a in ?? ()
29 #3 0x0817f266 in ?? ()
30 #4 0x0817f1a5 in ?? ()
36 (gdb) p mono_print_method_from_ip (0x0817f490)
37 IP 0x817f490 at offset 0x28 of method (wrapper managed-to-native) System.String:GetHashCode () (0x817f468 0x817f4a4)
39 (gdb) p mono_print_method_from_ip (0x0817f42a)
40 IP 0x817f42a at offset 0x52 of method System.Collections.Hashtable:GetHash (object) (0x817f3d8 0x817f43b)
44 Mono support libraries use a couple of signals internally that
45 confuse gdb, you might want to add this to your .gdbinit file:
48 handle SIGPWR nostop noprint
49 handle SIGXCPU nostop noprint
54 The Mono debugger is written in C# and can debug both managed
55 and unmanaged applications, support for multiple-threaded
56 applications and should be relatively easy to port to new
59 Details of the release are available in <a
60 href="http://lists.ximian.com/archives/public/mono-list/2003-January/011415.html">post</a>.
62 The debugger contains both Gtk# and command line interfaces.
63 The debugging file format used in Dwarf (it's already supported
64 by our class libraries and the Mono C# compiler; To debug C
65 applications, you need a recent GCC, or to pass the -gdwarf-2
68 You can download the releases from <a
69 href="http://primates.ximian.com/~martin/debugger/">Martin Baulig's