Method and apparatus for handling call stack unwinding when execution of
an instrumented program is stopped in a first function of the
instrumented program. When unwinding is initiated and a call to a second
function of unwind software is made, the call to the second function is
intercepted. The second function returns a reference to unwind
information associated with the first function of the instrumented
program. The unwind information includes references to locations of
selected instructions in the function. If the first function of the
instrumented program is instrumented with instrumentation code, then
updated unwind information is created. The updated unwind information
includes updated references to the locations of the selected instructions
in the first function as offset by the instrumentation code. A reference
to the updated unwind information is returned.