libcsdbg  1.28
C++ exception (and generic) stack trace debug library
const plugin * csdbg::tracer::add_plugin ( modsym_t  bgn,
modsym_t  end 
)
virtual

Register a plugin.

Parameters
[in]bgnthe instrumentation starting callback
[in]endthe instrumentation ending callback
Returns
the new plugin
Exceptions
std::bad_alloc

Definition at line 884 of file tracer.cpp.

References csdbg::util::lock(), m_plugins, and csdbg::util::unlock().

885 {
886  plugin *retval = NULL;
887  try {
888  util::lock();
889  retval = new plugin(bgn, end);
890  m_plugins->add(retval);
891  util::unlock();
892  return retval;
893  }
894 
895  catch (...) {
896  delete retval;
897  util::unlock();
898  throw;
899  }
900 }
chain< plugin > * m_plugins
Instrumentation plugins.
Definition: tracer.hpp:48
static void lock()
Lock the global access mutex.
Definition: util.cpp:397
static void unlock()
Unlock the global access mutex.
Definition: util.cpp:406

+ Here is the call graph for this function: