diff options
| author | Antonin Kral <a.kral@bobek.cz> | 2012-08-29 20:54:51 +0200 |
|---|---|---|
| committer | Antonin Kral <a.kral@bobek.cz> | 2012-08-29 20:54:51 +0200 |
| commit | 83957b73f9177f6e38bd5375bd93ca1f6a47188c (patch) | |
| tree | f20b7d6ac9a9c64ff5bb6b5910a24abbb356b1d5 /src/mongo/util/stacktrace.h | |
| parent | 5071d203970edd4c995493d810abe20987e76fe9 (diff) | |
Imported Upstream version 2.2.0upstream/2.2.0
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 |
