BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balst::StackTracePrinter Class Reference

#include <balst_stacktraceprinter.h>

Public Member Functions

 StackTracePrinter (int maxFrames=-1, bool demanglingPreferredFlag=true, int additionalIgnoreFrames=0)
 

Friends

bsl::ostream & operator<< (bsl::ostream &, const StackTracePrinter &)
 

Detailed Description

This class defines an object that, if streamed to a bsl::ostream, will output a stack trace to that stream.

See balst_stacktraceprinter

Constructor & Destructor Documentation

◆ StackTracePrinter()

balst::StackTracePrinter::StackTracePrinter ( int  maxFrames = -1,
bool  demanglingPreferredFlag = true,
int  additionalIgnoreFrames = 0 
)
explicit

Create a StackTracePrinter object that will, if streamed, render a description of the current call stack to the stream. Optionally specify maxFrames indicating maximum number of frames to dispay. If maxFrames is -1 or unspecified, use a value of at least 1024. The optionally specified demanglingPreferredFlag determines whether demangling occurs, on platforms where demangling is available and optional. Optionally specify additionalIgnoreFrames which is added to bsls::StackAddressUtil::k_IGNORE_FRAMES to ignore the topmost frames of the caller. Return a reference to stream. The behavior is undefined unless -1 == maxFrames or 0 <= maxFrames, and unless 0 <= additionalIgnoreFrames.

Friends And Related Symbol Documentation

◆ operator<<

bsl::ostream & operator<< ( bsl::ostream &  ,
const StackTracePrinter  
)
friend

Stream a newline followed by a multiline stack trace according to the parameters passed to the specified object at its creation to the specified stream.


The documentation for this class was generated from the following file: