Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-05-08 19:01:56 +0300
committerRay Molenkamp <github@lazydodo.com>2020-05-08 19:01:56 +0300
commit96f305c63d5b6002a10bcbffcf0407c43356f32d (patch)
treee0e06e2c6ff50a298ae62af71393886de002f91d /source/blender/blenlib
parenta1c2441390e6b56da53dd914a6d6a81de84dc46c (diff)
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.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/system_win32.c16
1 files changed, 15 insertions, 1 deletions
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));
}