We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bedba4 commit 93346c4Copy full SHA for 93346c4
backward.hpp
@@ -1154,6 +1154,15 @@ class StackTraceImpl<system_tag::current_tag> : public StackTraceImplHolder {
1154
void *error_addr = nullptr) {
1155
set_context(static_cast<CONTEXT*>(context));
1156
set_error_addr(error_addr);
1157
+
1158
+ if (!context) {
1159
+ _stacktrace.resize(depth);
1160
+ const WORD capturedFrames = RtlCaptureStackBackTrace(
1161
+ 0, static_cast<DWORD>(depth), _stacktrace.data(), NULL);
1162
+ _stacktrace.resize(capturedFrames);
1163
+ return capturedFrames;
1164
+ }
1165
1166
CONTEXT localCtx; // used when no context is provided
1167
1168
if (depth == 0) {
0 commit comments