OLD | NEW |
1 // Copyright (c) 2006-2008 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_util.h" | 5 #include "base/debug/debugger.h" |
6 | 6 |
7 #include "base/platform_thread.h" | 7 #include "base/platform_thread.h" |
8 | 8 |
9 bool DebugUtil::suppress_dialogs_ = false; | 9 namespace base { |
| 10 namespace debug { |
10 | 11 |
11 bool DebugUtil::WaitForDebugger(int wait_seconds, bool silent) { | 12 bool WaitForDebugger(int wait_seconds, bool silent) { |
12 for (int i = 0; i < wait_seconds * 10; ++i) { | 13 for (int i = 0; i < wait_seconds * 10; ++i) { |
13 if (BeingDebugged()) { | 14 if (BeingDebugged()) { |
14 if (!silent) | 15 if (!silent) |
15 BreakDebugger(); | 16 BreakDebugger(); |
16 return true; | 17 return true; |
17 } | 18 } |
18 PlatformThread::Sleep(100); | 19 PlatformThread::Sleep(100); |
19 } | 20 } |
20 return false; | 21 return false; |
21 } | 22 } |
22 | 23 |
23 const void *const *StackTrace::Addresses(size_t* count) { | 24 } // namespace debug |
24 *count = count_; | 25 } // namespace base |
25 if (count_) | |
26 return trace_; | |
27 return NULL; | |
28 } | |
OLD | NEW |