absl::internal_stacktrace::FixUpStack

Fixes up the stack trace of the current thread, in the first depth frames of each buffer. The buffers need to be larger than depth, to accommodate any newly inserted elements. depth is updated to reflect the new number of elements valid across all the buffers. (It is therefore recommended that all buffer sizes be equal.)

Synopsis

Declared in <absl/debugging/stacktrace.h>

extern
void
FixUpStack(
    void** pcs,
    uintptr_t* frames,
    int* sizes,
    size_t capacity,
    size_t& depth);

Description

The frames and sizes parameters denote the bounds of the stack frame corresponding to each instruction pointer in the pcs. Any elements inside these buffers may be zero or null, in which case that information is assumed to be absent/unavailable.

Parameters

NameDescription
pcsBuffer of program counter values to fix up.
framesBuffer of stack frame bounds corresponding to each entry in pcs.
sizesBuffer of stack frame sizes corresponding to each entry in pcs.
capacityCapacity of the pcs, frames, and sizes buffers.
depthNumber of valid elements on input; updated to the new number of valid elements.