Patent ID: 7131115

Claim:
A computer-implemented method for handling call stack unwinding when execution of an instrumented program is stopped in a first function of the instrumented program, comprising: attaching an instrumenter program to the instrumented program; establishing a shared memory area for use by the instrumented program and the instrumenter program: creating a breakpoint function that includes a breakpoint that transfers control to the instrumenter program; intercepting a call to a second function of unwind software that returns a reference to unwind information associated with the first function of the instrumented program, the unwind information including references to locations of selected instructions in the function; creating an instrumented version of a third function of the unwind software, wherein the instrumented version of the third function returns a function pointer to the breakpoint function instead of returning a function pointer to the second function; if the first function of the instrumented program is instrumented with instrumentation code, then creating updated unwind information that includes updated references to the locations of the selected instructions in the first function as offset by the instrumentation code and returning a reference to the updated unwind information; storing the undated unwind information in the shared memory area; invoking the instrumented version of the third function when the unwinding is initiated; and executing the breakpoint function when the function pointer to the breakpoint function is returned from the instrumented version of the third function.