Author: martin
Date: 2006-06-09 08:01:22 -0400 (Fri, 09 Jun 2006)
New Revision: 61594
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/debug-mono-symfile.c
Log:
2006-06-09 Martin Baulig <[EMAIL PROTECTED]>
* debug-mono-symfile.c: Put this back and really fix it this
time. Sorry for all the trouble.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2006-06-09 09:17:40 UTC (rev 61593)
+++ trunk/mono/mono/metadata/ChangeLog 2006-06-09 12:01:22 UTC (rev 61594)
@@ -1,3 +1,8 @@
+2006-06-09 Martin Baulig <[EMAIL PROTECTED]>
+
+ * debug-mono-symfile.c: Put this back and really fix it this
+ time. Sorry for all the trouble.
+
2006-06-08 Zoltan Varga <[EMAIL PROTECTED]>
* icall.c (mono_class_get_throw): Fix a warning.
Modified: trunk/mono/mono/metadata/debug-mono-symfile.c
===================================================================
--- trunk/mono/mono/metadata/debug-mono-symfile.c 2006-06-09 09:17:40 UTC
(rev 61593)
+++ trunk/mono/mono/metadata/debug-mono-symfile.c 2006-06-09 12:01:22 UTC
(rev 61594)
@@ -199,7 +199,7 @@
MonoSymbolFile *symfile;
gchar *source_file = NULL;
const char *ptr;
- int i;
+ int count, i;
if ((symfile = minfo->handle->symfile) == NULL)
return NULL;
@@ -216,12 +216,13 @@
ptr = symfile->raw_contents +
read32(&(minfo->entry->_line_number_table_offset));
- lne = (MonoSymbolFileLineNumberEntry *) ptr;
+ count = read32(&(minfo->entry->_num_line_numbers));
+ lne = ((MonoSymbolFileLineNumberEntry *) ptr) + count - 1;
- for (i = 0; i < read32(&(minfo->entry->_num_line_numbers)); i++, lne++)
{
+ for (i = count - 1; i >= 0; i--, lne--) {
MonoDebugSourceLocation *location;
- if (read32(&(lne->_offset)) < offset)
+ if (read32(&(lne->_offset)) > offset)
continue;
location = g_new0 (MonoDebugSourceLocation, 1);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches