FormatStackTraceWith
Description
Same as FormatStackTrace but reuses a caller-owned resolver. Cheaper when formatting many traces. Available only when the in-tree SymbolResolver is compiled in (Linux today). On Windows dbghelp does its own caching internally, so this variant is neither offered nor needed.
Parameters
| Name | Direction | Description |
|---|---|---|
out |
out | Str to append to. |
frames |
in | Frames captured by CaptureStackTrace. |
count |
in | Number of valid frames. |
resolver |
in,out | Resolver to use. Cache may grow. |
Success
Output appended.
Failure
Function does not fail.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Backtrace.c:60:
Str out = StrInit(alloc_base);
FormatStackTraceWith(&out, frames, n, &res);
// Should also contain the helper name through the shared resolver.
- In
Backtrace.c:196:
}
void FormatStackTraceWith(Str *out, const StackFrame *frames, size count, SymbolResolver *resolver) {
if (!out || !frames || !resolver)
return;- In
Backtrace.c:220:
return;
}
FormatStackTraceWith(out, frames, count, &res);
SymbolResolverDeinit(&res);
}
Last updated on