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

Unified Diff: base/debug/stack_trace.h

Issue 896533003: Support creation of StackTrace directly from CONTEXT struct (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/debug/stack_trace_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace.h
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h
index 572f285bebaff506ceb3d54ad66c912e18031bca..fb271b6da4a41c70d40ad1851d3040dee6e6a7e3 100644
--- a/base/debug/stack_trace.h
+++ b/base/debug/stack_trace.h
@@ -17,6 +17,7 @@
#if defined(OS_WIN)
struct _EXCEPTION_POINTERS;
+struct _CONTEXT;
#endif
namespace base {
@@ -54,6 +55,7 @@ class BASE_EXPORT StackTrace {
// Note: this function will throw an import not found (StackWalk64) exception
// on system without dbghelp 5.1.
StackTrace(const _EXCEPTION_POINTERS* exception_pointers);
+ StackTrace(const _CONTEXT* context);
#endif
// Copying and assignment are allowed with the default functions.
@@ -76,6 +78,10 @@ class BASE_EXPORT StackTrace {
std::string ToString() const;
private:
+#if defined(OS_WIN)
+ void InitTrace(_CONTEXT* context_record);
+#endif
+
// From http://msdn.microsoft.com/en-us/library/bb204633.aspx,
// the sum of FramesToSkip and FramesToCapture must be less than 63,
// so set it to 62. Even if on POSIX it could be a larger value, it usually
« no previous file with comments | « no previous file | base/debug/stack_trace_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698