mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 18:43:29 -05:00
[Windows] Fix MinGW debug symbols.
This commit is contained in:
parent
aa8d9b83f6
commit
404383e161
2 changed files with 9 additions and 3 deletions
|
@ -731,9 +731,12 @@ if env.msvc:
|
||||||
env.Append(CCFLAGS=["/Od"])
|
env.Append(CCFLAGS=["/Od"])
|
||||||
else:
|
else:
|
||||||
if env["debug_symbols"]:
|
if env["debug_symbols"]:
|
||||||
# Adding dwarf-4 explicitly makes stacktraces work with clang builds,
|
if env["platform"] == "windows":
|
||||||
# otherwise addr2line doesn't understand them
|
env.Append(CCFLAGS=["-gdwarf-5"])
|
||||||
env.Append(CCFLAGS=["-gdwarf-4"])
|
else:
|
||||||
|
# Adding dwarf-4 explicitly makes stacktraces work with clang builds,
|
||||||
|
# otherwise addr2line doesn't understand them
|
||||||
|
env.Append(CCFLAGS=["-gdwarf-4"])
|
||||||
if methods.using_emcc(env):
|
if methods.using_emcc(env):
|
||||||
# Emscripten only produces dwarf symbols when using "-g3".
|
# Emscripten only produces dwarf symbols when using "-g3".
|
||||||
env.Append(CCFLAGS=["-g3"])
|
env.Append(CCFLAGS=["-g3"])
|
||||||
|
|
|
@ -164,6 +164,9 @@ extern void CrashHandlerException(int signal) {
|
||||||
int64_t image_file_base = get_image_base(_execpath);
|
int64_t image_file_base = get_image_base(_execpath);
|
||||||
data.offset = image_mem_base - image_file_base;
|
data.offset = image_mem_base - image_file_base;
|
||||||
|
|
||||||
|
if (FileAccess::exists(_execpath + ".debugsymbols")) {
|
||||||
|
_execpath = _execpath + ".debugsymbols";
|
||||||
|
}
|
||||||
data.state = backtrace_create_state(_execpath.utf8().get_data(), 0, &error_callback, reinterpret_cast<void *>(&data));
|
data.state = backtrace_create_state(_execpath.utf8().get_data(), 0, &error_callback, reinterpret_cast<void *>(&data));
|
||||||
if (data.state != nullptr) {
|
if (data.state != nullptr) {
|
||||||
data.index = 1;
|
data.index = 1;
|
||||||
|
|
Loading…
Reference in a new issue