loader fix for dbghelp

Eric Pouech pouech-eric at wanadoo.fr
Thu May 20 04:36:06 CDT 2004

the current loader code was generating the DLL load event (for a builtin 
DLL) while the DLL is registered, that is in the middle of the dlopen 
call (while processing the .init section of the DLL).

This is causing some bad side effects with the dbghelp:
- dbghelp maintains a list of loaded ELF libraries
- this list is reparsed on specific occasion (like when a new module is 
- however, walking the list of loaded ELF libs (in the debuggee) is 
prohibited when the list is not consistent (basically, while loading / 
unloading a module)
- the bad side effect is that, when a debugger (say winedbg) asks 
winedbg to load a new PE module while processing the DLL load event, it 
could be that (depending on the timing of the debuggee and the debugger) 
the ELF loading isn't finished yet. Since dbghelp need to make the link 
between a PE module and an ELF module to get debug information for a 
builtin module, debug information isn't available in the debugger for a 
just loaded DLL. This breaks, for example, delayed breakpoints.

I fixed that by sending (in ntdll loader code) the DLL load event a bit 
later in the loading processus, when we're out of the dlopen call.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lbde.diff
Type: text/x-patch
Size: 2070 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20040520/47e9df3b/lbde.bin

More information about the wine-patches mailing list