Populate the specified result object with information about the current thread's program stack.
Declared in <balst_stacktraceutil.h>
static
int
loadStackTraceFromStack(
StackTrace* result,
int maxFrames = -1,
bool demanglingPreferredFlag = true);
Optionally specify maxFrames to indicate the maximum number of frames to take from the top of the stack. If maxFrames is not specified, the default limit is at least 1024. Optionally specify demanglingPreferredFlag to indicate whether to attempt to perform demangling, if possible. If demanglingPreferredFlag is not specified, demangling is assumed to be preferred, however, demangling is always performed on the Windows platform and never performed on Solaris using the CC compiler regardless of the value of demanglingPreferredFlag. Any frames previously contained in the stackTrace object are discarded. Return 0 on success, and a non-zero value otherwise. The behavior is undefined unless maxFrames (if specified) is greater than 0. Note that demangling may involve calling malloc.
0 on success, and a non-zero value otherwise
| Name | Description |
|---|---|
| result | stack-trace object to populate |
| maxFrames | maximum number of stack frames to capture |
| demanglingPreferredFlag | whether to prefer demangled symbols |