| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 #ifndef BASE_DEBUG_STACK_TRACE_H_ | 5 #ifndef BASE_DEBUG_STACK_TRACE_H_ |
| 6 #define BASE_DEBUG_STACK_TRACE_H_ | 6 #define BASE_DEBUG_STACK_TRACE_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 ~StackTrace(); | 63 ~StackTrace(); |
| 64 | 64 |
| 65 // Gets an array of instruction pointer values. |*count| will be set to the | 65 // Gets an array of instruction pointer values. |*count| will be set to the |
| 66 // number of elements in the returned array. | 66 // number of elements in the returned array. |
| 67 const void* const* Addresses(size_t* count) const; | 67 const void* const* Addresses(size_t* count) const; |
| 68 | 68 |
| 69 // Prints the stack trace to stderr. | 69 // Prints the stack trace to stderr. |
| 70 void Print() const; | 70 void Print() const; |
| 71 | 71 |
| 72 #if !defined(__UCLIBC__) | 72 #if !defined(__UCLIBC__) && !defined(FNL_MUSL) |
| 73 // Resolves backtrace to symbols and write to stream. | 73 // Resolves backtrace to symbols and write to stream. |
| 74 void OutputToStream(std::ostream* os) const; | 74 void OutputToStream(std::ostream* os) const; |
| 75 #endif | 75 #endif |
| 76 | 76 |
| 77 // Resolves backtrace to symbols and returns as string. | 77 // Resolves backtrace to symbols and returns as string. |
| 78 std::string ToString() const; | 78 std::string ToString() const; |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 #if defined(OS_WIN) | 81 #if defined(OS_WIN) |
| 82 void InitTrace(_CONTEXT* context_record); | 82 void InitTrace(_CONTEXT* context_record); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 109 int base, | 109 int base, |
| 110 size_t padding); | 110 size_t padding); |
| 111 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) | 111 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) |
| 112 | 112 |
| 113 } // namespace internal | 113 } // namespace internal |
| 114 | 114 |
| 115 } // namespace debug | 115 } // namespace debug |
| 116 } // namespace base | 116 } // namespace base |
| 117 | 117 |
| 118 #endif // BASE_DEBUG_STACK_TRACE_H_ | 118 #endif // BASE_DEBUG_STACK_TRACE_H_ |
| OLD | NEW |