Sierra Toolkit  Version of the Day
DiagTraceDetail

Classes

class  stk_classic::diag::Tracespec
 Class Tracespec dissects file specification strings. It contains a single char const pointer to a function specification string. Accessor functions can dissect the function specification string and return various components of it. More...
 
class  stk_classic::diag::Traceback::Preserve
 Class Traceback::Preserve serves as a sentry for traceback stack preservation during additional extension and unwinding. More...
 
struct  stk_classic::diag::Traceback::PrintCoverage
 Class PrintCoverage is a type holder class for printing the stack. More...
 
class  stk_classic::diag::Traceback
 Class Traceback is a stack of char constant pointers to function specifications which have been encounter by Traceback during exception stack unwind. More...
 
struct  stk_classic::diag::Trace::TraceList
 Typedef TraceList declares the trace list data type. More...
 
class  stk_classic::diag::Trace
 Class Trace serves as a sentry for entering routines. Creating a trace object prints the specified member function name to the specfied diag_writer and pushes the diag_writer depth. On destruction, it prints the member function name again and pops the depth. More...
 

Typedefs

typedef std::vector< const char * > stk_classic::diag::TracebackStack
 
typedef const char * stk_classic::diag::Traceback::Stack[STACK_SIZE]
 Stack type.
 
typedef const char *const * stk_classic::diag::Traceback::const_stack_iterator
 const iterator thru stack
 
typedef const char ** stk_classic::diag::Traceback::stack_iterator
 iterator thru stack
 
typedef std::map< const char *, int > stk_classic::diag::Traceback::Coverage
 Typedef Coverage declares the function usage coverage data type. More...
 
typedef Writer &(* stk_classic::diag::Trace::ExtraFuncPtr) (Writer &)
 Typedef ExtraFuncPtr declares the extra function pointer signature.
 
typedef stk_classic::diag::Tracespec sierra::Diag::Tracespec
 
typedef stk_classic::diag::Traceback sierra::Diag::Traceback
 
typedef stk_classic::diag::Trace sierra::Diag::Trace
 

Enumerations

enum  stk_classic::diag::Traceback::TracebackState {
  RUNNING,
  THROWING
}
 Enumeration TracebackState lists the traceback execution states. More...
 
enum  { STACK_SIZE = 2048 }
 
enum  { stk_classic::diag::Trace::IN_TRACE_LIST = 0x01 }
 Enumeration to describe the trace back flags. More...
 

Functions

 stk_classic::diag::Tracespec::Tracespec (const char *function_spec)
 
const char * stk_classic::diag::Tracespec::getFunctionSpec () const
 Member function getFunctionSpec returns the function's name. More...
 
std::string stk_classic::diag::Tracespec::getFunctionName () const
 Member function getFunctionName returns the function's name. More...
 
std::string stk_classic::diag::Tracespec::getFunctionShortName () const
 Member function getFunctionName returns the function's name. More...
 
std::string stk_classic::diag::Tracespec::getFunctionClass () const
 Member function getFunctionName returns the function's name. More...
 
std::string stk_classic::diag::Tracespec::getFunctionNamespace () const
 Member function getFunctionName returns the function's name. More...
 
std::string stk_classic::diag::Tracespec::getFunctionShortClass () const
 Member function getFunctionName returns the function's name. More...
 
 stk_classic::diag::Traceback::Preserve::Preserve ()
 Creates a new Traceback::Preserve sentry. When the sentry is in place, the traceback stack is preserved from extension and clearing.
 
 stk_classic::diag::Traceback::Preserve::~Preserve ()
 Destroys a Preserve sentry which allows traceback stack.
 
 stk_classic::diag::Traceback::Traceback (const char *function_spec)
 Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth. More...
 
 stk_classic::diag::Traceback::~Traceback ()
 Destroys a Traceback instance, resulting in the pushing of the function specification if unwinding the stack.
 
static TracebackStack stk_classic::diag::Traceback::snapshot ()
 
static void stk_classic::diag::Traceback::enableTracebackDisplay ()
 Member function enableTracebackDisplay enables the display of the traceback.
 
static void stk_classic::diag::Traceback::disableTracebackDisplay ()
 Member function disableTracebackDisplay disables the display of the traceback.
 
static bool stk_classic::diag::Traceback::displayTraceback ()
 Member function displayEnabled returns true if display of the tracback stack has been enabled. More...
 
static void stk_classic::diag::Traceback::preserveStack ()
 Member function preserveStack increments the traceback stack preservation counter.
 
static void stk_classic::diag::Traceback::releaseStack ()
 Member function releaseStack decrements the traceback stack preservation counter.
 
static void stk_classic::diag::Traceback::enableCoverage (bool coverage_enabled=true)
 Member function enableCoverage enables the collection of function call coverage data. This is a very expensive operation, but allows function execution coverage data to be collected for testing. More...
 
static bool stk_classic::diag::Traceback::coverageEnabled ()
 Member function coverageEnabled returns true if coverage has been enabled. More...
 
static TracebackState stk_classic::diag::Traceback::getTracebackState ()
 Member function getTracebackState returns the value of the traceback state. More...
 
static PrintCoverage stk_classic::diag::Traceback::printCoverage ()
 Member function printCoverage creates a PrintCoverage type holder class which enables operator<< to put an coverage to an ostream. More...
 
static std::ostream & stk_classic::diag::Traceback::printCoverage (std::ostream &os)
 Member function printCoverage ... More...
 
static std::string stk_classic::diag::Traceback::printTraceback (const TracebackStack &traceback_stack)
 Member function printTraceback writes the traceback stack function specifications to the output stream os. More...
 
Writerstk_classic::diag::Traceback::verbose_print (Writer &dout) const
 Member function verbose_print dumps the function specification stack to the diagnostic writer. More...
 
 stk_classic::diag::Trace::Trace (Writer &dout, const char *function_name, int print_mask=LOG_TRACE, bool do_trace=true)
 Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth. More...
 
 stk_classic::diag::Trace::~Trace ()
 Destroys a Trace instance, resulting in the printing of the member function name and popping the diag_writer depth.
 
static ExtraFuncPtr stk_classic::diag::Trace::setExtra (ExtraFuncPtr extra)
 Member function setExtra sets the extra function which is called during each trace construction and destrution. (Not implemented) More...
 
static void stk_classic::diag::Trace::addTraceFunction (const std::string &function_prefix)
 Member function addTraceFunction adds a function prefix to the list of function prefixes search to enable tracing. More...
 
static void stk_classic::diag::Trace::clearTraceFunctions ()
 Member function clearTraceFunctions removes all function prefixes from the function signature prefix list.
 
Writerstk_classic::diag::Trace::verbose_print (Writer &dout) const
 Member function dump writes the trace to the specified Writer. More...
 
Writerstk_classic::diag::operator<< (Writer &dout, const Trace &diag_trace)
 Member function operator<< writes the trace data to the diagnostic writer. More...
 
std::ostream & stk_classic::diag::operator<< (std::ostream &os, const Traceback::PrintCoverage &)
 Member function operator<< writes the coverage to the output stream. More...
 

Variables

const char * stk_classic::diag::Tracespec::m_functionSpec
 The member function specification.
 

Detailed Description

Typedef Documentation

◆ Coverage

typedef std::map<const char *, int> stk_classic::diag::Traceback::Coverage

Typedef Coverage declares the function usage coverage data type.

NOTE: This does really want to use const char * as the key. I know, things could move, but the definition of a function spec is that it is a string literal only. So, let it go.

Definition at line 129 of file stk_util/stk_util/diag/Trace.hpp.

Enumeration Type Documentation

◆ TracebackState

Enumeration TracebackState lists the traceback execution states.

  • RUNNING - No throws are in progress.
  • THROWING - A throw is in progress.

Definition at line 114 of file stk_util/stk_util/diag/Trace.hpp.

◆ anonymous enum

anonymous enum

Enumeration to describe the trace back flags.

Enumerator
IN_TRACE_LIST 

Tracing enabled by this function.

Definition at line 380 of file stk_util/stk_util/diag/Trace.hpp.

Function Documentation

◆ Tracespec()

stk_classic::diag::Tracespec::Tracespec ( const char *  function_spec)
inlineexplicit

Creates a new Tracespec instance.

Parameters
function_speca char const pointer to the function full specification.

Definition at line 41 of file stk_util/stk_util/diag/Trace.hpp.

◆ getFunctionSpec()

const char* stk_classic::diag::Tracespec::getFunctionSpec ( ) const
inline

Member function getFunctionSpec returns the function's name.

Returns
a char const pointer to the function's name.

Definition at line 50 of file stk_util/stk_util/diag/Trace.hpp.

◆ getFunctionName()

std::string stk_classic::diag::Tracespec::getFunctionName ( ) const

Member function getFunctionName returns the function's name.

Returns
a char const pointer to the function's name.

Definition at line 255 of file stk_util/stk_util/diag/Trace.cpp.

◆ getFunctionShortName()

std::string stk_classic::diag::Tracespec::getFunctionShortName ( ) const

Member function getFunctionName returns the function's name.

Returns
a char const pointer to the function's name.

Definition at line 269 of file stk_util/stk_util/diag/Trace.cpp.

◆ getFunctionClass()

std::string stk_classic::diag::Tracespec::getFunctionClass ( ) const

Member function getFunctionName returns the function's name.

Returns
a char const pointer to the function's name.

Definition at line 227 of file stk_util/stk_util/diag/Trace.cpp.

◆ getFunctionNamespace()

std::string stk_classic::diag::Tracespec::getFunctionNamespace ( ) const

Member function getFunctionName returns the function's name.

Returns
a char const pointer to the function's name.

Definition at line 213 of file stk_util/stk_util/diag/Trace.cpp.

◆ getFunctionShortClass()

std::string stk_classic::diag::Tracespec::getFunctionShortClass ( ) const

Member function getFunctionName returns the function's name.

Returns
a char const pointer to the function's name.

Definition at line 241 of file stk_util/stk_util/diag/Trace.cpp.

◆ Traceback()

stk_classic::diag::Traceback::Traceback ( const char *  function_spec)
inlineexplicit

Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth.

Parameters
function_speca char variable ...

Definition at line 163 of file stk_util/stk_util/diag/Trace.hpp.

◆ displayTraceback()

static bool stk_classic::diag::Traceback::displayTraceback ( )
inlinestatic

Member function displayEnabled returns true if display of the tracback stack has been enabled.

Returns
a bool value of true if trackback display has been enabled.

Definition at line 222 of file stk_util/stk_util/diag/Trace.hpp.

◆ enableCoverage()

static void stk_classic::diag::Traceback::enableCoverage ( bool  coverage_enabled = true)
inlinestatic

Member function enableCoverage enables the collection of function call coverage data. This is a very expensive operation, but allows function execution coverage data to be collected for testing.

Parameters
coverage_enableda bool value to set the coverage enabled flag.

Definition at line 253 of file stk_util/stk_util/diag/Trace.hpp.

◆ coverageEnabled()

static bool stk_classic::diag::Traceback::coverageEnabled ( )
inlinestatic

Member function coverageEnabled returns true if coverage has been enabled.

Returns
a bool value of true if coverage has been enabled.

Definition at line 264 of file stk_util/stk_util/diag/Trace.hpp.

◆ getTracebackState()

static TracebackState stk_classic::diag::Traceback::getTracebackState ( )
inlinestatic

Member function getTracebackState returns the value of the traceback state.

Returns
an int ...

Definition at line 274 of file stk_util/stk_util/diag/Trace.hpp.

◆ printCoverage() [1/2]

static PrintCoverage stk_classic::diag::Traceback::printCoverage ( )
inlinestatic

Member function printCoverage creates a PrintCoverage type holder class which enables operator<< to put an coverage to an ostream.

Returns
a PrintCoverage object.

Definition at line 292 of file stk_util/stk_util/diag/Trace.hpp.

◆ printCoverage() [2/2]

std::ostream & stk_classic::diag::Traceback::printCoverage ( std::ostream &  os)
static

Member function printCoverage ...

Parameters
osa std::ostream variable ...
Returns
a std::ostream ...

Definition at line 382 of file stk_util/stk_util/diag/Trace.cpp.

◆ printTraceback()

std::string stk_classic::diag::Traceback::printTraceback ( const TracebackStack &  traceback_stack)
static

Member function printTraceback writes the traceback stack function specifications to the output stream os.

Parameters
osa std::ostream reference to the output stream to write to.
Returns
a std::ostream reference to the output stream.

Definition at line 367 of file stk_util/stk_util/diag/Trace.cpp.

◆ verbose_print() [1/2]

Writer& stk_classic::diag::Traceback::verbose_print ( Writer dout) const

Member function verbose_print dumps the function specification stack to the diagnostic writer.

Parameters
douta Writer reference to the diagnostic writer to write to.
Returns
a Writer reference to the diagnostic writer.

◆ Trace()

stk_classic::diag::Trace::Trace ( Writer dout,
const char *  function_name,
int  print_mask = LOG_TRACE,
bool  do_trace = true 
)

Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth.

Parameters
douta Writer reference to the diagnostic writer to send trace messages to.
function_namea char const pointer to the function specification. THIS POINTER MUST CONTINUE TO EXIST.
print_maskan int value of the diagnostic writer print mask to enable tracing.
do_tracea bool that provide an extra dynamic means of turning off tracing.

Definition at line 289 of file stk_util/stk_util/diag/Trace.cpp.

◆ setExtra()

static ExtraFuncPtr stk_classic::diag::Trace::setExtra ( ExtraFuncPtr  extra)
inlinestatic

Member function setExtra sets the extra function which is called during each trace construction and destrution. (Not implemented)

Parameters
extraan ExtraFuncPtr to the new extra function.
Returns
an ExtraFuncPtr to the previous extra function.

Definition at line 419 of file stk_util/stk_util/diag/Trace.hpp.

◆ addTraceFunction()

static void stk_classic::diag::Trace::addTraceFunction ( const std::string &  function_prefix)
inlinestatic

Member function addTraceFunction adds a function prefix to the list of function prefixes search to enable tracing.

Parameters
function_prefixa std::string const reference to the function signature prefix.

Definition at line 432 of file stk_util/stk_util/diag/Trace.hpp.

◆ verbose_print() [2/2]

Writer & stk_classic::diag::Trace::verbose_print ( Writer dout) const

Member function dump writes the trace to the specified Writer.

Parameters
douta Writer variable reference to write the trace to.
Returns
a Writer reference to <it>Writer</it>.

Definition at line 341 of file stk_util/stk_util/diag/Trace.cpp.

◆ operator<<() [1/2]

Writer& stk_classic::diag::operator<< ( Writer dout,
const Trace diag_trace 
)
inline

Member function operator<< writes the trace data to the diagnostic writer.

Parameters
douta Writer reference to the diagnostic writer to write to.
diag_tracea Trace const reference to the trace object to write.
Returns
a Writer reference to the diagnostic writer.

Definition at line 486 of file stk_util/stk_util/diag/Trace.hpp.

◆ operator<<() [2/2]

std::ostream& stk_classic::diag::operator<< ( std::ostream &  os,
const Traceback::PrintCoverage  
)
inline

Member function operator<< writes the coverage to the output stream.

Parameters
osa std::ostream reference to the output stream to write to.
print_coveragea Coverage const reference to the coverage to write.
Returns
a std::ostream reference to the output stream.

Definition at line 503 of file stk_util/stk_util/diag/Trace.hpp.