summaryrefslogtreecommitdiff
path: root/src/mongo/util/stacktrace.h
diff options
context:
space:
mode:
authorTad Marshall <tad@10gen.com>2012-07-30 18:33:08 -0400
committerTad Marshall <tad@10gen.com>2012-07-31 14:13:20 -0400
commit5300139ceb188361f773c7a6f3c24f9fe9affd6a (patch)
treed826820a7e823ea213659d7dce960d6761e4f2e1 /src/mongo/util/stacktrace.h
parentbb2b218b02b60e03ddd3487f7bf159497645f7e9 (diff)
downloadmongo-5300139ceb188361f773c7a6f3c24f9fe9affd6a.tar.gz
SERVER-6554 Windows unhandled exception filter print stack trace
Modify the Windows stack trace printing code to accept a "context", and use the context record passed to the unhandled exception filter to start the stack trace at the faulting instruction. Collect the context used for "normal" stack traces from inside printStackTrace.
Diffstat (limited to 'src/mongo/util/stacktrace.h')
-rw-r--r--src/mongo/util/stacktrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/util/stacktrace.h b/src/mongo/util/stacktrace.h
index d4c9f014959..fab1d8b2a2e 100644
--- a/src/mongo/util/stacktrace.h
+++ b/src/mongo/util/stacktrace.h
@@ -8,9 +8,16 @@
#include <iostream>
+#include "mongo/platform/basic.h"
+
namespace mongo {
// Print stack trace information to "os", default to std::cout.
void printStackTrace(std::ostream &os=std::cout);
+#if defined(_WIN32)
+ // Print stack trace (using a specified stack context) to "os", default to std::cout.
+ void printWindowsStackTrace(CONTEXT &context, std::ostream &os=std::cout);
+#endif
+
} // namespace mongo