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

Simulate a function return.

Returns
*this

Definition at line 262 of file thread.cpp.

References m_lag, m_stack, and unlikely.

Referenced by csdbg::__cyg_profile_func_exit().

263 {
264  /*
265  * If the function returned because an exception is propagating, unwinding the
266  * stack, keep track of the call depth difference between the simulated and
267  * the real call stack (the 'lag')
268  */
269  if ( unlikely(std::uncaught_exception()) )
270  m_lag++;
271  else
272  m_stack->pop();
273 
274  return *this;
275 }
stack< call > * m_stack
Simulated call stack.
Definition: thread.hpp:37
i32 m_lag
The number of calls that must be popped off the simulated stack for it to match the real one...
Definition: thread.hpp:39
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349

+ Here is the caller graph for this function: