Jacek Caban : libwine: Added tid debug channel support on native Windows builds.
Module: wine Branch: master Commit: e422a22ed92937da4e0f37311877da8d626bfa02 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e422a22ed92937da4e0f373118... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 27 17:08:16 2013 +0100 libwine: Added tid debug channel support on native Windows builds. --- libs/wine/debug.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/libs/wine/debug.c b/libs/wine/debug.c index a38abf4..548ef22 100644 --- a/libs/wine/debug.c +++ b/libs/wine/debug.c @@ -33,6 +33,10 @@ #include "wine/debug.h" #include "wine/library.h" +#if defined(__MINGW32__) || defined(_MSC_VER) +WINE_DECLARE_DEBUG_CHANNEL(tid); +#endif + static const char * const debug_classes[] = { "fixme", "err", "warn", "trace" }; #define MAX_DEBUG_OPTIONS 256 @@ -402,6 +406,10 @@ static int default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_ch { int ret = 0; +#if defined(__MINGW32__) || defined(_MSC_VER) + if (TRACE_ON(tid)) + ret += wine_dbg_printf( "%04x:", GetCurrentThreadId() ); +#endif if (cls < sizeof(debug_classes)/sizeof(debug_classes[0])) ret += wine_dbg_printf( "%s:%s:%s ", debug_classes[cls], channel->name, func ); if (format)
participants (1)
-
Alexandre Julliard