impr: Generate more useful stack traces on Linux

This commit is contained in:
WerWolv
2024-03-15 17:53:12 +01:00
parent f4ec69021d
commit a1437658af
3 changed files with 93 additions and 89 deletions

View File

@@ -65,7 +65,7 @@ namespace hex::crash {
static void printStackTrace() {
for (const auto &stackFrame : stacktrace::getStackTrace()) {
if (stackFrame.line == 0)
log::fatal(" {}", stackFrame.function);
log::fatal(" ({}) | {}", stackFrame.file, stackFrame.function);
else
log::fatal(" ({}:{}) | {}", stackFrame.file, stackFrame.line, stackFrame.function);
}