Module: wine Branch: master Commit: 719a7d32c5f016084e254df29f32e3cba6f634de URL: http://source.winehq.org/git/wine.git/?a=commit;h=719a7d32c5f016084e254df29f...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Aug 25 12:31:21 2015 +0200
ntdll: Added new pid debug channel to append process id to debug output.
---
dlls/ntdll/debugtools.c | 3 +++ libs/wine/debug.c | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c index cbbf744..eb43224 100644 --- a/dlls/ntdll/debugtools.c +++ b/dlls/ntdll/debugtools.c @@ -39,6 +39,7 @@ #include "ntdll_misc.h"
WINE_DECLARE_DEBUG_CHANNEL(tid); +WINE_DECLARE_DEBUG_CHANNEL(pid); WINE_DECLARE_DEBUG_CHANNEL(timestamp);
static struct __wine_debug_functions default_funcs; @@ -170,6 +171,8 @@ static int NTDLL_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_chan ULONG ticks = NtGetTickCount(); ret = wine_dbg_printf( "%3u.%03u:", ticks / 1000, ticks % 1000 ); } + if (TRACE_ON(pid)) + ret += wine_dbg_printf( "%04x:", GetCurrentProcessId() ); if (TRACE_ON(tid)) ret += wine_dbg_printf( "%04x:", GetCurrentThreadId() ); if (cls < sizeof(classes)/sizeof(classes[0])) diff --git a/libs/wine/debug.c b/libs/wine/debug.c index 548ef22..8b04ef9 100644 --- a/libs/wine/debug.c +++ b/libs/wine/debug.c @@ -35,6 +35,7 @@
#if defined(__MINGW32__) || defined(_MSC_VER) WINE_DECLARE_DEBUG_CHANNEL(tid); +WINE_DECLARE_DEBUG_CHANNEL(pid); #endif
static const char * const debug_classes[] = { "fixme", "err", "warn", "trace" }; @@ -407,6 +408,8 @@ 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(pid)) + ret += wine_dbg_printf( "%04x:", GetCurrentProcessId() ); if (TRACE_ON(tid)) ret += wine_dbg_printf( "%04x:", GetCurrentThreadId() ); #endif