winedbg: Support longer thread names

Eric Pouech eric.pouech at
Tue Mar 13 08:40:57 CDT 2007

Erich Hoover a écrit :
> I am not very familiar with the winedbg code and do not see any easy 
> (ie, non-hackish) way to get the length of the string in order to 
> properly allocate the name size.  I could read back a "large buffer" 
> and use the string resulting from that to determine how large of a 
> name to allocate, but that seems slightly hackish.  If you have a 
> suggestion then I'm all ears.
not really, my point was not to allocate a large buffer for every 
thread... then reading the thread name requires either that you grow the 
buffer while reading small chunks (that would be the less expensive 
> Erich Hoover
> ehoover at <mailto:ehoover at>
> On 3/11/07, *Eric Pouech* <eric.pouech at 
> <mailto:eric.pouech at>> wrote:
>     Erich Hoover a écrit :
>     > Real Name:
>     >     Erich Hoover
>     > Description:
>     >     The thread name length in winedbg is currently restricted to 9
>     > characters, this is not nearly long enough for debugging threads in
>     > the Supreme Commander demo and results in character corruption
>     on the
>     > terminal.  Since this particular application names one of the
>     threads
>     > with the map path (Map loader /maps/scmp_019/scmp_019.scmap), a
>     > significant increase in the number of characters is
>     necessary.  This
>     > patch ups the allowed thread name length to 100 characters and
>     > null-terminates the string in case an application exceeds that
>     > threshold value.
>     > Changelog:
>     >     winedbg: Support longer thread names
>     in that case, it would be better to dynamically allocate the
>     string (and
>     to create it by default at 5 bytes for the %04x value)
>     furthermore, you need to change the comment in debugger.h in
>     THREADNAME_INFO structure about the name's length, as it seems VC7
>     removed the restriction to 8 characters that existed in VC6
>     A+

Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)

More information about the wine-devel mailing list