OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "src/base/debug/stack_trace.h" |
| 6 |
| 7 #include <iomanip> |
| 8 #include <ostream> |
| 9 |
| 10 #include "src/base/platform/platform.h" |
| 11 |
| 12 namespace v8 { |
| 13 namespace base { |
| 14 namespace debug { |
| 15 |
| 16 bool EnableInProcessStackDumping() { |
| 17 CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217. |
| 18 return false; |
| 19 } |
| 20 |
| 21 void DisableSignalStackDump() {} |
| 22 |
| 23 StackTrace::StackTrace() {} |
| 24 |
| 25 void StackTrace::Print() const { |
| 26 std::string backtrace = ToString(); |
| 27 OS::Print("%s\n", backtrace.c_str()); |
| 28 } |
| 29 |
| 30 void StackTrace::OutputToStream(std::ostream* os) const { |
| 31 for (size_t i = 0; i < count_; ++i) { |
| 32 *os << "#" << std::setw(2) << i << trace_[i] << "\n"; |
| 33 } |
| 34 } |
| 35 |
| 36 } // namespace debug |
| 37 } // namespace base |
| 38 } // namespace v8 |
OLD | NEW |