OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/base/debug/stack_trace.h" | 5 #include "src/base/debug/stack_trace.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 13 matching lines...) Expand all Loading... | |
24 StackTrace::~StackTrace() {} | 24 StackTrace::~StackTrace() {} |
25 | 25 |
26 const void* const* StackTrace::Addresses(size_t* count) const { | 26 const void* const* StackTrace::Addresses(size_t* count) const { |
27 *count = count_; | 27 *count = count_; |
28 if (count_) return trace_; | 28 if (count_) return trace_; |
29 return NULL; | 29 return NULL; |
30 } | 30 } |
31 | 31 |
32 std::string StackTrace::ToString() const { | 32 std::string StackTrace::ToString() const { |
33 std::stringstream stream; | 33 std::stringstream stream; |
34 #if V8_LIBC_GLIBC || V8_OS_BSD || V8_OS_SOLARIS | |
rmcilroy
2016/09/07 11:06:22
This will avoid printing on windows also which is
targos
2016/09/12 07:34:53
Would adding "|| V8_OS_WIN" be enough for Windows
| |
34 OutputToStream(&stream); | 35 OutputToStream(&stream); |
36 #endif | |
35 return stream.str(); | 37 return stream.str(); |
36 } | 38 } |
37 | 39 |
38 } // namespace debug | 40 } // namespace debug |
39 } // namespace base | 41 } // namespace base |
40 } // namespace v8 | 42 } // namespace v8 |
OLD | NEW |