Author: zoltan
Date: 2005-04-09 08:34:09 -0400 (Sat, 09 Apr 2005)
New Revision: 42726

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/mini.c
Log:
2005-04-09  Zoltan Varga  <[EMAIL PROTECTED]>

        * mini.c (print_method_from_ip): Fix debugging support.


Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog      2005-04-09 04:04:31 UTC (rev 42725)
+++ trunk/mono/mono/mini/ChangeLog      2005-04-09 12:34:09 UTC (rev 42726)
@@ -1,3 +1,7 @@
+2005-04-09  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * mini.c (print_method_from_ip): Fix debugging support.
+
 2005-2-1  Massimiliano Mantione  <[EMAIL PROTECTED]>
 
        * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE

Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2005-04-09 04:04:31 UTC (rev 42725)
+++ trunk/mono/mono/mini/mini.c 2005-04-09 12:34:09 UTC (rev 42726)
@@ -186,7 +186,7 @@
                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 @@
                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);
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to