[PATCH 1/2] kernelbase: Use +threadname channel for SetThreadDescription().
Brendan Shanks
bshanks at codeweavers.com
Tue Dec 7 11:11:14 CST 2021
> On Dec 7, 2021, at 8:11 AM, Zebediah Figura <zfigura at codeweavers.com> wrote:
>
> On 12/7/21 00:23, Brendan Shanks wrote:
>> Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
>> ---
>> dlls/kernelbase/thread.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>> diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c
>> index e9c12d85771..3dd83befe10 100644
>> --- a/dlls/kernelbase/thread.c
>> +++ b/dlls/kernelbase/thread.c
>> @@ -37,6 +37,7 @@
>> #include "wine/heap.h"
>> WINE_DEFAULT_DEBUG_CHANNEL(thread);
>> +WINE_DECLARE_DEBUG_CHANNEL(threadname);
>> /***********************************************************************
>> @@ -420,7 +421,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH SetThreadDescription( HANDLE thread, PCWSTR des
>> THREAD_NAME_INFORMATION info;
>> int length;
>> - TRACE( "(%p, %s)\n", thread, debugstr_w( description ));
>> + if (thread == GetCurrentThread())
>> + WARN_(threadname)( "Thread renamed to %s\n", debugstr_w( description ));
>> + else
>> + WARN_(threadname)( "Thread %p renamed to %s\n", thread, debugstr_w( description ));
>> length = description ? lstrlenW( description ) * sizeof(WCHAR) : 0;
>>
>
> It really seems non-ideal that this is a thread handle, but the other, nearly identical, message prints a thread ID...
Good point, I’ll make that clearer.
More information about the wine-devel
mailing list