CVS: winex/dlls/dbghelp msc.c,1.6,1.7

[email protected] 31 Aug 2007 12:55:53 -0000
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/dlls/dbghelp msc.c,1.6,1.7Update of /var/lib/cvsd/cvsroot/winex/dlls/dbghelp
In directory agravaine:/tmp/cvs-serv3678/dlls/dbghelp

Modified Files:
	msc.c 
Log Message:
added some comments explaining changes
trac #2034

- added some comments explaining the reasons behind some of the changes i've made recently, and what still needs to be done in those areas.


Index: msc.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/dbghelp/msc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- msc.c	30 Aug 2007 14:20:22 -0000	1.6
+++ msc.c	31 Aug 2007 12:55:51 -0000	1.7
@@ -1668,12 +1668,24 @@
                                         &loc, sym->label_v3.name);
             }
             else if (TRACE_ON(dbghelp_msc)){
+
+                /* the compiler inserts a label before every function that uses C++ exception handling (try-catch).
+                   The label's name always takes the form "__ehhandler$<giant_decorated_function_name>".  Since these
+                   labels being outside of a function is not actually an error, let's filter out those cases.  The
+                   function names can get really really long (think member functions of nested templates being passed
+                   and returning many other nested templates), and the TRACE/FIXME/ERR macros will abort the process
+                   if their buffers overflow (which they do for lots of function names).  Because of all this, we'll 
+                   just prevent those names from being written out at all. */
                 const char *ehName = "__ehhandler$";
 
 
+                /* C++ EH wrapped function => just trace out an event */
                 if (!strncmp(sym->label_v3.name, ehName, strlen(ehName)))
                     TRACE("found a C++ EH wrapped function label\n");
 
+                /* this is most often not an error or fixme case either.  The function-less labels are generally 
+                   initializer labels for global or static variables.  We'll trace these out for curiosity purposes
+                   just in case some bad case sneaks through. */
                 else
                     FIXME("No current function for V3 label %s.  Possibly a global initializer label\n", sym->label_v3.name);
             }
@@ -2461,6 +2473,15 @@
             }
 
 
+            /* PDB files generated through VC8 use a new format to store line number information.  The 
+               <lineno_size> member of the PDB_SYMBOL_FILE_EX header is 0 in this case, but the <unknown2>
+               member (next member) has a value.  It isn't clear if these two have changed to a single
+               64-bit value, or if the <unknown2> member has been used as-is.  In theory the line number
+               information for a very poorly laid out compile unit *could* exceed 4GB, but it's highly
+               unlikely.  
+               Since the format of the new line number info isn't known yet (it's definitely different 
+               from the VC7 line number info block), we'll just spew a fixme here and leave the line
+               number info blank */
             if (sfile.unknown2 && sfile.lineno_size == 0)
                 FIXME("line number information is missing, but the mystery information block is present instead\n");