| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // http://code.google.com/p/nativeclient/issues/detail?id=645 | 167 // http://code.google.com/p/nativeclient/issues/detail?id=645 |
| 168 #define DEBUG_BREAK() abort() | 168 #define DEBUG_BREAK() abort() |
| 169 #elif defined(ARCH_CPU_ARM_FAMILY) | 169 #elif defined(ARCH_CPU_ARM_FAMILY) |
| 170 #define DEBUG_BREAK() asm("bkpt 0") | 170 #define DEBUG_BREAK() asm("bkpt 0") |
| 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 #if defined(NDEBUG) |
| 178 _exit(1); |
| 179 #endif |
| 177 } | 180 } |
| 178 | 181 |
| 179 } // namespace debug | 182 } // namespace debug |
| 180 } // namespace base | 183 } // namespace base |
| OLD | NEW |