libcsdbg
1.28
C++ exception (and generic) stack trace debug library
|
This class represents a process, its entire namespace and thread group. More...
#include <process.hpp>
Public Member Functions | |
process () | |
Object default constructor. More... | |
process (const process &) | |
Object copy constructor. More... | |
virtual | ~process () |
Object destructor. More... | |
virtual process * | clone () const |
Object virtual copy constructor. More... | |
virtual pid_t | pid () const |
Get the process ID. More... | |
virtual process & | operator= (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 process & | add_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 i8 * | lookup (mem_addr_t) |
Lookup an address to resolve a symbol. More... | |
virtual const i8 * | ilookup (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 thread * | current_thread () |
Get the currently executing thread. More... | |
virtual thread * | get_thread (pthread_t) const |
Get a thread by ID. More... | |
virtual thread * | get_thread (const i8 *) const |
Get a thread by name. More... | |
virtual thread * | get_thread (u32) const |
Get a thread by its offset in the active thread enumerator. More... | |
virtual process & | cleanup_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 i8 * | class_name () const |
Query the class name of an object descending from csdbg::object. More... | |
Protected Member Functions | |
virtual process & | cache_add (mem_addr_t, const i8 *) |
Add a symbol to the lookup cache. More... | |
virtual const symbol * | cache_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... | |
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
Definition at line 29 of file process.hpp.