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

Unified Diff: base/debug_util.h

Issue 62140: Print backtraces on FATAL log messages in debug mode. (Closed)
Patch Set: Add todo for stackwalk64 Created 11 years, 8 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 | « base/base.gyp ('k') | base/debug_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug_util.h
diff --git a/base/debug_util.h b/base/debug_util.h
index de49c43b633c17459ae756eca743cb086a2e04ab..3ca199cb1861096df370b5eae9154401c2aa476d 100644
--- a/base/debug_util.h
+++ b/base/debug_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2009 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.
@@ -9,10 +9,11 @@
#ifndef BASE_DEBUG_UTIL_H_
#define BASE_DEBUG_UTIL_H_
-#include "base/basictypes.h"
-
+#include <iostream>
#include <vector>
+#include "base/basictypes.h"
+
// A stacktrace can be helpful in debugging. For example, you can include a
// stacktrace member in a object (probably around #ifndef NDEBUG) so that you
// can later see where the given object was created from.
@@ -26,6 +27,9 @@ class StackTrace {
// Print a backtrace to stderr
void PrintBacktrace();
+ // Resolve backtrace to symbols and write to stream.
+ void OutputToStream(std::ostream* os);
+
private:
std::vector<void*> trace_;
« no previous file with comments | « base/base.gyp ('k') | base/debug_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698