libcsdbg  1.28
C++ exception (and generic) stack trace debug library
const plugin * csdbg::tracer::add_plugin ( const i8 path,
const i8 scope = NULL 
)
virtual

Register a plugin module (DSO)

Parameters
[in]paththe path of the module file
[in]scopethe full scope of the plugin callbacks
Returns
the new plugin
Exceptions
std::bad_alloc
csdbg::exception

Definition at line 854 of file tracer.cpp.

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

855 {
856  plugin *retval = NULL;
857  try {
858  util::lock();
859  retval = new plugin(path, scope);
860  m_plugins->add(retval);
861  util::unlock();
862  return retval;
863  }
864 
865  catch (...) {
866  delete retval;
867  util::unlock();
868  throw;
869  }
870 }
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: