Legal claims defining the scope of protection, as filed with the USPTO.
1. 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.
2. The method of claim 1 , further comprising storing instrumented functions of the instrumented program in the shared memory area.
3. The method of claim 1 , further comprising storing the breakpoint function and instrumented version of the third function in the shared memory area.
4. The method of claim 1 , further comprising: obtaining an instruction pointer value of the location in the first function of the instrumented program at which execution was stopped; and determining whether the first function of the instrumented program is instrumented by reference to whether the instruction pointer value is within address ranges of modules of the instrumented program.
5. The method of claim 1 , further comprising creating the breakpoint function and the instrumented version of the third function upon loading the instrumented program.
6. An apparatus for handling call stack unwinding when execution of an instrumented program is stopped in a first function of the instrumented program, comprising: means for attaching an instrumenter program to the instrumented program; means for establishing a shared memory area for use by the instrumented program and the instrumenter program; means for creating a breakpoint function that includes a breakpoint that transfers control to the instrumenter program; means for 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; means for 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; means for 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, if the first function of the instrumented program is instrumented with instrumentation code; means for storing the updated unwind information in the shared memory area; means for invoking the instrumented version of the third function when the unwinding is initiated; and means for executing the breakpoint function when the function pointer to the breakpoint function is returned from the instrumented version of the third function.
Unknown
October 31, 2006
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.