Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / base / debug / stack_trace_posix.cc
index 261ce95..2eac14e 100644 (file)
@@ -281,9 +281,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
   }
   PrintToStderr("\n");
 
-#if !defined(__UCLIBC__)
   debug::StackTrace().Print();
-#endif
 
 #if defined(OS_LINUX)
 #if ARCH_CPU_X86_FAMILY
@@ -345,7 +343,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
   const int kRegisterPadding = 16;
 #endif
 
-  for (size_t i = 0; i < ARRAYSIZE_UNSAFE(registers); i++) {
+  for (size_t i = 0; i < arraysize(registers); i++) {
     PrintToStderr(registers[i].label);
     internal::itoa_r(registers[i].value, buf, sizeof(buf),
                      16, kRegisterPadding);
@@ -404,7 +402,7 @@ class PrintBacktraceOutputHandler : public BacktraceOutputHandler {
  public:
   PrintBacktraceOutputHandler() {}
 
-  virtual void HandleOutput(const char* output) OVERRIDE {
+  void HandleOutput(const char* output) override {
     // 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.
     PrintToStderr(output);
@@ -419,9 +417,7 @@ class StreamBacktraceOutputHandler : public BacktraceOutputHandler {
   explicit StreamBacktraceOutputHandler(std::ostream* os) : os_(os) {
   }
 
-  virtual void HandleOutput(const char* output) OVERRIDE {
-    (*os_) << output;
-  }
+  void HandleOutput(const char* output) override { (*os_) << output; }
 
  private:
   std::ostream* os_;
@@ -751,15 +747,17 @@ StackTrace::StackTrace() {
 #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.
 
+#if !defined(__UCLIBC__)
   PrintBacktraceOutputHandler handler;
   ProcessBacktrace(trace_, count_, &handler);
+#endif
 }
 
+#if !defined(__UCLIBC__)
 void StackTrace::OutputToStream(std::ostream* os) const {
   StreamBacktraceOutputHandler handler(os);
   ProcessBacktrace(trace_, count_, &handler);