[Mono-list] What's this message?

Ferguson, Neale Neale.Ferguson@SoftwareAG-USA.com
Wed, 11 Feb 2004 10:52:34 -0500


Thanks, you're right about the endianess. I got rid of the error messages by
the following:

--- debug-mono-symfile.c        12 Nov 2003 13:15:34 -0000      1.55
+++ debug-mono-symfile.c        11 Feb 2004 15:29:40 -0000
@@ -10,10 +10,11 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/mono-debug.h>
 #include <mono/metadata/debug-mono-symfile.h>
+#include <mono/metadata/mono-endian.h>

 #include <fcntl.h>
 #include <unistd.h>

 #define RANGE_TABLE_CHUNK_SIZE         256
@@ -53,18 +54,18 @@

        ptr = start = symfile->raw_contents;
        if (!ptr)
                return FALSE;

-       magic = *((guint64 *) ptr);
+       magic = mono_read64(ptr);
        ptr += sizeof(guint64);
        if (magic != MONO_SYMBOL_FILE_MAGIC) {
-               g_warning ("Symbol file %s has is not a mono symbol file",
handle->image_file);
+               g_warning ("Symbol file %s is not a mono symbol file",
handle->image_file);
                return FALSE;
        }

-       version = *((guint32 *) ptr);
+       version = mono_read32(ptr);
        ptr += sizeof(guint32);
        if (version != MONO_SYMBOL_FILE_VERSION) {
                g_warning ("Symbol file %s has incorrect version "
                           "(expected %d, got %ld)", handle->image_file,
                           MONO_SYMBOL_FILE_VERSION, version);

but I haven't looked to see what needs to be done to actually use this
information in a big-endian environment. Any reason these routines aren't
"inline". (In fact, S/390 has the LRV and STRV instructions that will
reverse bytes for you which I may plug in as an optimization.)

-----Original Message-----
Hi,

I think lupus answered this one here:

http://lists.ximian.com/archives/public/mono-devel-list/2004-February/003924
.html

(Most likely the debug symbol data code wasn't written with
portability in mind and it's full of endianess issues)

As for the grammar, the file to patch would be:

mono/mono/metadata/debug-mono-symfile.c

g_warning ("Symbol file %s has is not a mono symbol file",
handle->image_file);

;-)