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

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

Issue 26537002: Add a UniqueVector class to GN (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: REview comments, remove npos Created 6 years, 4 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 | « base/BUILD.gn ('k') | tools/gn/BUILD.gn » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/stack_trace.h" 5 #include "base/debug/stack_trace.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <dbghelp.h> 8 #include <dbghelp.h>
9 9
10 #include <iostream> 10 #include <iostream>
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void StackTrace::Print() const { 256 void StackTrace::Print() const {
257 OutputToStream(&std::cerr); 257 OutputToStream(&std::cerr);
258 } 258 }
259 259
260 void StackTrace::OutputToStream(std::ostream* os) const { 260 void StackTrace::OutputToStream(std::ostream* os) const {
261 SymbolContext* context = SymbolContext::GetInstance(); 261 SymbolContext* context = SymbolContext::GetInstance();
262 DWORD error = context->init_error(); 262 DWORD error = context->init_error();
263 if (error != ERROR_SUCCESS) { 263 if (error != ERROR_SUCCESS) {
264 (*os) << "Error initializing symbols (" << error 264 (*os) << "Error initializing symbols (" << error
265 << "). Dumping unresolved backtrace:\n"; 265 << "). Dumping unresolved backtrace:\n";
266 for (int i = 0; (i < count_) && os->good(); ++i) { 266 for (size_t i = 0; (i < count_) && os->good(); ++i) {
267 (*os) << "\t" << trace_[i] << "\n"; 267 (*os) << "\t" << trace_[i] << "\n";
268 } 268 }
269 } else { 269 } else {
270 (*os) << "Backtrace:\n"; 270 (*os) << "Backtrace:\n";
271 context->OutputTraceToStream(trace_, count_, os); 271 context->OutputTraceToStream(trace_, count_, os);
272 } 272 }
273 } 273 }
274 274
275 } // namespace debug 275 } // namespace debug
276 } // namespace base 276 } // namespace base
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | tools/gn/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698