BloombergLP::balst::StackTraceUtil::printHexStackTrace

Write to the specified stream the stack addresses from a stack trace of the current thread, in hex from top to bottom, and return stream.

Synopsis

Declared in <balst_stacktraceutil.h>

static
std::ostream&
printHexStackTrace(
    std::ostream& stream,
    char delimiter = ' ',
    int maxFrames = -1,
    int additionalIgnoreFrames = 0,
    bslma::Allocator* allocator = 0);

Description

Optionally specify delimiter, that is to be written between stack addresses. If delimiter is not specified, the addresses are separated by a single space. Optionally specify maxFrames, the upper limit of the number of frames to obtain, where a negative or unspecified value will be interpreted as a large finite default value. Optionally specify additionalIgnoreFrames to be added to the number of frames from the stack top to be ignored and not printed. Optionally specify allocator to be used for temporary storage; if none is specified, a locally created heap bypass allocator will be used. The behavior is undefined unless delimiter != 0 and additionalIgnoreFrames >= 0.

Return Value

a reference to stream

Parameters

NameDescription
streamoutput stream for the hex stack addresses
delimitercharacter written between stack addresses
maxFramesmaximum number of stack frames to obtain
additionalIgnoreFramesextra top frames to omit from the trace
allocatormemory allocator; null uses a heap-bypass allocator