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 debugged 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 file 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 Windows' standard headers)
A+
something seems wrong in your patch... the szName field from the exception field is never copied from the debugged 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);
OOPs... you're right. Works a lot better with ReadProcessMemory. :-)
I'll send a modified patch ASAP.
also, I don't like the fact that you put the #define in a public header file 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 Windows' standard headers)
Hmm.. sure, I can put both in the private header... I had the entry in the public one since there was already a WINE specific entry there, but I'll move my stuff all into the private debugger.h.
-James -- James Hatheway Software Designer - Macadamian Technologies, Inc. james@macadamian.com ~ http://www.macadamian.com
"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"