aports/testing/theforceengine/backtrace.patch
Marian Buschsieweke 435fd39354 testing/theforceengine: new aport
https://theforceengine.github.io/
"Modern rebuild of the Jedi Engine (needs purchased copy of game data files to run)
2023-09-12 10:18:50 +00:00

32 lines
1.1 KiB
Diff

Drop backtracing feature, as it is implemented using using glibc specific
features.
--- a/TheForceEngine/TFE_System/CrashHandler/crashHandlerLinux.cpp
+++ b/TheForceEngine/TFE_System/CrashHandler/crashHandlerLinux.cpp
@@ -1,6 +1,5 @@
#include <cstring>
#include <errno.h>
-#include <execinfo.h>
#include <fcntl.h>
#include <inttypes.h>
#include <unistd.h>
@@ -68,18 +67,7 @@
TFE_System::logWrite(LOG_ERROR, "CrashHandler", "faulting address %p", siginfo->si_addr);
}
- // backtrace() can also segfault; purposefully ignore SEGV before calling it.
- signal(SIGSEGV, SIG_IGN);
- entries = backtrace(buf, 512);
- if (entries) {
- ents = backtrace_symbols(buf, entries);
- TFE_System::logWrite(LOG_ERROR, "CrashHandler", "Backtrace %d:", entries);
- for (i = 0; i < entries; i++) {
- TFE_System::logWrite(LOG_ERROR, "CrashHandler", "%03d %s", i, ents[i]);
- }
- } else {
- TFE_System::logWrite(LOG_ERROR, "CrashHandler", "no backtrace possible");
- }
+ TFE_System::logWrite(LOG_ERROR, "CrashHandler", "no backtrace possible");
// for certain signals, the default handler will create
// a coredump if enabled by administrator.