Interesting Magic # exception understood by the MS debugger...

James Hatheway james at
Mon Apr 2 15:20:06 CDT 2001

Hi guys,

I encountered something interesting while debugging a newer
build of my application.  I noticed that all of a sudden I was receiving
approximately 10 new exceptions in the debugger on startup that I wasn't
receiving before. After digging a little, I found out that the app
coders were making use of a 'hidden' feature of MS VC that allowed
you to name your threads (thus allowing for easier debugging).

To do this, you call RaiseException with the code of 0x406D1388.
(Search on or for "0x406D1388" for details.)
The windows debugger seems to be on the lookout for this code.  Of
course, what it does in wine is just breaking into the
debugger many times and getting on my nerves. :-)

For now, I put the little hack I attached to this mail in my tree to
save my sanity.  My question to the list is, (A) is there a way to name
threads in Linux/Unix (I don't think so, but of course I could be wrong)
and (B) should we support MS's hack somehow in the official tree?


James Hatheway
Software Designer - Macadamian Technologies, Inc.
james at ~

  "Man könnte froh sein, wenn die Luft so rein wäre wie das Bier"
  "One could be happy if the air were as pure as the beer"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: name_thread.diff
Type: application/octet-stream
Size: 995 bytes
Desc: not available
Url :

More information about the wine-devel mailing list