named critical sections

eric pouech eric.pouech at wanadoo.fr
Tue Aug 7 11:44:22 CDT 2001


Andreas Mohr wrote:
> 
> Hi all,
> 
> this patch implements *names* for the most important critical sections.
> 
> I simply grew tired of constantly having to look up the crst addresses
> in winedbg whenever there was some crst timeout.
> Yeah, I know, that patch is slightly weird/dirty, but it's useful.

the attached patch prints the name of the crit section when the debugger
gets
activated on a wait time out

A+
-- 
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle
-------------- next part --------------
Name: wd_crst
ChangeLog: now tries to print the symbol name of a crst when it times out
GenDate: 2001/08/07 16:42:29 UTC
ModifiedFiles: debugger/winedbg.c
AddedFiles: 
===================================================================
RCS file: /usr/share/cvs/cvsroot/wine/wine/debugger/winedbg.c,v
retrieving revision 1.37
diff -u -u -r1.37 winedbg.c
--- debugger/winedbg.c	2001/08/06 17:51:53	1.37
+++ debugger/winedbg.c	2001/08/07 16:28:59
@@ -466,8 +466,15 @@
             DEBUG_Printf(DBG_CHN_MESG, "^C");
             break;
         case EXCEPTION_CRITICAL_SECTION_WAIT:
-            DEBUG_Printf(DBG_CHN_MESG, "critical section %08lx wait failed", 
-			  rec->ExceptionInformation[0]);
+	    {
+		DBG_ADDR	addr;
+
+		addr.seg = 0;
+		addr.off = rec->ExceptionInformation[0];
+
+		DEBUG_Printf(DBG_CHN_MESG, "wait failed on critical section ");
+		DEBUG_PrintAddress(&addr, DEBUG_CurrThread->dbg_mode, FALSE);
+	    }
 	    if (!DBG_IVAR(BreakOnCritSectTimeOut))
 	    {
 		DEBUG_Printf(DBG_CHN_MESG, "\n");


More information about the wine-patches mailing list