libcsdbg
1.28
C++ exception (and generic) stack trace debug library
|
This class represents a thread of execution in the instrumented process. More...
#include <thread.hpp>
Public Member Functions | |
thread (const i8 *=NULL) | |
Object constructor. More... | |
thread (const thread &) | |
Object copy constructor. More... | |
virtual | ~thread () |
Object destructor. More... | |
virtual thread * | clone () const |
Object virtual copy constructor. More... | |
virtual const i8 * | name () const |
Get the thread name. More... | |
virtual pthread_t | handle () const |
Get the thread handle. More... | |
virtual i32 | lag () const |
Get the size (call depth) of the simulated call stack with respect to the real call stack, the number of calls that must be popped off the simulated stack to match the real one. More... | |
virtual thread & | set_name (const i8 *) |
Set the thread name. More... | |
virtual thread & | operator= (const thread &) |
Assignment operator. More... | |
virtual bool | is_current () const |
Check if this is the currently executing thread. More... | |
virtual u32 | call_depth () const |
Get the size (call depth) of the simulated call stack. More... | |
virtual const call * | backtrace (u32) const |
Peek at the simulated call stack. More... | |
virtual thread & | called (mem_addr_t, mem_addr_t, const i8 *) |
Simulate a function call. More... | |
virtual thread & | returned () |
Simulate a function return. More... | |
virtual thread & | unwind () |
Unwind the simulated call stack to meet the real call stack. More... | |
virtual thread & | foreach (void(*)(u32, call *)) const |
Traverse the simulated stack with a callback for each call. 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 Attributes | |
i8 * | m_name |
Thread name. More... | |
pthread_t | m_handle |
Thread handle. More... | |
stack< call > * | m_stack |
Simulated call stack. More... | |
i32 | m_lag |
The number of calls that must be popped off the simulated stack for it to match the real one. More... | |
This class represents a thread of execution in the instrumented process.
An object of this class is an abstraction of the actual threading system. It stores the simulated call stack and other thread specific data and it is used to track a thread execution. The simulated call stack can be traversed using simple callbacks and method thread::foreach. Currently only POSIX threads are
supported
Definition at line 27 of file thread.hpp.