On Tue Mar 28 12:04:59 2023 +0000, Alexandre Julliard wrote:
@julliard: the paths for wow64 modules returned from kernel32 don't
match windows behavior: wine returns 32bit system modules from c:\windows\syswow64 whereas windows returns them from c:\windows\system32 (except a couple of exceptions: 32bit ntdll and exe main module). Implementation in dbghelp includes the correction of this. (I opted not to change ntdll at once: testing on windows show that kernel32.EnumProcesModulesEx returns exactly the ldr_data list, and I didn't feel like adding this burden to this patch ;-). It would need to be fixed, or dbghelp can return the wrong info for now. We definitely don't want to add complexity to dbghelp to work around ntdll bugs.
For clarification: do you have use cases where dbghelp could return the wrong info? the only case I can see is if a 32bit module lies in system32 dir, or a 64bit lies in syswow64 dir, but I'm not aware of any. For the record: most of the complexity in dbghelp (ie path rewrite) will be needed anyway (ie dbghelp exposes wow64 modules from syswow directory, hence requiring the rewrite machinery). fixing ntdll will just remove some rewrite cases, but not all of them
(I take your stance as "don't work around bugs, fix them!") I'll give a try to fixing ntdll then.