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

Side by Side Diff: base/debug_util.cc

Issue 18173: "Port" StackTrace to Mac (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « no previous file | base/debug_util_posix.cc » ('j') | base/debug_util_posix.cc » ('J')
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) 2006-2008 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_util.h"
6 6
7 #include "base/platform_thread.h" 7 #include "base/platform_thread.h"
8 8
9 bool DebugUtil::WaitForDebugger(int wait_seconds, bool silent) { 9 bool DebugUtil::WaitForDebugger(int wait_seconds, bool silent) {
10 for (int i = 0; i < wait_seconds * 10; ++i) { 10 for (int i = 0; i < wait_seconds * 10; ++i) {
11 if (BeingDebugged()) { 11 if (BeingDebugged()) {
12 if (!silent) 12 if (!silent)
13 BreakDebugger(); 13 BreakDebugger();
14 return true; 14 return true;
15 } 15 }
16 PlatformThread::Sleep(100); 16 PlatformThread::Sleep(100);
17 } 17 }
18 return false; 18 return false;
19 } 19 }
20 20
21 const void *const *StackTrace::Addresses(size_t* count) {
22 *count = trace_.size();
23 if (trace_.size())
24 return &trace_[0];
25 return NULL;
26 }
OLDNEW
« no previous file with comments | « no previous file | base/debug_util_posix.cc » ('j') | base/debug_util_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698