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

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

Issue 6736019: Base: A few more files using BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/debugger.h ('k') | base/message_loop.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_DEBUG_STACK_TRACE_H_ 5 #ifndef BASE_DEBUG_STACK_TRACE_H_
6 #define BASE_DEBUG_STACK_TRACE_H_ 6 #define BASE_DEBUG_STACK_TRACE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <iosfwd> 9 #include <iosfwd>
10 10
11 #include "base/base_api.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 13
13 #if defined(OS_WIN) 14 #if defined(OS_WIN)
14 struct _EXCEPTION_POINTERS; 15 struct _EXCEPTION_POINTERS;
15 #endif 16 #endif
16 17
17 namespace base { 18 namespace base {
18 namespace debug { 19 namespace debug {
19 20
20 // A stacktrace can be helpful in debugging. For example, you can include a 21 // A stacktrace can be helpful in debugging. For example, you can include a
21 // stacktrace member in a object (probably around #ifndef NDEBUG) so that you 22 // stacktrace member in a object (probably around #ifndef NDEBUG) so that you
22 // can later see where the given object was created from. 23 // can later see where the given object was created from.
23 class StackTrace { 24 class BASE_API StackTrace {
24 public: 25 public:
25 // Creates a stacktrace from the current location. 26 // Creates a stacktrace from the current location.
26 StackTrace(); 27 StackTrace();
27 28
28 #if defined(OS_WIN) 29 #if defined(OS_WIN)
29 // Creates a stacktrace for an exception. 30 // Creates a stacktrace for an exception.
30 // Note: this function will throw an import not found (StackWalk64) exception 31 // Note: this function will throw an import not found (StackWalk64) exception
31 // on system without dbghelp 5.1. 32 // on system without dbghelp 5.1.
32 StackTrace(_EXCEPTION_POINTERS* exception_pointers); 33 StackTrace(_EXCEPTION_POINTERS* exception_pointers);
33 #endif 34 #endif
(...skipping 20 matching lines...) Expand all
54 static const int kMaxTraces = 62; 55 static const int kMaxTraces = 62;
55 56
56 void* trace_[kMaxTraces]; 57 void* trace_[kMaxTraces];
57 int count_; 58 int count_;
58 }; 59 };
59 60
60 } // namespace debug 61 } // namespace debug
61 } // namespace base 62 } // namespace base
62 63
63 #endif // BASE_DEBUG_STACK_TRACE_H_ 64 #endif // BASE_DEBUG_STACK_TRACE_H_
OLDNEW
« no previous file with comments | « base/debug/debugger.h ('k') | base/message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698