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

Populate the specified `result` with stack&hyphen;trace information from the stack, described by the specified array of `addresses` of length `numAddresses`&period; Optionally specify `demanglingPreferredFlag` to indicate whether or not to attempt to perform demangling, however, demangling is always performed on the Windows platform and never performed on Solaris using the CC compiler regardless of the value of `demanglingPreferredFlag`&period; If `demanglingPreferredFlag` is not specified, demangling is performed on those platforms that support it&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Any frames previously contained in the stack&hyphen;trace object are discarded&period; The behavior is undefined unless `addresses` contains at least `numAddresses` addresses&period; Note that the return addresses from the stack can be obtained by calling `bsls&colon;&colon;StackAddressUtil&colon;&colon;getStackAddresses`, and that demangling sometimes involves calling `malloc`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
loadStackTraceFromAddressArray(
    xref:BloombergLP/balst/StackTrace.adoc[StackTrace]* result,
    void const const* addresses[],
    int numAddresses,
    bool demanglingPreferredFlag = true);
----


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