NCBI C++ ToolKit
|
Search Toolkit Book for CStackTrace
#include <corelib/ncbi_stack.hpp>
Classes | |
struct | SStackFrameInfo |
Structure for holding stack trace data. More... | |
Public Types | |
typedef list< SStackFrameInfo > | TStack |
Public Member Functions | |
CStackTrace (const string &prefix="") | |
Get and store current stack trace. More... | |
~CStackTrace (void) | |
CStackTrace (const CStackTrace &stack_trace) | |
CStackTrace & | operator= (const CStackTrace &stack_trace) |
bool | Empty (void) const |
Check if stack trace information is available. More... | |
const TStack & | GetStack (void) const |
Get the stack trace data. More... | |
const string & | GetPrefix (void) const |
Get current prefix. More... | |
void | SetPrefix (const string &prefix) const |
Set new prefix. More... | |
void | Write (CNcbiOstream &os) const |
Write stack trace to the stream, prepend each line with the prefix. More... | |
Static Public Member Functions | |
static unsigned int | s_GetStackTraceMaxDepth (void) |
static void | s_HonorSignalHandlingConfiguration (void) |
Private Member Functions | |
void | x_ExpandStackTrace (void) const |
Private Attributes | |
unique_ptr< CStackTraceImpl > | m_Impl |
TStack | m_Stack |
string | m_Prefix |
Definition at line 46 of file ncbi_stack.hpp.
typedef list<SStackFrameInfo> CStackTrace::TStack |
Definition at line 78 of file ncbi_stack.hpp.
Get and store current stack trace.
When printing the stack trace to a stream, each line is prepended with "prefix".
Definition at line 78 of file ncbi_stack.cpp.
CStackTrace::~CStackTrace | ( | void | ) |
Definition at line 85 of file ncbi_stack.cpp.
CStackTrace::CStackTrace | ( | const CStackTrace & | stack_trace | ) |
Definition at line 90 of file ncbi_stack.cpp.
|
inline |
Check if stack trace information is available.
Definition at line 90 of file ncbi_stack.hpp.
References m_Stack, and x_ExpandStackTrace().
Referenced by CNcbiDiag::Put(), and Write().
Get the stack trace data.
Definition at line 97 of file ncbi_stack.hpp.
References m_Stack, and x_ExpandStackTrace().
Referenced by operator=().
CStackTrace & CStackTrace::operator= | ( | const CStackTrace & | stack_trace | ) |
Definition at line 96 of file ncbi_stack.cpp.
References GetStack(), m_Impl, m_Prefix, and m_Stack.
|
static |
Definition at line 158 of file ncbi_stack.cpp.
References CAtomicCounter::Get(), int, kDefaultStackTraceMaxDepth, CAtomicCounter::Set(), and val.
|
static |
Definition at line 189 of file ncbi_stack.cpp.
References CStackTraceImpl::s_HonorSignalHandlingConfiguration().
Referenced by CNcbiApplicationAPI::x_HonorStandardSettings().
Set new prefix.
Definition at line 105 of file ncbi_stack.hpp.
References m_Prefix.
Referenced by CNcbiDiag::Put().
void CStackTrace::Write | ( | CNcbiOstream & | os | ) | const |
Write stack trace to the stream, prepend each line with the prefix.
Definition at line 127 of file ncbi_stack.cpp.
References Empty(), ITERATE, m_Prefix, m_Stack, NPOS, s_StackFilters, and x_ExpandStackTrace().
Referenced by CIgBlastnApp::CIgWorker::Main(), CIgBlastnApp::CIgFormatter::Main(), and operator<<().
|
private |
Definition at line 113 of file ncbi_stack.cpp.
References m_Impl, and m_Stack.
Referenced by Empty(), GetStack(), and Write().
|
mutableprivate |
Definition at line 117 of file ncbi_stack.hpp.
Referenced by operator=(), and x_ExpandStackTrace().
|
mutableprivate |
Definition at line 119 of file ncbi_stack.hpp.
Referenced by GetPrefix(), operator=(), SetPrefix(), and Write().
|
mutableprivate |
Definition at line 118 of file ncbi_stack.hpp.
Referenced by Empty(), GetStack(), operator=(), Write(), and x_ExpandStackTrace().