The various contexts in which operating systems and to an extent general purpose applications get used in practice, pose a need to be able to extend certain functionalities to suit the specific context. With access to the appropriate sources, it is very trivial to embed or recast functionality by rebuilding the operating system or application. However, most operating systems and applications are commercial with binary-only releases. This entails a mechanism by which instrumentation has to be achieved regardless of the availability of sources and with minimal system downtime. We propose a "Retargetable Dynamic Framework" for instrumenting constructs at the binary level. It is retargetable in the sense that the framework can be easily adapted to various operating systems and machine architectures. It is dynamic owing to the flexibility of being able to enable or disable the instrumentation at will, capable of capturing dynamic invocations and being able to deploy itself in a newly created or an already existing process. This scheme is much more flexible than executable or dynamic library image manipulation, import redirection or source rebuilds. |