Chromium Code Reviews| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/base_export.h" | 13 #include "base/base_export.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 | 16 |
| 17 #if defined(OS_POSIX) | 17 #if defined(OS_POSIX) |
| 18 #include <unistd.h> | 18 #include <unistd.h> |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
| 22 struct _EXCEPTION_POINTERS; | 22 struct _EXCEPTION_POINTERS; |
| 23 struct _CONTEXT; | 23 struct _CONTEXT; |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 #if defined(OS_POSIX) && ( \ | 26 //#if defined(OS_POSIX) && ( \ |
|
brettw
2017/02/22 22:03:31
We should clean this up before checking it in.
Wez
2017/02/23 00:12:22
Yup; this was uploaded mainly to unblock Albert -
| |
| 27 defined(__i386__) || defined(__x86_64__) || \ | 27 // defined(__i386__) || defined(__x86_64__) || \ |
| 28 (defined(__arm__) && !defined(__thumb__))) | 28 // (defined(__arm__) && !defined(__thumb__))) |
| 29 #define HAVE_TRACE_STACK_FRAME_POINTERS 1 | 29 #define HAVE_TRACE_STACK_FRAME_POINTERS 1 |
| 30 #else | 30 //#else |
| 31 #define HAVE_TRACE_STACK_FRAME_POINTERS 0 | 31 //#define HAVE_TRACE_STACK_FRAME_POINTERS 0 |
| 32 #endif | 32 //#endif |
| 33 | 33 |
| 34 namespace base { | 34 namespace base { |
| 35 namespace debug { | 35 namespace debug { |
| 36 | 36 |
| 37 // Enables stack dump to console output on exception and signals. | 37 // Enables stack dump to console output on exception and signals. |
| 38 // When enabled, the process will quit immediately. This is meant to be used in | 38 // When enabled, the process will quit immediately. This is meant to be used in |
| 39 // unit_tests only! This is not thread-safe: only call from main thread. | 39 // unit_tests only! This is not thread-safe: only call from main thread. |
| 40 // In sandboxed processes, this has to be called before the sandbox is turned | 40 // In sandboxed processes, this has to be called before the sandbox is turned |
| 41 // on. | 41 // on. |
| 42 // Calling this function on Linux opens /proc/self/maps and caches its | 42 // Calling this function on Linux opens /proc/self/maps and caches its |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 int base, | 184 int base, |
| 185 size_t padding); | 185 size_t padding); |
| 186 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) | 186 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) |
| 187 | 187 |
| 188 } // namespace internal | 188 } // namespace internal |
| 189 | 189 |
| 190 } // namespace debug | 190 } // namespace debug |
| 191 } // namespace base | 191 } // namespace base |
| 192 | 192 |
| 193 #endif // BASE_DEBUG_STACK_TRACE_H_ | 193 #endif // BASE_DEBUG_STACK_TRACE_H_ |
| OLD | NEW |