| 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 {
|
|
|
|
|