2015-11-27 16:02:40 +00:00
|
|
|
--- ./base/debug/stack_trace_posix.cc.orig
|
|
|
|
+++ ./base/debug/stack_trace_posix.cc
|
|
|
|
@@ -22,7 +22,7 @@
|
|
|
|
#if defined(__GLIBCXX__)
|
|
|
|
#include <cxxabi.h>
|
|
|
|
#endif
|
|
|
|
-#if !defined(__UCLIBC__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
#include <execinfo.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
@@ -73,7 +73,7 @@
|
|
|
|
// Note: code in this function is NOT async-signal safe (std::string uses
|
|
|
|
// malloc internally).
|
|
|
|
|
|
|
|
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
|
|
|
|
std::string::size_type search_from = 0;
|
|
|
|
while (search_from < text->size()) {
|
|
|
|
@@ -169,7 +169,7 @@
|
|
|
|
|
|
|
|
handler->HandleOutput("\n");
|
|
|
|
}
|
|
|
|
-#elif !defined(__UCLIBC__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#elif defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
bool printed = false;
|
|
|
|
|
|
|
|
// Below part is async-signal unsafe (uses malloc), so execute it only
|
|
|
|
@@ -738,7 +738,7 @@
|
|
|
|
// 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__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
// 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_)));
|
|
|
|
@@ -751,13 +751,13 @@
|
|
|
|
// 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__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
PrintBacktraceOutputHandler handler;
|
|
|
|
ProcessBacktrace(trace_, count_, &handler);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
-#if !defined(__UCLIBC__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
void StackTrace::OutputToStream(std::ostream* os) const {
|
|
|
|
StreamBacktraceOutputHandler handler(os);
|
|
|
|
ProcessBacktrace(trace_, count_, &handler);
|
|
|
|
--- ./third_party/WebKit/Source/wtf/Assertions.cpp.orig
|
|
|
|
+++ ./third_party/WebKit/Source/wtf/Assertions.cpp
|
|
|
|
@@ -61,7 +61,7 @@
|
|
|
|
#define HAVE_ISDEBUGGERPRESENT 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
|
2015-11-27 16:02:40 +00:00
|
|
|
#include <cxxabi.h>
|
|
|
|
#include <dlfcn.h>
|
|
|
|
#include <execinfo.h>
|
|
|
|
@@ -222,7 +222,7 @@
|
|
|
|
|
|
|
|
void WTFGetBacktrace(void** stack, int* size)
|
|
|
|
{
|
|
|
|
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
|
2015-11-27 16:02:40 +00:00
|
|
|
*size = backtrace(stack, *size);
|
|
|
|
#elif OS(WIN)
|
|
|
|
// The CaptureStackBackTrace function is available in XP, but it is not defined
|
|
|
|
@@ -260,7 +260,7 @@
|
|
|
|
: m_name(0)
|
|
|
|
, m_cxaDemangled(0)
|
|
|
|
{
|
|
|
|
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
|
2015-11-27 16:02:40 +00:00
|
|
|
Dl_info info;
|
|
|
|
if (!dladdr(addr, &info) || !info.dli_sname)
|
|
|
|
return;
|
|
|
|
--- ./third_party/webrtc/base/checks.cc.orig
|
|
|
|
+++ ./third_party/webrtc/base/checks.cc
|
|
|
|
@@ -16,7 +16,7 @@
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
|
|
|
|
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
#include <cxxabi.h>
|
|
|
|
#include <execinfo.h>
|
|
|
|
#endif
|
|
|
|
@@ -55,7 +55,7 @@
|
|
|
|
// 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__)
|
2015-12-05 10:03:02 +00:00
|
|
|
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
2015-11-27 16:02:40 +00:00
|
|
|
void* trace[100];
|
|
|
|
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
|
|
|
|
char** symbols = backtrace_symbols(trace, size);
|