dbghelp: Pretend mach-o is present in case of failure.
commit60108ea1bc284c08fd1d6f5ac9f480c7071c8937
authorEric Pouech <eric.pouech@gmail.com>
Thu, 16 Nov 2023 17:38:02 +0000 (16 18:38 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 16 Nov 2023 19:56:07 +0000 (16 20:56 +0100)
treee342e6c8e73b92337f6ecd1e0269d9865003cea7
parent01c98c5eafd68d77f388aaba2c0a6d44a01ab41c
dbghelp: Pretend mach-o is present in case of failure.

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: Eric Pouech <epouech@codeweavers.com>
dlls/dbghelp/dbghelp_private.h
dlls/dbghelp/macho_module.c
dlls/dbghelp/module.c
include/dbghelp.h
programs/winedbg/info.c