From a77fd7df9d0a1907ad05acb4df08be307c22aa2f Mon Sep 17 00:00:00 2001 From: Gerard Patel Date: Wed, 10 Jan 2001 22:54:02 +0000 Subject: [PATCH] Added a specific debug channel for dll loading (builtin/native). --- dlls/ntdll/ntdll.spec | 2 +- loader/module.c | 8 +++++++- loader/ne/module.c | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index ee0afade9c2..7a6f8ea1b67 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -3,7 +3,7 @@ type win32 debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem file fixup global heap int int10 int16 int17 int19 int21 int31 - io local module ntdll process profile reg relay resource segment + io local loaddll module ntdll process profile reg relay resource segment seh selector server snoop string system tape task thread thunk timer toolhelp tweak ver virtual vxd win32) diff --git a/loader/module.c b/loader/module.c index ebf55cb409c..ce32ff647fb 100644 --- a/loader/module.c +++ b/loader/module.c @@ -23,6 +23,7 @@ DEFAULT_DEBUG_CHANNEL(module); DECLARE_DEBUG_CHANNEL(win32); +DECLARE_DEBUG_CHANNEL(loaddll); WINE_MODREF *MODULE_modref_list = NULL; @@ -1306,6 +1307,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags ) int i; module_loadorder_t *plo; LPSTR filename, p; + const char *filetype = ""; if ( !libname ) return NULL; @@ -1396,16 +1398,19 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags ) case MODULE_LOADORDER_DLL: TRACE("Trying native dll '%s'\n", filename); pwm = PE_LoadLibraryExA(filename, flags); + filetype = "native"; break; case MODULE_LOADORDER_SO: TRACE("Trying so-library '%s'\n", filename); pwm = ELF_LoadLibraryExA(filename, flags); + filetype = "so"; break; case MODULE_LOADORDER_BI: TRACE("Trying built-in '%s'\n", filename); pwm = BUILTIN32_LoadLibraryExA(filename, flags); + filetype = "builtin"; break; default: @@ -1421,7 +1426,8 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags ) { /* Initialize DLL just loaded */ TRACE("Loaded module '%s' at 0x%08x, \n", filename, pwm->module); - + if (!TRACE_ON(module)) + TRACE_(loaddll)("Loaded module '%s' : %s\n", filename, filetype); /* Set the refCount here so that an attach failure will */ /* decrement the dependencies through the MODULE_FreeLibrary call. */ pwm->refCount++; diff --git a/loader/ne/module.c b/loader/ne/module.c index 6f4faa3c863..eda0be74a83 100644 --- a/loader/ne/module.c +++ b/loader/ne/module.c @@ -28,6 +28,7 @@ #include "server.h" DEFAULT_DEBUG_CHANNEL(module); +DECLARE_DEBUG_CHANNEL(loaddll); /* * Segment table entry @@ -896,6 +897,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ HINSTANCE16 hinst; int i; module_loadorder_t *plo; + const char *filetype = ""; plo = MODULE_GetLoadOrder(libname, FALSE); @@ -906,11 +908,13 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ case MODULE_LOADORDER_DLL: TRACE("Trying native dll '%s'\n", libname); hinst = NE_LoadModule(libname, lib_only); + filetype = "native"; break; case MODULE_LOADORDER_BI: TRACE("Trying built-in '%s'\n", libname); hinst = BUILTIN_LoadModule(libname); + filetype = "builtin"; break; default: @@ -947,6 +951,8 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ } TRACE("Loaded module '%s' at 0x%04x.\n", libname, hinst); + if (!TRACE_ON(module)) + TRACE_(loaddll)("Loaded module '%s' : %s\n", libname, filetype); /* * Call initialization routines for all loaded DLLs. Note that