libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::process Class Reference

This class represents a process, its entire namespace and thread group. More...

#include <process.hpp>

+ Inheritance diagram for csdbg::process:
+ Collaboration diagram for csdbg::process:

Public Member Functions

 process ()
 Object default constructor. More...
 
 process (const process &)
 Object copy constructor. More...
 
virtual ~process ()
 Object destructor. More...
 
virtual processclone () const
 Object virtual copy constructor. More...
 
virtual pid_t pid () const
 Get the process ID. More...
 
virtual processoperator= (const process &)
 Assignment operator. More...
 
virtual u32 symbol_count () const
 Get the number of symbols. More...
 
virtual u32 module_count () const
 Get the number of modules. More...
 
virtual processadd_module (const i8 *, mem_addr_t)
 Add a symbol table to the namespace. The symbol table is loaded from a non stripped objective code file (executable or DSO library) More...
 
virtual const i8lookup (mem_addr_t)
 Lookup an address to resolve a symbol. More...
 
virtual const i8ilookup (mem_addr_t, mem_addr_t &) const
 Inverse lookup. Find the module (executable or DSO library) that defines a symbol and return its path and load base address. More...
 
virtual u32 thread_count () const
 Get the active thread count. More...
 
virtual threadcurrent_thread ()
 Get the currently executing thread. More...
 
virtual threadget_thread (pthread_t) const
 Get a thread by ID. More...
 
virtual threadget_thread (const i8 *) const
 Get a thread by name. More...
 
virtual threadget_thread (u32) const
 Get a thread by its offset in the active thread enumerator. More...
 
virtual processcleanup_thread (pthread_t)
 Cleanup libcsdbg-related thread resources upon thread cancellation. More...
 
- Public Member Functions inherited from csdbg::object
virtual ~object ()=0
 To be implemented. More...
 
virtual const i8class_name () const
 Query the class name of an object descending from csdbg::object. More...
 

Protected Member Functions

virtual processcache_add (mem_addr_t, const i8 *)
 Add a symbol to the lookup cache. More...
 
virtual const symbolcache_lookup (mem_addr_t) const
 Perform a cache lookup. More...
 

Protected Attributes

pid_t m_pid
 Process ID. More...
 
chain< thread > * m_threads
 Instrumented thread list. More...
 
chain< symtab > * m_modules
 Symbol table list. More...
 
chain< symbol > * m_symcache
 Lookup cache. More...
 

Detailed Description

This class represents a process, its entire namespace and thread group.

An object of this class is an abstraction of the actual debugged process. It stores the whole instrumented namespace and the details of all the simulated threads and their stacks. The namespace consists of a number of symbol tables, one for each objective code module (executable and selected DSO libraries). A process object offers methods to perform batch symbol lookups, inverse lookups (given a resolved symbol find the module that defines it) and thread handling. A lookup cache is used internally to optimize symbol resolving. Access to the process object is thread safe

Todo:
Create an object mutex

Definition at line 29 of file process.hpp.


The documentation for this class was generated from the following files: