ICorDebugThread::EnumerateChains Method

Gets an interface pointer to an ICorDebugChainEnum enumerator that contains all the stack chains in this ICorDebugThread object.


HRESULT EnumerateChains (
    [out] ICorDebugChainEnum **ppChains
);

ppChains

[out] A pointer to the address of an ICorDebugChainEnum object that allows enumeration of all the stack chains in this thread, starting at the active (that is, the most recent) chain.

The stack chain represents the physical call stack for the thread. The following circumstances create a stack chain boundary:

  • A managed-to-unmanaged or unmanaged-to-managed transition.

  • A context switch.

  • A debugger hijacking of a user thread.

In the simple case for a thread that is running purely managed code in a single context, a one-to-one correspondence will exist between threads and stack chains.

A debugger may want to rearrange the physical call stacks of all threads into logical call stacks. This would involve sorting all the threads' chains by their caller/callee relationships and regrouping them.

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Version: 2.0, 1.1, 1.0

Community Additions

ADD
Show: