[#absl-DefaultStackUnwinder] = xref:absl.adoc[absl]::DefaultStackUnwinder :relfileprefix: ../ :mrdocs: Records program counter values of up to `max_depth` frames, skipping the most recent `skip_count` stack frames, and stores their corresponding values in `pcs`. (Note that the frame generated for this call itself is also skipped.) This function acts as a generic stack‐unwinder; prefer usage of the more specific `GetStack{Trace,Frames}{,WithContext}()` functions above. == Synopsis Declared in `<absl/debugging/stacktrace.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- extern int DefaultStackUnwinder( void** pcs, int* sizes, int max_depth, int skip_count, void const* uc, int* min_dropped_frames); ---- == Description If you have set your own stack unwinder (with the `SetStackUnwinder()` function above, you can still get the default stack unwinder by calling `DefaultStackUnwinder()`, which will ignore any previously set stack unwinder and use the default one instead. Because this function is generic, only `pcs` is guaranteed to be non‐null upon return. It is legal for `sizes`, `uc`, and `min_dropped_frames` to all be null when called. The semantics are the same as the corresponding `GetStack*()` function in the case where `absl::SetStackUnwinder()` was never called. Equivalents are: null sizes | non‐nullptr sizes |==| null uc | GetStackTrace() | GetStackFrames() | non‐null uc | GetStackTraceWithContext() | GetStackFramesWithContext() | |==| == Return Value The number of frames stored in `pcs`. == Parameters [cols="1,4"] |=== | Name| Description | *pcs* | Buffer to receive the recorded program counter values. | *sizes* | If non‐null, receives the corresponding stack frame sizes. | *max_depth* | Maximum number of frames to record. | *skip_count* | Number of most recent stack frames to skip. | *uc* | Pointer to the signal handler's `ucontext_t` value, or null. | *min_dropped_frames* | If non‐null, receives the number of stack frames dropped. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#