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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 // Creates a stacktrace from an existing array of instruction | 48 // Creates a stacktrace from an existing array of instruction |
49 // pointers (such as returned by Addresses()). |count| will be | 49 // pointers (such as returned by Addresses()). |count| will be |
50 // trimmed to |kMaxTraces|. | 50 // trimmed to |kMaxTraces|. |
51 StackTrace(const void* const* trace, size_t count); | 51 StackTrace(const void* const* trace, size_t count); |
52 | 52 |
53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
54 // Creates a stacktrace for an exception. | 54 // Creates a stacktrace for an exception. |
55 // Note: this function will throw an import not found (StackWalk64) exception | 55 // Note: this function will throw an import not found (StackWalk64) exception |
56 // on system without dbghelp 5.1. | 56 // on system without dbghelp 5.1. |
57 StackTrace(const _EXCEPTION_POINTERS* exception_pointers); | 57 StackTrace(_EXCEPTION_POINTERS* exception_pointers); |
58 StackTrace(const _CONTEXT* context); | 58 StackTrace(_CONTEXT* context); |
59 #endif | 59 #endif |
60 | 60 |
61 // Copying and assignment are allowed with the default functions. | 61 // Copying and assignment are allowed with the default functions. |
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 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |