aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/no-execinfo.patch
blob: 0c345e2effeaa679fc74f8860ce1758002a4d260 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
--- base/debug/stack_trace_posix.cc.orig	2016-05-08 07:59:51.749087517 +0200
+++ base/debug/stack_trace_posix.cc	2016-05-08 08:01:24.988950619 +0200
@@ -24,7 +24,7 @@
 #if defined(__GLIBCXX__)
 #include <cxxabi.h>
 #endif
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
 #include <execinfo.h>
 #endif
 
@@ -75,7 +75,7 @@ void DemangleSymbols(std::string* text)
   // Note: code in this function is NOT async-signal safe (std::string uses
   // malloc internally).
 
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
 
   std::string::size_type search_from = 0;
   while (search_from < text->size()) {
@@ -112,7 +112,7 @@ void DemangleSymbols(std::string* text)
     }
   }
 
-#endif  // defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#endif  // defined(__GLIBCXX__) && defined(__GLIBC__)
 }
 #endif  // !defined(USE_SYMBOLIZE)
 
@@ -124,7 +124,7 @@ class BacktraceOutputHandler {
   virtual ~BacktraceOutputHandler() {}
 };
 
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
 void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
   // This should be more than enough to store a 64-bit number in hex:
   // 16 hex digits + 1 for null-terminator.
@@ -201,7 +201,7 @@ void ProcessBacktrace(void *const *trace
   }
 #endif  // defined(USE_SYMBOLIZE)
 }
-#endif  // !defined(__UCLIBC__)
+#endif  // defined(__GLIBC__)
 
 void PrintToStderr(const char* output) {
   // NOTE: This code MUST be async-signal safe (it's used by in-process
@@ -716,7 +716,7 @@ StackTrace::StackTrace() {
   // NOTE: This code MUST be async-signal safe (it's used by in-process
   // stack dumping signal handler). NO malloc or stdio is allowed here.
 
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
   // Though the backtrace API man page does not list any possible negative
   // return values, we take no chance.
   count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
@@ -729,13 +729,13 @@ void StackTrace::Print() const {
   // NOTE: This code MUST be async-signal safe (it's used by in-process
   // stack dumping signal handler). NO malloc or stdio is allowed here.
 
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
   PrintBacktraceOutputHandler handler;
   ProcessBacktrace(trace_, count_, &handler);
 #endif
 }
 
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
 void StackTrace::OutputToStream(std::ostream* os) const {
   StreamBacktraceOutputHandler handler(os);
   ProcessBacktrace(trace_, count_, &handler);
--- third_party/WebKit/Source/wtf/Assertions.cpp.orig	2016-12-02 00:02:32.000000000 +0100
+++ third_party/WebKit/Source/wtf/Assertions.cpp	2016-12-06 10:58:11.183147846 +0100
@@ -60,7 +60,7 @@
 #include <windows.h>
 #endif
 
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
 #include <cxxabi.h>
 #include <dlfcn.h>
 #include <execinfo.h>
@@ -164,7 +164,7 @@
 }
 
 void WTFGetBacktrace(void** stack, int* size) {
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
   *size = backtrace(stack, *size);
 #elif OS(WIN)
   // The CaptureStackBackTrace function is available in XP, but it is not
@@ -215,7 +215,7 @@
 };
 
 FrameToNameScope::FrameToNameScope(void* addr) : m_name(0), m_cxaDemangled(0) {
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
   Dl_info info;
   if (!dladdr(addr, &info) || !info.dli_sname)
     return;
--- third_party/webrtc/base/checks.cc.orig	2016-05-08 08:03:04.398461275 +0200
+++ third_party/webrtc/base/checks.cc	2016-05-08 08:03:24.254431362 +0200
@@ -16,7 +16,7 @@
 #include <cstdio>
 #include <cstdlib>
 
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
 #include <cxxabi.h>
 #include <execinfo.h>
 #endif
@@ -55,7 +55,7 @@ void PrintError(const char* format, ...)
 // to get usable symbols on Linux. This is copied from V8. Chromium has a more
 // advanced stace trace system; also more difficult to copy.
 void DumpBacktrace() {
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
   void* trace[100];
   int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
   char** symbols = backtrace_symbols(trace, size);
--- ./base/debug/stack_trace.cc.orig
+++ ./base/debug/stack_trace.cc
@@ -33,7 +33,7 @@
 
 std::string StackTrace::ToString() const {
   std::stringstream stream;
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
   OutputToStream(&stream);
 #endif
   return stream.str();