Alter linux debug stacktraces handling to support more environments
- Use -gdwarf-4 to support both LLVM and GCC when calling addr2line - Subtract position-independant execuable relocation when passing the address to addr2line
This commit is contained in:
@ -540,6 +540,9 @@ if selected_platform in platform_list:
|
||||
env.Append(CCFLAGS=["/Od"])
|
||||
else:
|
||||
if env["debug_symbols"]:
|
||||
# Adding dwarf-4 explicitly makes stacktraces work with clang builds,
|
||||
# otherwise addr2line doesn't understand them
|
||||
env.Append(CCFLAGS=["-gdwarf-4"])
|
||||
if env.dev_build:
|
||||
env.Append(CCFLAGS=["-g3"])
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user