[PATCH] Name Thread Exception support in Wine debugger

eric pouech eric.pouech at wanadoo.fr
Fri Apr 6 13:40:10 CDT 2001

James Hatheway wrote:
> Hi guys,
> As I mentioned in an earlier email to the Devel mailing list, I discovered the
> application I am supporting started raising more exceptions than usual.  These
> turned out to be an undocumented signal to the MS VC6 debugger to name the
> current thread.  You can read more about this at:
> http://www.vcdj.com/upload/free/features/vcdj/2001/03mar01/et0103/et0103.asp
> or searching google.com or deja.com for "0x406D1388".  This patch fixes
> the WINE debugger to handle this exception, just like MS VC6 debugger does.
something seems wrong in your patch...
the szName field from the exception field is never copied from the
program space to the debugger space (only the address is)
so, you should use ReadProcessMemory instead (something like
ReadProcessMemory(pThread->name, sizeof(pThread->name),
DEBUG_CurrThread->process->handle, pThreadName->szName);

also, I don't like the fact that you put the #define in a public header
and the exception struct definition inside the file
it would make more sense to me if both were either public or private
(I'd go for private, since those values don't seem to be defined in
standard headers)


Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle

More information about the wine-devel mailing list