[Bf-blender-cvs] [96f305c63d5] master: Windows: Include symbol file in module information
Ray Molenkamp
noreply at git.blender.org
Fri May 8 18:02:02 CEST 2020
Commit: 96f305c63d5b6002a10bcbffcf0407c43356f32d
Author: Ray Molenkamp
Date: Fri May 8 10:01:56 2020 -0600
Branches: master
https://developer.blender.org/rB96f305c63d5b6002a10bcbffcf0407c43356f32d
Windows: Include symbol file in module information
When writing out the module information in a crashdump
we did not include what symbol file was loaded and if
that symbol file actually matches our executable.
Given the backtraces may contain invalid information
if the symbols are unmatched this is relevant to know.
This diff adds the symbol file and an indication if
unmatched symbols are used.
===================================================================
M source/blender/blenlib/intern/system_win32.c
===================================================================
diff --git a/source/blender/blenlib/intern/system_win32.c b/source/blender/blenlib/intern/system_win32.c
index 5a633755c79..203c9673a9e 100644
--- a/source/blender/blenlib/intern/system_win32.c
+++ b/source/blender/blenlib/intern/system_win32.c
@@ -253,7 +253,21 @@ static void bli_windows_system_backtrace_modules(FILE *fp)
if (me32.th32ProcessID == GetCurrentProcessId()) {
char version[MAX_PATH];
bli_windows_get_module_version(me32.szExePath, version, sizeof(version));
- fprintf(fp, "0x%p %-20s %s\n", me32.modBaseAddr, version, me32.szModule);
+
+ IMAGEHLP_MODULE64 m64;
+ m64.SizeOfStruct = sizeof(m64);
+ if (SymGetModuleInfo64(GetCurrentProcess(), (DWORD64)me32.modBaseAddr, &m64)) {
+ fprintf(fp,
+ "0x%p %-20s %s %s %s\n",
+ me32.modBaseAddr,
+ version,
+ me32.szModule,
+ m64.LoadedPdbName,
+ m64.PdbUnmatched ? "[unmatched]" : "");
+ }
+ else {
+ fprintf(fp, "0x%p %-20s %s\n", me32.modBaseAddr, version, me32.szModule);
+ }
}
} while (Module32Next(hModuleSnap, &me32));
}
More information about the Bf-blender-cvs
mailing list