libcsdbg  1.28
C++ exception (and generic) stack trace debug library
tracer & csdbg::tracer::unwind ( )
virtual

Unwind the simulated call stack of the current thread.

Returns
*this
Exceptions
std::bad_alloc
Attention
If an exception trace is not produced, before a new exception occurs, you must perform an explicit simulated call stack unwinding, to discard the current exception trace. If you don't properly unwind the simulated stack, the stored trace will mess with the next attempt to obtain a stack trace. Nevertheless, if the trace was actually created, a call to unwind doesn't affect the tracer object state at all (nothing to dispose), so it is not an error to call it once or even more times even when the trace was produced

Definition at line 778 of file tracer.cpp.

References csdbg::process::current_thread(), csdbg::util::lock(), m_proc, csdbg::util::unlock(), and csdbg::thread::unwind().

Referenced by csdbg::operator<<(), and trace().

779 {
780  try {
781  util::lock();
783  util::unlock();
784  return *this;
785  }
786 
787  catch (...) {
788  util::unlock();
789  throw;
790  }
791 }
process * m_proc
Process handle.
Definition: tracer.hpp:45
static void lock()
Lock the global access mutex.
Definition: util.cpp:397
static void unlock()
Unlock the global access mutex.
Definition: util.cpp:406
virtual thread & unwind()
Unwind the simulated call stack to meet the real call stack.
Definition: thread.cpp:283
virtual thread * current_thread()
Get the currently executing thread.
Definition: process.cpp:339

+ Here is the call graph for this function:

+ Here is the caller graph for this function: