37 #ifdef NCBI_OS_SOLARIS
38 # include <sys/ucontext.h>
41 #if defined(HAVE_BACKWARD_HPP) \
42 && (defined(HAVE_LIBDW) || defined(NCBI_OS_DARWIN))
44 #elif defined HAVE_LIBUNWIND
46 #elif defined NCBI_OS_MSWIN
47 # if NCBI_PLATFORM_BITS == 64
52 #elif defined NCBI_OS_SOLARIS && defined(GETUSTACK)
54 #elif defined NCBI_OS_LINUX
69 #if defined NCBI_OS_MSWIN
98 if (&stack_trace !=
this) {
99 if ( stack_trace.
m_Impl ) {
123 "ncbi::CStackTrace::",
"ncbi::CStackTraceImpl::",
"ncbi::CException::",
132 os <<
m_Prefix <<
"NOT AVAILABLE" << endl;
137 string s = it->AsString();
140 if (s.find(filter) !=
NPOS) {
160 static volatile bool s_InGetMaxDepth =
false;
166 if ( !s_InGetMaxDepth ) {
167 s_InGetMaxDepth =
true;
173 val = TStackTraceMaxDepth::GetDefault();
180 s_InGetMaxDepth =
false;
183 s_InGetMaxDepth =
false;
191 #ifdef CAN_HONOR_SIGNAL_HANDLING_CONFIGURATION
static void s_HonorSignalHandlingConfiguration(void)
bool Empty(void) const
Check if stack trace information is available.
unique_ptr< CStackTraceImpl > m_Impl
list< SStackFrameInfo > TStack
void Write(CNcbiOstream &os) const
Write stack trace to the stream, prepend each line with the prefix.
static unsigned int s_GetStackTraceMaxDepth(void)
const TStack & GetStack(void) const
Get the stack trace data.
static void s_HonorSignalHandlingConfiguration(void)
CStackTrace & operator=(const CStackTrace &stack_trace)
CStackTrace(const string &prefix="")
Get and store current stack trace.
void x_ExpandStackTrace(void) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void Set(TValue new_value) THROWS_NONE
Set atomic counter value.
TValue Get(void) const THROWS_NONE
Get atomic counter value.
@ eParam_NoThread
Do not use per-thread values.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static void PtrToString(string &out_str, const void *ptr)
Convert pointer to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
unsigned int
A callback function used to compare two keys in a database.
const unsigned int kDefaultStackTraceMaxDepth
static const vector< string > s_StackFilters
NCBI_PARAM_DECL(int, Debug, Stack_Trace_Max_Depth)
NCBI_PARAM_DEF_EX(int, Debug, Stack_Trace_Max_Depth, kDefaultStackTraceMaxDepth, eParam_NoThread, DEBUG_STACK_TRACE_MAX_DEPTH)
typedef NCBI_PARAM_TYPE(Debug, Stack_Trace_Max_Depth) TStackTraceMaxDepth
string AsString(void) const