libcsdbg  1.28
C++ exception (and generic) stack trace debug library
plugin.hpp
Go to the documentation of this file.
1 #ifndef _CSDBG_PLUGIN
2 #define _CSDBG_PLUGIN 1
3 
10 #include "./object.hpp"
11 
12 namespace csdbg {
13 
42 class plugin: virtual public object
43 {
44 protected:
45 
46  /* Protected variables */
47 
54  void *m_handle;
57  /* Protected generic methods */
58 
59  virtual plugin& destroy();
60 
61 public:
62 
63  /* Constructors, copy constructors and destructor */
64 
65  explicit plugin(const i8*, const i8* = NULL);
66 
68 
69  plugin(const plugin&);
70 
71  virtual ~plugin();
72 
73  virtual plugin* clone() const;
74 
75 
76  /* Accessor methods */
77 
78  virtual const i8* path() const;
79 
80 
81  /* Operator overloading methods */
82 
83  virtual plugin& operator=(const plugin&);
84 
85 
86  /* Generic methods */
87 
88  virtual modsym_t resolve(const i8*, const i8* = NULL) const;
89 
90  virtual plugin& begin(void*, void*) const;
91 
92  virtual plugin& end(void*, void*) const;
93 };
94 
95 }
96 
97 #endif
98 
modsym_t m_end
Instrumentation ending callback.
Definition: plugin.hpp:50
virtual plugin & begin(void *, void *) const
Begin instrumenting a function.
Definition: plugin.cpp:297
This abstract class serves as the root of the class hierarchy tree.
Definition: object.hpp:17
virtual plugin * clone() const
Object virtual copy constructor.
Definition: plugin.cpp:145
virtual const i8 * path() const
Get the module file path.
Definition: plugin.cpp:156
char i8
8-bit signed integer
Definition: config.hpp:72
Function instrumentation plugin.
Definition: plugin.hpp:42
Class csdbg::object definition.
virtual plugin & destroy()
Object deconstruction.
Definition: plugin.cpp:18
virtual plugin & operator=(const plugin &)
Assignment operator.
Definition: plugin.cpp:172
virtual ~plugin()
Object destructor.
Definition: plugin.cpp:127
modsym_t m_begin
Instrumentation starting callback.
Definition: plugin.hpp:48
i8 * m_path
Module file path.
Definition: plugin.hpp:52
void(* modsym_t)(void *, void *)
Plugin callback.
Definition: config.hpp:152
virtual modsym_t resolve(const i8 *, const i8 *=NULL) const
Resolve a module symbol.
Definition: plugin.cpp:225
plugin(const i8 *, const i8 *=NULL)
Object constructor.
Definition: plugin.cpp:44
void * m_handle
DSO handle (as provided by dlopen)
Definition: plugin.hpp:54
virtual plugin & end(void *, void *) const
End a function instrumentation.
Definition: plugin.cpp:316