Patent ID: 7712082

Claim:
A method, comprising: exposing a stackwalking function associated with a call stack in a managed execution environment, the call stack including at least one frame of managed code and at least one frame of unmanaged code; wherein a request to the stackwalking function for the call stack is made on a thread not associated with the call stack, and wherein the stackwalking function preserves a context for a thread associated with the call stack until the stackwalking function ends; granting access to the stackwalking function, wherein granting includes: when a point on the call stack is designated in a request for the stackwalking function, allowing the stackwalking function to commence at the point on the call stack, and when no point on the call stack is designated in the request for the stackwalking function, determining a default position on the call stack by determining a last managed frame pushed onto the call stack and allowing the stackwalking function to commence at the default position on the call stack, the default position being the last managed frame pushed onto the call stack; and performing the stackwalking function.