Hack: Debug a specific critical section WINE_DEBUG_SPINLOCK
m.b.lankhorst at gmail.com
Fri Apr 18 16:37:28 CDT 2008
I created a hack to debug a specific critical section with
WINE_DEBUG_SPINLOCK environment. It was useful for me because it found
a very weird deadlock, a thread would terminate before releasing its
critical section. It will also change the timeout to 1 second so you
will get a faster response on potential latency issues.
How to use it?
First you need the exact spinlock name.
for example in parser.c:
pParser->csFilter.DebugInfo->Spare = (DWORD_PTR)(__FILE__ ":
Of course you still need to know what __FILE__ is, this is usually
parser.c but I'm not 100% sure that is the same for out of tree
So just to be sure:
$ strings parser.o |grep csFilter
export WINE_DEBUG_SPINLOCK="parser.c: ParserImpl.csFilter"
It will then print a ++ for every time a lock is entered, and -- for
every time lock is left., I would recommend mixing this with
WINEDEBUG=+tid so you can also see the threads they are in.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-devel