Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: base/debug/stack_trace.cc

Issue 3945002: Move debug-related stuff from base to the base/debug directory and use the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/stack_trace.h ('k') | base/debug/stack_trace_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/stack_trace.h"
6 6
7 #include "base/platform_thread.h" 7 namespace base {
8 namespace debug {
8 9
9 bool DebugUtil::suppress_dialogs_ = false; 10 StackTrace::~StackTrace() {
10
11 bool DebugUtil::WaitForDebugger(int wait_seconds, bool silent) {
12 for (int i = 0; i < wait_seconds * 10; ++i) {
13 if (BeingDebugged()) {
14 if (!silent)
15 BreakDebugger();
16 return true;
17 }
18 PlatformThread::Sleep(100);
19 }
20 return false;
21 } 11 }
22 12
23 const void *const *StackTrace::Addresses(size_t* count) { 13 const void *const *StackTrace::Addresses(size_t* count) {
24 *count = count_; 14 *count = count_;
25 if (count_) 15 if (count_)
26 return trace_; 16 return trace_;
27 return NULL; 17 return NULL;
28 } 18 }
19
20 } // namespace debug
21 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/stack_trace.h ('k') | base/debug/stack_trace_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698