Patent ID: 6898785

Claim:
A computer-implemented method for instrumentation of selected functions in an executable program, the selected functions initially occupying an original address space of the executable program, comprising: generating instrumented versions of selected functions in relocation address space during program execution; when a function is called by an instrumented version of a selected function within the relocation address space resulting in a first return-pointer value in the relocation address space, identifying a location in the original address space corresponding to the first return-pointer value as an original return-pointer value, associating the first return-pointer value with the original return-pointer value, substituting references to the original return-pointer value for references to the first return-pointer value, and replacing an instruction at the address indicated by the original return-pointer value with a breakpoint; and when the breakpoint is encountered upon return of control at the original return-pointer value, obtaining the first return-pointer value associated with the original return-pointer value, and transferring control to an instruction at the address referenced by the first return-pointer value.