diff options
author | Miguel de Icaza <miguel@gnome.org> | 2003-11-27 10:01:26 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2003-11-27 10:01:26 +0300 |
commit | 90fc8a6e7573e89c88e5386745a2240b84588aab (patch) | |
tree | 52218200efd96c456ac7187a43613f2e6c419811 /web/jit-debug | |
parent | 3ebae787b84a7c369a6083b5f98c6f6ba1d56e54 (diff) |
Improve
svn path=/trunk/mono/; revision=20524
Diffstat (limited to 'web/jit-debug')
-rw-r--r-- | web/jit-debug | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/web/jit-debug b/web/jit-debug index 85f92906989..e33deb65579 100644 --- a/web/jit-debug +++ b/web/jit-debug @@ -13,6 +13,34 @@ Notice that the program will need to be compiled with the -g flag and that running with --debug will slow down the execution. +* Debugging with GDB + + If you use GDB to debug your mono process, you can use the function + print_method_from_ip(void *address) to obtain the name of a method + given an address. + + For example: + + <pre> +(gdb) where +#0 ves_icall_System_String_GetHashCode (me=0x80795d0) at string-icalls.c:861 +#1 0x0817f490 in ?? () +#2 0x0817f42a in ?? () +#3 0x0817f266 in ?? () +#4 0x0817f1a5 in ?? () +</pre> + + You can now use: + +<pre> +(gdb) p print_method_from_ip (0x0817f490) +IP 0x817f490 at offset 0x28 of method (wrapper managed-to-native) System.String:GetHashCode () (0x817f468 0x817f4a4) +$1 = void +(gdb) p print_method_from_ip (0x0817f42a) +IP 0x817f42a at offset 0x52 of method System.Collections.Hashtable:GetHash (object) (0x817f3d8 0x817f43b) +$2 = void +</pre> + * Mono Debugger The Mono debugger is written in C# and can debug both managed @@ -38,4 +66,4 @@ -
\ No newline at end of file + |