• Eric Pouech's avatar
    dbghelp: Handle the case where loader isn't what WINELOADER reports. · a4b206b3
    Eric Pouech authored
    use case, in a WoW setup:
    	wine programs/winedbg/winedbg.exe.so notepad.exe
    where both winedbg and notepad are 64bit exec:s
    
    in this case, dbghelp (loaded from winedbg) reads '<...>/wine' from WINELOADER
    windows env block inside notepad
    (but the unix env block is correctly set to wine64 by the tweak in
    ntdll/unix/loader.c)
    
    as a consequence dbghelp doesn't get the ELF information (it tries to read 32bit
    ELF entities, and fails); hence misses all the loaded ELF libraries
    winedbg's command 'info share' only reports the PE modules
    
    note: the 'dual' case
      wine64 programs/winedbg/winedbg.exe.so c:\\windows\\syswow64\\notepad.exe
      where winedbg is a 64bit exec and notepad a 32bit
      shows the same failures
    
    workaround this in dbghelp by tweaking the value of WINELOADER whether
    the debuggee is 32 or 64bit
    Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    a4b206b3
macho_module.c 66.7 KB