[Windows] Fix loading debug symbol files over 2GB.

This commit is contained in:
Pāvels Nadtočajevs 2024-12-11 17:28:29 +02:00
parent 44dfa7e710
commit a8c8eca74a
4 changed files with 68 additions and 10 deletions

View file

@ -167,7 +167,10 @@ extern void CrashHandlerException(int signal) {
if (FileAccess::exists(_execpath + ".debugsymbols")) {
_execpath = _execpath + ".debugsymbols";
}
data.state = backtrace_create_state(_execpath.utf8().get_data(), 0, &error_callback, reinterpret_cast<void *>(&data));
_execpath = _execpath.replace("/", "\\");
CharString cs = _execpath.utf8(); // Note: should remain in scope during backtrace_simple call.
data.state = backtrace_create_state(cs.get_data(), 0, &error_callback, reinterpret_cast<void *>(&data));
if (data.state != nullptr) {
data.index = 1;
backtrace_simple(data.state, 1, &trace_callback, &error_callback, reinterpret_cast<void *>(&data));