usb: getting string descriptors, minor improvements
[quarnos.git] / manes / ods / gcc4_x86_injector.h
blob06b359eb56e01969eab724967642b2b9198aa1ed
1 /*
2 * Execution Flow Controller
3 * Function Injector for GCC 4.x
4 */
6 namespace manes {
7 namespace ods {
8 /**
9 * @brief Injector for GCC4 x86
10 * @details This is procedure call injector that works on GCC 4
11 * x86 and compatible.
13 class gcc4_x86_injector : public injector {
14 private:
15 void *get_vptr(void *instance);
17 public:
18 /**
19 * @brief Hack vtable.
21 * @details Replaces default vtable entries with addresses of injected function which code
22 * is placed in vcall.S at label vcall. Note that functions are injected to all
23 * instances of the specific class at the same time.
24 * @param object Pointer to an instance of class that code has to be injected to.
26 virtual void inject(void *obj);