Index: sdk/include/reactos/wine/debug.h =================================================================== --- sdk/include/reactos/wine/debug.h (revision 73555) +++ sdk/include/reactos/wine/debug.h (working copy) @@ -93,7 +93,7 @@ __WINE_DBG_LOG #define __WINE_DBG_LOG(args...) \ - ros_dbg_log( __dbcl, __dbch, __RELFILE__, __FUNCTION__, __LINE__, args); } } while(0) + ros_dbg_log( __dbcl, __dbch, __RELFILE__, __LINE__, __FUNCTION__, args); } } while(0) #define __WINE_PRINTF_ATTR(fmt,args) /*__attribute__((format (printf,fmt,args)))*/ @@ -139,7 +139,7 @@ #define __WINE_DPRINTF(dbcl,dbch) \ (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \ - (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"",__LINE__,"") == -1)) ? \ + (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__RELFILE__,__LINE__,__FUNCTION__,"") == -1)) ? \ (void)0 : (void)wine_dbg_printf #define __WINE_PRINTF_ATTR(fmt, args) @@ -154,7 +154,7 @@ const char * (*dbgstr_wn)( const WCHAR *s, int n ); int (*dbg_vprintf)( const char *format, va_list args ); int (*dbg_vlog)( enum __wine_debug_class cls, struct __wine_debug_channel *channel, - const char *file, const char *function, const int line, const char *format, va_list args ); + const char *file, const int line, const char *function, const char *format, va_list args ); }; extern unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel ); @@ -179,7 +179,7 @@ const char *format, ... ) __WINE_PRINTF_ATTR(4,5); /* ReactOS compliant debug format */ extern int ros_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *file, - const char *func, const int line, const char *format, ... ) __WINE_PRINTF_ATTR(6,7); + const int line, const char *func, const char *format, ... ) __WINE_PRINTF_ATTR(6,7); static __inline const char *wine_dbgstr_a( const char *s ) { Index: sdk/lib/3rdparty/libwine/debug.c =================================================================== --- sdk/lib/3rdparty/libwine/debug.c (revision 73555) +++ sdk/lib/3rdparty/libwine/debug.c (working copy) @@ -35,6 +35,7 @@ #include #include +WINE_DECLARE_DEBUG_CHANNEL(pid); WINE_DECLARE_DEBUG_CHANNEL(tid); ULONG @@ -249,7 +250,7 @@ if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1; va_start(valist, format); - ret = funcs.dbg_vlog( cls, channel, NULL, func, 0, format, valist ); + ret = funcs.dbg_vlog( cls, channel, NULL, 0, func, format, valist ); va_end(valist); return ret; } @@ -257,7 +258,7 @@ /* ReactOS compliant debug format wrapper for funcs.dbg_vlog */ int ros_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *channel, - const char *file, const char *func, const int line, const char *format, ... ) + const char *file, const int line, const char *func, const char *format, ... ) { int ret; va_list valist; @@ -265,7 +266,7 @@ if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1; va_start(valist, format); - ret = funcs.dbg_vlog( cls, channel, file, func, line, format, valist ); + ret = funcs.dbg_vlog( cls, channel, file, line, func, format, valist ); va_end(valist); return ret; } @@ -414,10 +415,12 @@ /* default implementation of wine_dbg_vlog */ static int default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_channel *channel, - const char *file, const char *func, const int line, const char *format, va_list args ) + const char *file, const int line, const char *func, const char *format, va_list args ) { int ret = 0; + if (TRACE_ON(pid)) + ret += wine_dbg_printf("%04x:", HandleToULong(NtCurrentTeb()->ClientId.UniqueProcess)); if (TRACE_ON(tid)) ret += wine_dbg_printf("%04x:", HandleToULong(NtCurrentTeb()->ClientId.UniqueThread)); @@ -424,11 +427,11 @@ if (cls < sizeof(debug_classes)/sizeof(debug_classes[0])) ret += wine_dbg_printf( "%s:", debug_classes[cls] ); - if (file && line) - ret += wine_dbg_printf ( "(%s:%d) ", file, line ); - else - ret += wine_dbg_printf( "%s:%s: ", channel->name, func ); + if (file && line) + ret += wine_dbg_printf ( "(%s:%d):", file, line ); + ret += wine_dbg_printf( "%s:%s ", channel->name, func ); + if (format) ret += funcs.dbg_vprintf( format, args ); return ret;