2 #define _CSDBG_TRACER 1
12 #ifdef CSDBG_WITH_PLUGIN
15 #ifdef CSDBG_WITH_FILTER
47 #ifdef CSDBG_WITH_PLUGIN
50 #ifdef CSDBG_WITH_FILTER
57 static void on_lib_load() __attribute((constructor));
74 virtual tracer*
clone() const;
79 virtual tracer& operator=(const tracer&);
90 friend std::ostream& operator<<(std::ostream&, tracer&);
104 virtual tracer&
trace(
string&);
106 virtual tracer&
trace(
string&, pthread_t) const;
110 virtual tracer&
dump(
string&) const;
115 #ifdef CSDBG_WITH_PLUGIN
134 #ifdef CSDBG_WITH_FILTER
This abstract class serves as the root of the class hierarchy tree.
virtual const plugin * get_plugin(const i8 *) const
Get a registered plugin module (DSO)
virtual tracer & destroy()
Release object resources.
Lightweight, templated, doubly-linked list (using XOR linking)
char i8
8-bit signed integer
virtual u32 filter_count() const
Get the number of registered filters.
Function instrumentation plugin.
static tracer * interface()
Get the interface object.
A tracer object is the default interface to libcsdbg for the instrumentation functions and for the li...
static i32 on_dso_load(dl_phdr_info *, size_t, void *)
This is a dl_iterate_phdr (libdl) callback, called for each linked shared object. It loads the symbol...
virtual filter * get_filter(u32) const
Get a registered filter.
chain< plugin > * m_plugins
Instrumentation plugins.
process * m_proc
Process handle.
virtual tracer * clone() const
Object virtual copy constructor.
virtual tracer & trace(string &)
Create an exception stack trace using the simulated call stack of the current thread. The trace is appended to a string and the simulated stack is unwinded.
virtual filter * add_filter(const i8 *, bool, bool=true)
Register a filter.
static void on_lib_load() __attribute((constructor))
Library constructor.
virtual tracer & unwind()
Unwind the simulated call stack of the current thread.
virtual tracer & remove_plugin(const i8 *)
Unregister a plugin module (DSO)
Class csdbg::string definition.
void(* modsym_t)(void *, void *)
Plugin callback.
This class represents a process, its entire namespace and thread group.
virtual const plugin * add_plugin(const i8 *, const i8 *=NULL)
Register a plugin module (DSO)
virtual u32 plugin_count() const
Get the number of registered plugins.
unsigned int u32
32-bit unsigned integer
static string & addr2line(string &, const i8 *, mem_addr_t)
Given an address in an objective code file, extract from the gdb-related debug information, the equivalent source code file name and line and append it to a string buffer.
int i32
32-bit signed integer
virtual tracer & remove_filter(u32)
Unregister a filter.
virtual tracer & dump(string &) const
Create multiple stack traces using the simulated call stack of each thread. The traces are appended t...
chain< filter > * m_filters
Instrumentation filters.
virtual process * proc() const
Get the process handle.
Class csdbg::process definition.
unsigned long long mem_addr_t
64-bit memory address
Class csdbg::plugin definition.
Class csdbg::filter definition.
static void on_lib_unload() __attribute((destructor))
Library destructor.
static tracer * m_iface
Interface object.