Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: trunk/src/base/debug/stack_trace_posix.cc

Issue 224753005: Revert 262344 "don't use glibc-specific execinfo.h on uclibc builds" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/base/debug/stack_trace.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/debug/stack_trace_posix.cc
===================================================================
--- trunk/src/base/debug/stack_trace_posix.cc (revision 262400)
+++ trunk/src/base/debug/stack_trace_posix.cc (working copy)
@@ -5,6 +5,7 @@
#include "base/debug/stack_trace.h"
#include <errno.h>
+#include <execinfo.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
@@ -19,9 +20,8 @@
#include <string>
#include <vector>
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__)
#include <cxxabi.h>
-#include <execinfo.h>
#endif
#if defined(OS_MACOSX)
@@ -71,7 +71,7 @@
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
@@ -108,7 +108,7 @@
}
}
-#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#endif // defined(__GLIBCXX__)
}
#endif // !defined(USE_SYMBOLIZE)
@@ -167,7 +167,7 @@
handler->HandleOutput("\n");
}
-#elif defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#else
bool printed = false;
// Below part is async-signal unsafe (uses malloc), so execute it only
@@ -279,9 +279,7 @@
}
PrintToStderr("\n");
-#if !defined(__UCLIBC__)
debug::StackTrace().Print();
-#endif
#if defined(OS_LINUX)
#if ARCH_CPU_X86_FAMILY
@@ -740,14 +738,11 @@
// 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(__GLIBCXX__) && !defined(__UCLIBC__)
// 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_)));
-#endif
}
-#if !defined(__UCLIBC__)
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.
@@ -760,7 +755,6 @@
StreamBacktraceOutputHandler handler(os);
ProcessBacktrace(trace_, count_, &handler);
}
-#endif
namespace internal {
« no previous file with comments | « trunk/src/base/debug/stack_trace.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698