| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/debug/debugger.h" | 5 #include "base/debug/debugger.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 | 7 |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <execinfo.h> | 9 #include <execinfo.h> |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 #elif defined(OS_NACL) | 131 #elif defined(OS_NACL) |
| 132 | 132 |
| 133 bool BeingDebugged() { | 133 bool BeingDebugged() { |
| 134 NOTIMPLEMENTED(); | 134 NOTIMPLEMENTED(); |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 | 137 |
| 138 #elif defined(OS_FREEBSD) | 138 #elif defined(OS_FREEBSD) |
| 139 | 139 |
| 140 bool DebugUtil::BeingDebugged() { | 140 bool BeingDebugged() { |
| 141 // TODO(benl): can we determine this under FreeBSD? | 141 // TODO(benl): can we determine this under FreeBSD? |
| 142 NOTIMPLEMENTED(); | 142 NOTIMPLEMENTED(); |
| 143 return false; | 143 return false; |
| 144 } | 144 } |
| 145 | 145 |
| 146 #endif // defined(OS_FREEBSD) | 146 #endif // defined(OS_FREEBSD) |
| 147 | 147 |
| 148 // We want to break into the debugger in Debug mode, and cause a crash dump in | 148 // We want to break into the debugger in Debug mode, and cause a crash dump in |
| 149 // Release mode. Breakpad behaves as follows: | 149 // Release mode. Breakpad behaves as follows: |
| 150 // | 150 // |
| (...skipping 20 matching lines...) Expand all Loading... |
| 171 #else | 171 #else |
| 172 #define DEBUG_BREAK() asm("int3") | 172 #define DEBUG_BREAK() asm("int3") |
| 173 #endif | 173 #endif |
| 174 | 174 |
| 175 void BreakDebugger() { | 175 void BreakDebugger() { |
| 176 DEBUG_BREAK(); | 176 DEBUG_BREAK(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace debug | 179 } // namespace debug |
| 180 } // namespace base | 180 } // namespace base |
| OLD | NEW |