[MSVC] Use symbols from .pdb only, to avoid incorrect names in the backtrace when symbols are missing.

(cherry picked from commit d99c32668a)
This commit is contained in:
bruvzg 2022-11-29 11:12:54 +02:00 committed by Haoyu Qiu
parent 2d1b61e46e
commit d3d72268cd

View file

@ -156,7 +156,7 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
return EXCEPTION_CONTINUE_SEARCH;
}
SymSetOptions(SymGetOptions() | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME);
SymSetOptions(SymGetOptions() | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_EXACT_SYMBOLS);
EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded);
module_handles.resize(cbNeeded / sizeof(HMODULE));
EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded);