I don't like the approach of solving a local issue by moving it at global scope. And increasing verbosity of logs for DLLs that are already very verbose will make things worse for these.
Furthermore: - if context is important, why don't you include the DLL name in the trace? - change to ntdll will break binary compatibility (eg some .so exec will no longer work)
IMO we'd be better off by: - increasing verbosity on a DLL and/or file approach - this can be done without changing ntdll interface, by just replacing function parameter by a locally generated string including function + the context needed - this could even go a step further as the printed context could be what the DLL/file is interested in (and could be different from filename+lineno...)
something like; ``` #define __WINE_DBG_LOG(...) \ - wine_dbg_log( __dbcl, __dbch, __func__, __VA_ARGS__); } } while(0) + wine_dbg_log( __dbcl, __dbch, __WINE_DBG_CONTEXT, __VA_ARGS__); } } while(0) + + #ifndef __WINE_DBG_CONTEXT + #define __WINE_DBG_CONTEXT __func__ + #endif ``` and then in .c file that requires it, #define __WINE_DBG_CONTEXT wine_dbg_sprintf("%s:%u:%u", __FILE__, __LINE__, __func__) before including wine/debug.h
(could be also defined at DLL level from Makefile)