2008-06-09 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Mon, 9 Jun 2008 13:15:20 +0000 (13:15 -0000)
committerMartin Baulig <martin@novell.com>
Mon, 9 Jun 2008 13:15:20 +0000 (13:15 -0000)
* debug-mono-symfile.c (load_symfile): Check the major version
first; if it's wrong, don't print the minor version in the error message.

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

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

index cfced2e4eb43a5d39e7b49a4046e4a1809552567..d28192e6f6be5e6a64d153bb855475cdaa8e62aa 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-09  Martin Baulig  <martin@ximian.com>
+
+       * debug-mono-symfile.c (load_symfile): Check the major version
+       first; if it's wrong, don't print the minor version in the error message.
+
 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
 
        * appdomain.c (set_domain_search_path): Make this use the domain assemblies
index ee490a0c177b9752ad604793499c8d6b3748ca59..56bb90657891e98204518d84e5e8a08aa4dfbc8c 100644 (file)
@@ -80,7 +80,14 @@ load_symfile (MonoDebugHandle *handle, MonoSymbolFile *symfile, gboolean in_the_
        minor = read32(ptr);
        ptr += sizeof(guint32);
 
-       if ((major != MONO_SYMBOL_FILE_MAJOR_VERSION) || (minor != MONO_SYMBOL_FILE_MINOR_VERSION)) {
+       if (major != MONO_SYMBOL_FILE_MAJOR_VERSION) {
+               if (!in_the_debugger)
+                       g_warning ("Symbol file %s has incorrect version (expected %d, got %d)",
+                                  symfile->filename, MONO_SYMBOL_FILE_MAJOR_VERSION, major);
+               return FALSE;
+       }
+
+       if (minor != MONO_SYMBOL_FILE_MINOR_VERSION) {
                if (!in_the_debugger)
                        g_warning ("Symbol file %s has incorrect version "
                                   "(expected %d.%d, got %d.%d)", symfile->filename,