The aim of this serie is to (re)implement dbghelp.EnumerateLoadedModules in order to return correct 32bit & 64bit modules information for a 32bit debuggee from a 64bit debugger. - In this case, Wine ntdll (incorrectly) stores the paths in LdrData (for system modules) within the syswow64 directory while native stores them within the system32 directory (except for 32bit ntdll which Wine correctly stores within system32). - So now dbghelp implements the system32 => syswow64 path rewrite (for the relevant cases), which is currently used only for ntdll. - This allows: - to be transparent in dbghelp if ntdll is fixed to store the same path as native - the paths returned by dbghelp are consistent with native (in the 64bit debugger / 32bit debuggee case mentionned above)
It must be noted that the remaining todo:s in tests are only for the case of a 32bit debugger / 32bit debuggee in (old|new) wow setup, where the returned paths are the (untouched from ntdll) paths, hence in syswow64 when native reports them from system32. - this patch doesn't modify the returned path, and we haven't noticed any issue so far - with redirection in place, access to the image files should be tranparent - so we can keep it as is (not fixing ntdll).