Binary Instrumentation

From TracingWiki

(Redirected from Binary instrumentation)
Jump to: navigation, search

TracingBook : Binary Instrumentation


Binary instrumentation consists in adding tracepoints to an already compiled application. This may be done statically, before the application is started, or dynamically, while the application is running. The challenge is to add the new instructions, for instance tracepoints, while not changing the rest of the program.

If instrumentation instructions are inserted and the instructions previously there displaced, one must insure that any reference to a displaced instruction, or relative to a displaced instruction, is updated accordingly. On the other hand, if the instrumentation instructions overwrite existing instructions, there should be a mechanism to execute the overwritten instructions.

Personal tools