This can generate very long time when saving the minidump, but
also when reloading it.
Unwind information is expected to be gotten from an image matching
the modules listed in the minidump for Normal mode.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55798
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
In case a minidump is written from current process, create
a dedicated thread to write the minidump (and hide that thread
from the minidump).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This mainly allows to release internal resources bound to image.
Also follow chained RUNTIME_FUNCTION entries (if any).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
Also correctly handling ImageName (the passed image name
in SymLoadModule) and LoadedImageName, which is only set when
debug info have been loaded (and is always an absolute path,
contrary to ImageName which can be relative).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
Module names appear in three spots in dbghelp:
A) SymGetModuleInfo() .ModuleName
B) module enumeration (as parameter in callback)
C) in symbol/type research in module!name form
Tests show that:
- A) and B) always use only the derivation of the image
name, whatever the passed module name in SymLoadModule().
- C) can use either the form derived from image name
{as A) and B)}, but also the passed module name in
SymLoadModule().
Note: B) is limited to 64 characters, while A) is limited to 32
characters (not tested here).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
Change from: dll.so > PE image > ELF/Mach-O images
into PE image > dll.so > ELF/Mach-O images
Main goal is in SymLoadModule*(), to not resynchronize the system
modules list when requesting loading of a PE image.
This can gain quite some time in some situations.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
dbghelp tests build PDB files, without hash table in TPI stream,
but also no types. Native is able to load these PDB files.
So, don't fail when loading a PDB without a TPI hash table and
without any types.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This will help separate debug info files lookup from their actual
loading once found and correctly matched.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
- SymLoadModules flags (SLMFLAG_VIRTUAL and SLMFLAG_NO_SYMBOLS),
- handling of load details (SymType, ImageName vs LoadedImageName,
various instances of module name).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
MSC no longer emits a fixed number of substreams (depending on version of
PDB file), but can emit less.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
On top of being closer to native behavior, this helps some
games where:
- they use dbghelp to gather information of where they generate exceptions,
- they generate exception in the game play,
- and refresh their list of loaded modules in dbghelp.
This can generate some delays (~2ms per module), which affects
game play (freeze, slugginess...).
Credit to Paul Gofman for triaging this.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
Basically, showing specific behavior when calling SymLoadModule()
with a non-null base address, and that address is already
the exact base address of a loaded module.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
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>