2005-04-09 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Sat, 9 Apr 2005 12:34:09 +0000 (12:34 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sat, 9 Apr 2005 12:34:09 +0000 (12:34 -0000)
* mini.c (print_method_from_ip): Fix debugging support.

svn path=/trunk/mono/; revision=42726

mono/mini/ChangeLog
mono/mini/mini.c

index 6c9fc83cc1d12290a367a4e1cfe28fc960409187..6fcc50e8861ec58ce657b7e8e136e3d0a9cbb9d9 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
+
+       * mini.c (print_method_from_ip): Fix debugging support.
+
 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
 
        * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
index 2adf047f5b9f581139fc1c335174026c672d3914..f3e3472d2d523ac5c7a83ce689ac6c959eee0667 100644 (file)
@@ -186,7 +186,7 @@ get_method_from_ip (void *ip)
                return NULL;
        }
        method = mono_method_full_name (ji->method, TRUE);
-       source = mono_debug_source_location_from_address (ji->method, (int) ip, NULL, domain);
+       source = mono_debug_source_location_from_address (ji->method, (guint32)((guint8*)ip - (guint8*)ji->code_start), NULL, domain);
 
        res = g_strdup_printf (" %s + 0x%x (%p %p) [%p - %s]", method, (int)((char*)ip - (char*)ji->code_start), ji->code_start, (char*)ji->code_start + ji->code_size, domain, domain->friendly_name);
 
@@ -211,7 +211,7 @@ print_method_from_ip (void *ip)
                return;
        }
        method = mono_method_full_name (ji->method, TRUE);
-       source = mono_debug_source_location_from_address (ji->method, (int) ip, NULL, domain);
+       source = mono_debug_source_location_from_address (ji->method, (guint32)((guint8*)ip - (guint8*)ji->code_start), NULL, domain);
 
        g_print ("IP %p at offset 0x%x of method %s (%p %p)[domain %p - %s]\n", ip, (int)((char*)ip - (char*)ji->code_start), method, ji->code_start, (char*)ji->code_start + ji->code_size, domain, domain->friendly_name);