diff options
Diffstat (limited to 'testing/terra/no-execinfo.patch')
-rw-r--r-- | testing/terra/no-execinfo.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/terra/no-execinfo.patch b/testing/terra/no-execinfo.patch new file mode 100644 index 00000000000..7870f5061cc --- /dev/null +++ b/testing/terra/no-execinfo.patch @@ -0,0 +1,36 @@ +diff --git a/src/tdebug.cpp b/src/tdebug.cpp +index 0d93be0..cda06a6 100644 +--- a/src/tdebug.cpp ++++ b/src/tdebug.cpp +@@ -6,7 +6,6 @@ + #if !defined(__arm__) && !defined(__aarch64__) && !defined(__PPC__) + + #ifndef _WIN32 +-#include <execinfo.h> + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE + #endif +@@ -188,7 +187,6 @@ static void printstacktrace(void *uap, void *data) { + int N = terra_backtrace(frames, maxN, rip, rbp); + + #ifndef _WIN32 +- char **symbols = backtrace_symbols(frames, N); + #else + HANDLE process = GetCurrentProcess(); + SymInitialize(process, NULL, true); +@@ -202,7 +200,6 @@ static void printstacktrace(void *uap, void *data) { + uintptr_t ip = (uintptr_t)frames[i]; + if (!printfunctioninfo(C, ip, isNextInst, i)) { + #ifndef _WIN32 +- printf("%s\n", symbols[i]); + #else + char buf[256 + sizeof(SYMBOL_INFO)]; + SYMBOL_INFO *symbol = (SYMBOL_INFO *)buf; +@@ -217,7 +214,6 @@ static void printstacktrace(void *uap, void *data) { + } + } + #ifndef _WIN32 +- free(symbols); + #endif + } + |