libcsdbg  1.28
C++ exception (and generic) stack trace debug library
process & csdbg::process::add_module ( const i8 path,
mem_addr_t  base 
)
virtual

Add a symbol table to the namespace. The symbol table is loaded from a non stripped objective code file (executable or DSO library)

Parameters
[in]paththe path of the objective code file
[in]basethe load base address
Returns
*this
Exceptions
std::bad_alloc
csdbg::exception

Definition at line 236 of file process.cpp.

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

Referenced by csdbg::tracer::on_dso_load(), and csdbg::tracer::on_lib_load().

237 {
238  util::lock();
239  symtab *tbl = NULL;
240  try {
241  tbl = new symtab(path, base);
242  m_modules->add(tbl);
243  util::unlock();
244  return *this;
245  }
246 
247  catch (...) {
248  delete tbl;
249  util::unlock();
250  throw;
251  }
252 }
chain< symtab > * m_modules
Symbol table list.
Definition: process.hpp:39
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:

+ Here is the caller graph for this function: