+loaddll patch
Andreas Mohr
amohr at codeweavers.com
Thu Feb 1 16:19:04 CST 2001
Hi all,
change the output to something like:
trace:loaddll:MODULE_LoadLibraryExA Loaded module -builtin-: 'winspool.drv' in C:\WINDOWS\SYSTEM\
trace:loaddll:MODULE_LoadLibraryExA Loaded module -builtin-: 'comdlg32.dll' in C:\WINDOWS\SYSTEM\
trace:loaddll:MODULE_LoadLibraryExA Loaded module *NATIVE*: 'Csh.dll' in C:\Program Files\Quote.com\QCharts4.0\
trace:loaddll:MODULE_LoadLibraryExA Loaded module *NATIVE*: 'fca.dll' in C:\Program Files\Quote.com\QCharts4.0\
trace:loaddll:MODULE_LoadLibraryExA Loaded module *NATIVE*: 'fcoption.dll' in C:\Program Files\Quote.com\QCharts4.0\
trace:loaddll:MODULE_LoadLibraryExA Loaded module -builtin-: 'OLEAUT32.dll' in C:\WINDOWS\SYSTEM\
trace:loaddll:MODULE_LoadModule16 Loaded module -builtin-: 'krnl386.exe'
trace:loaddll:MODULE_LoadModule16 Loaded module -builtin-: 'system'
trace:loaddll:MODULE_LoadModule16 Loaded module -builtin-: 'wprocs'
trace:loaddll:MODULE_LoadModule16 Loaded module -builtin-: 'GDI.EXE'
Especially the *NATIVE* allows for a nice quick glance to see what's going
on...
And of course I separated path and file to have a better non-confusing
alignment.
We're talking newbie mode here...
Andreas Mohr
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at wine.codeweavers.com:/home/cvs/wine
Index: loader/module.c
===================================================================
RCS file: /home/cvs/wine/wine/loader/module.c,v
retrieving revision 1.122
diff -u -r1.122 module.c
--- loader/module.c 2001/01/10 22:54:03 1.122
+++ loader/module.c 2001/02/02 03:53:44
@@ -1398,19 +1398,19 @@
case MODULE_LOADORDER_DLL:
TRACE("Trying native dll '%s'\n", filename);
pwm = PE_LoadLibraryExA(filename, flags);
- filetype = "native";
+ filetype = " *NATIVE*";
break;
case MODULE_LOADORDER_SO:
TRACE("Trying so-library '%s'\n", filename);
pwm = ELF_LoadLibraryExA(filename, flags);
- filetype = "so";
+ filetype = " \%so\%";
break;
case MODULE_LOADORDER_BI:
TRACE("Trying built-in '%s'\n", filename);
pwm = BUILTIN32_LoadLibraryExA(filename, flags);
- filetype = "builtin";
+ filetype = "-builtin-";
break;
default:
@@ -1426,8 +1426,19 @@
{
/* 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);
+ if (TRACE_ON(loaddll))
+ {
+ LPSTR p = strrchr(filename, '\\');
+ int len = 0;
+ if (p)
+ {
+ p++;
+ len = (int)p - (int)filename;
+ }
+ else
+ p = filename;
+ TRACE_(loaddll)("Loaded module %s: '%s' %s%.*s\n", filetype, p, len ? "in " : "", len, filename);
+ }
/* Set the refCount here so that an attach failure will */
/* decrement the dependencies through the MODULE_FreeLibrary call. */
pwm->refCount++;
Index: loader/ne/module.c
===================================================================
RCS file: /home/cvs/wine/wine/loader/ne/module.c,v
retrieving revision 1.99
diff -u -r1.99 module.c
--- loader/ne/module.c 2001/01/21 21:09:44 1.99
+++ loader/ne/module.c 2001/02/02 03:53:44
@@ -907,13 +907,13 @@
case MODULE_LOADORDER_DLL:
TRACE("Trying native dll '%s'\n", libname);
hinst = NE_LoadModule(libname, lib_only);
- filetype = "native";
+ filetype = " *NATIVE*";
break;
case MODULE_LOADORDER_BI:
TRACE("Trying built-in '%s'\n", libname);
hinst = BUILTIN_LoadModule(libname);
- filetype = "builtin";
+ filetype = "-builtin-";
break;
default:
@@ -950,8 +950,19 @@
}
TRACE("Loaded module '%s' at 0x%04x.\n", libname, hinst);
- if (!TRACE_ON(module))
- TRACE_(loaddll)("Loaded module '%s' : %s\n", libname, filetype);
+ if (TRACE_ON(loaddll))
+ {
+ LPCSTR p = strrchr(libname, '\\');
+ int len = 0;
+ if (p)
+ {
+ p++;
+ len = (int)p - (int)libname;
+ }
+ else
+ p = libname;
+ TRACE_(loaddll)(" Loaded module %s: '%s' %s%.*s\n", filetype, p, len ? "in " : "", len, libname);
+ }
/*
* Call initialization routines for all loaded DLLs. Note that
More information about the wine-patches
mailing list