[CrashHandler] Always print frame PCs and main module load address for retrace.
This commit is contained in:
@@ -104,6 +104,9 @@ static void handle_crash(int sig) {
|
||||
// Non glibc systems apparently don't give PIE relocation info.
|
||||
uintptr_t relocation = 0;
|
||||
#endif //__GLIBC__
|
||||
|
||||
print_error(vformat("Load address: %x\n", (uint64_t)relocation));
|
||||
|
||||
if (strings) {
|
||||
int ret;
|
||||
|
||||
@@ -170,7 +173,7 @@ static void handle_crash(int sig) {
|
||||
}
|
||||
|
||||
// Simplify printed file paths to remove redundant `/./` sections (e.g. `/opt/godot/./core` -> `/opt/godot/core`).
|
||||
print_error(vformat("[%d] %s (%s)", (int64_t)i, fname, err == OK ? addr2line_results[i].replace("/./", "/") : ""));
|
||||
print_error(vformat("[%d] %x - %s (%s)", (int64_t)i, (uint64_t)bt_buffer[i], fname, err == OK ? addr2line_results[i].replace("/./", "/") : ""));
|
||||
}
|
||||
|
||||
free(strings);
|
||||
|
||||
Reference in New Issue
Block a user