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

Unified Diff: base/debug/debugger.cc

Issue 7238012: Upstream android debug and log related files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/debug/debugger_posix.cc » ('j') | base/debug/debugger_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/debugger.cc
diff --git a/base/debug/debugger.cc b/base/debug/debugger.cc
index 8674f1fc71376bc73537167c4b885e4b81f6c6f6..e46d09511364fd1f337359f2cb5811a8f853b714 100644
--- a/base/debug/debugger.cc
+++ b/base/debug/debugger.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/debug/debugger.h"
-
+#include "base/logging.h"
#include "base/threading/platform_thread.h"
namespace base {
@@ -12,6 +12,13 @@ namespace debug {
static bool is_debug_ui_suppressed = false;
bool WaitForDebugger(int wait_seconds, bool silent) {
+
+#if defined(OS_ANDROID)
brettw 2011/06/24 22:23:57 It's not clear why we need a log statement for And
michaelbai 2011/06/24 23:30:44 The pid from which we know which process to attach
brettw 2011/06/29 16:42:28 Can we make the comment say what you just said the
michaelbai 2011/06/29 17:18:46 Done.
+ // pid prefix in normal LOG statements can get lost if using ddms.
+ // Thus we add an explicit pid printout here.
+ LOG(INFO) << "DebugUtil::WaitForDebugger(pid=" << (int)getpid() << ")";
brettw 2011/06/29 16:42:28 We're not supposed to use C-style casts. I think y
michaelbai 2011/06/29 17:18:46 Done.
+#endif
+
for (int i = 0; i < wait_seconds * 10; ++i) {
if (BeingDebugged()) {
if (!silent)
« no previous file with comments | « no previous file | base/debug/debugger_posix.cc » ('j') | base/debug/debugger_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698