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.)
Declared in <absl/debugging/stacktrace.h>
extern
void
FixUpStack(
void** pcs,
uintptr_t* frames,
int* sizes,
size_t capacity,
size_t& depth);
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.
| Name | Description |
|---|---|
| pcs | Buffer of program counter values to fix up. |
| frames | Buffer of stack frame bounds corresponding to each entry in pcs. |
| sizes | Buffer of stack frame sizes corresponding to each entry in pcs. |
| capacity | Capacity of the pcs, frames, and sizes buffers. |
| depth | Number of valid elements on input; updated to the new number of valid elements. |