summaryrefslogtreecommitdiffstats
path: root/games/gzdoom/patches/130-no-execinfo.patch
blob: 1e7ad64916d9eca4d1672acf1a9831eacc151b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -358,7 +358,7 @@ if( HAVE_VM_JIT AND UNIX )
 		if( HAVE_LIBEXECINFO )
 			set( ALL_C_FLAGS "${ALL_C_FLAGS} -lexecinfo" )
 		else( HAVE_LIBEXECINFO )
-			set( HAVE_VM_JIT NO )
+			#	set( HAVE_VM_JIT NO )
 		endif( HAVE_LIBEXECINFO )
 		set( CMAKE_REQUIRED_FLAGS )
 	endif( NOT HAVE_BACKTRACE )
--- a/src/common/scripting/jit/jit_runtime.cpp
+++ b/src/common/scripting/jit/jit_runtime.cpp
@@ -7,7 +7,6 @@
 #include <DbgHelp.h>
 #include <psapi.h>
 #else
-#include <execinfo.h>
 #include <cxxabi.h>
 #include <cstring>
 #include <cstdlib>
@@ -806,7 +805,7 @@ static int CaptureStackTrace(int max_fra
 	// JIT isn't supported here, so just do nothing.
 	return 0;//return RtlCaptureStackBackTrace(0, min(max_frames, 32), out_frames, nullptr);
 #else
-	return backtrace(out_frames, max_frames);
+	return 0;
 #endif
 }
 
@@ -868,7 +867,9 @@ class NativeSymbolResolver
 public:
 	FString GetName(void *frame)
 	{
-		FString s;
+		FString s = "no backtrace";
+		return s;
+		#if 0
 		char **strings;
 		void *frames[1] = { frame };
 		strings = backtrace_symbols(frames, 1);
@@ -925,6 +926,7 @@ public:
 
 		free(strings);
 		return s;
+		#endif
 	}
 };
 #endif