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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <iosfwd> | 10 #include <iosfwd> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 // Copying and assignment are allowed with the default functions. | 71 // Copying and assignment are allowed with the default functions. |
72 | 72 |
73 // Gets an array of instruction pointer values. |*count| will be set to the | 73 // Gets an array of instruction pointer values. |*count| will be set to the |
74 // number of elements in the returned array. | 74 // number of elements in the returned array. |
75 const void* const* Addresses(size_t* count) const; | 75 const void* const* Addresses(size_t* count) const; |
76 | 76 |
77 // Prints the stack trace to stderr. | 77 // Prints the stack trace to stderr. |
78 void Print() const; | 78 void Print() const; |
79 | 79 |
80 #if !defined(__UCLIBC__) | 80 #if !defined(__UCLIBC__) & !defined(_AIX) |
81 // Resolves backtrace to symbols and write to stream. | 81 // Resolves backtrace to symbols and write to stream. |
82 void OutputToStream(std::ostream* os) const; | 82 void OutputToStream(std::ostream* os) const; |
83 #endif | 83 #endif |
84 | 84 |
85 // Resolves backtrace to symbols and returns as string. | 85 // Resolves backtrace to symbols and returns as string. |
86 std::string ToString() const; | 86 std::string ToString() const; |
87 | 87 |
88 private: | 88 private: |
89 #if defined(OS_WIN) | 89 #if defined(OS_WIN) |
90 void InitTrace(const _CONTEXT* context_record); | 90 void InitTrace(const _CONTEXT* context_record); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 int base, | 182 int base, |
183 size_t padding); | 183 size_t padding); |
184 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) | 184 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) |
185 | 185 |
186 } // namespace internal | 186 } // namespace internal |
187 | 187 |
188 } // namespace debug | 188 } // namespace debug |
189 } // namespace base | 189 } // namespace base |
190 | 190 |
191 #endif // BASE_DEBUG_STACK_TRACE_H_ | 191 #endif // BASE_DEBUG_STACK_TRACE_H_ |
OLD | NEW |