diff options
Diffstat (limited to 'src/mongo/util/stacktrace.h')
| -rw-r--r-- | src/mongo/util/stacktrace.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mongo/util/stacktrace.h b/src/mongo/util/stacktrace.h new file mode 100644 index 00000000000..fab1d8b2a2e --- /dev/null +++ b/src/mongo/util/stacktrace.h @@ -0,0 +1,23 @@ +// Copyright 2009. 10gen, Inc. + +/** + * Tools for working with in-process stack traces. + */ + +#pragma once + +#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 |
