• Eric Pouech's avatar
    dbghelp: Pretend mach-o is present in case of failure. · 60108ea1
    Eric Pouech authored
    On MacOs, starting with Big Sur 11.0.1, the system dynamic
    libraries are no longer directly accessible on disk.
    They are still available through dlopen and friends. For getting
    access to the images (and their debug symbol), Apple provides,
    in the developper kit, the tools to extract the files. Note that
    this is handled as a database of all system libraries, where ASLR
    is in place such that segments of a given library are no longer
    contiguous in memory (dbghelp doesn't currently handle this).
    
    Apart from not having image information nor debug information,
    another side effect is that dbghelp tries every time it refreshes the
    mach-o module list to reload any library for which it didn't have
    an image file. This can be lengthy (esp when a typical process has
    more than 300 modules loaded).
    
    This patch forces the creation of the dbghelp module even if the
    image file isn't found.
    
    This patch cuts startup time of 'winedbg notepad' from 9.9 to 7.4s.
    YMMV.
    Signed-off-by: 's avatarEric Pouech <epouech@codeweavers.com>
    60108ea1