[#BloombergLP-balst-StackTraceUtil-printHexStackTrace]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTraceUtil.adoc[StackTraceUtil]::printHexStackTrace
:relfileprefix: ../../../
:mrdocs:

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`&period;

== Synopsis

Declared in `&lt;balst&lowbar;stacktraceutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::ostream&
printHexStackTrace(
    std::ostream& stream,
    char delimiter = &apos; &apos;,
    int maxFrames = &hyphen;1,
    int additionalIgnoreFrames = 0,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator = 0);
----

== Description

Optionally specify `delimiter`, that is to be written between stack addresses&period; If `delimiter` is not specified, the addresses are separated by a single space&period; 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&period; Optionally specify `additionalIgnoreFrames` to be added to the number of frames from the stack top to be ignored and not printed&period; Optionally specify `allocator` to be used for temporary storage&semi; if none is specified, a locally created heap bypass allocator will be used&period; The behavior is undefined unless `delimiter !&equals; 0` and `additionalIgnoreFrames &gt;&equals; 0`&period;

== Return Value

a reference to `stream`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| output stream for the hex stack addresses
| *delimiter*
| character written between stack addresses
| *maxFrames*
| maximum number of stack frames to obtain
| *additionalIgnoreFrames*
| extra top frames to omit from the trace
| *allocator*
| memory allocator&semi; null uses a heap&hyphen;bypass allocator
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
