diff options
author | Tad Marshall <tad@10gen.com> | 2012-07-30 18:33:08 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-07-31 14:13:20 -0400 |
commit | 5300139ceb188361f773c7a6f3c24f9fe9affd6a (patch) | |
tree | d826820a7e823ea213659d7dce960d6761e4f2e1 /src/mongo/util/stacktrace.h | |
parent | bb2b218b02b60e03ddd3487f7bf159497645f7e9 (diff) | |
download | mongo-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.h | 7 |
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 |