forked from OSchip/llvm-project
[libunwind] [Windows] Add a log message if EnumProcessModules fails
Differential Revision: https://reviews.llvm.org/D69504
This commit is contained in:
parent
31784248ee
commit
08c7ff99e1
|
@ -433,8 +433,12 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr,
|
|||
HANDLE process = GetCurrentProcess();
|
||||
DWORD needed;
|
||||
|
||||
if (!EnumProcessModules(process, mods, sizeof(mods), &needed))
|
||||
if (!EnumProcessModules(process, mods, sizeof(mods), &needed)) {
|
||||
DWORD err = GetLastError();
|
||||
_LIBUNWIND_TRACE_UNWINDING("findUnwindSections: EnumProcessModules failed, "
|
||||
"returned error %d", (int)err);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < (needed / sizeof(HMODULE)); i++) {
|
||||
PIMAGE_DOS_HEADER pidh = (PIMAGE_DOS_HEADER)mods[i];
|
||||
|
|
Loading…
Reference in New Issue