Author: zoltan
Date: 2005-04-22 15:24:12 -0400 (Fri, 22 Apr 2005)
New Revision: 43459
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini-exceptions.c
Log:
2005-04-22 Zoltan Varga <[EMAIL PROTECTED]>
* mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
in wrapper methods. Also rename 'address' variable to 'offset'.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2005-04-22 19:22:27 UTC (rev 43458)
+++ trunk/mono/mono/mini/ChangeLog 2005-04-22 19:24:12 UTC (rev 43459)
@@ -1,3 +1,8 @@
+2005-04-22 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
+ in wrapper methods. Also rename 'address' variable to 'offset'.
+
2005-04-20 Zoltan Varga <[EMAIL PROTECTED]>
* mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
Modified: trunk/mono/mono/mini/mini-exceptions.c
===================================================================
--- trunk/mono/mono/mini/mini-exceptions.c 2005-04-22 19:22:27 UTC (rev
43458)
+++ trunk/mono/mono/mini/mini-exceptions.c 2005-04-22 19:24:12 UTC (rev
43459)
@@ -61,23 +61,27 @@
if (managed2 || ji->method->wrapper_type) {
char *source_location, *tmpaddr, *fname;
- gint32 address, iloffset;
+ gint32 offset, iloffset;
- address = (char *)ip - (char *)ji->code_start;
+ if (!managed2)
+ /* ctx->ip points into native code */
+ offset = (char*)MONO_CONTEXT_GET_IP (new_ctx) -
(char*)ji->code_start;
+ else
+ offset = (char *)ip - (char *)ji->code_start;
if (native_offset)
- *native_offset = address;
+ *native_offset = offset;
if (managed)
if (!ji->method->wrapper_type)
*managed = TRUE;
if (trace) {
- source_location =
mono_debug_source_location_from_address (ji->method, address, NULL, domain);
- iloffset = mono_debug_il_offset_from_address
(ji->method, address, domain);
+ source_location =
mono_debug_source_location_from_address (ji->method, offset, NULL, domain);
+ iloffset = mono_debug_il_offset_from_address
(ji->method, offset, domain);
if (iloffset < 0)
- tmpaddr = g_strdup_printf ("<0x%05x>", address);
+ tmpaddr = g_strdup_printf ("<0x%05x>", offset);
else
tmpaddr = g_strdup_printf ("[0x%05x]",
iloffset);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches