From 21616e7b91c0e8b85ad575c8e09588bec96daffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Sun, 5 Oct 2014 09:57:11 +0000 Subject: [PATCH] [LIBWINE] - Add support for the +tid debug channel, prefixing every traces with the current thread ID. svn path=/trunk/; revision=64538 --- reactos/lib/3rdparty/libwine/debug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/lib/3rdparty/libwine/debug.c b/reactos/lib/3rdparty/libwine/debug.c index 1bf8dc1c133..7023bdd3683 100644 --- a/reactos/lib/3rdparty/libwine/debug.c +++ b/reactos/lib/3rdparty/libwine/debug.c @@ -35,6 +35,8 @@ #include #include +WINE_DECLARE_DEBUG_CHANNEL(tid); + ULONG NTAPI vDbgPrintExWithPrefix( @@ -416,6 +418,9 @@ static int default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_ch { int ret = 0; + if (TRACE_ON(tid)) + ret += wine_dbg_printf("%04x:", HandleToULong(NtCurrentTeb()->ClientId.UniqueThread)); + if (cls < sizeof(debug_classes)/sizeof(debug_classes[0])) ret += wine_dbg_printf( "%s:", debug_classes[cls] );