다음을 통해 공유


IDebugCodeContext2

This interface represents the starting position of a code instruction. For most run-time architectures today, a code context can be thought of as an address in a program's execution stream.

IDebugCodeContext2 : IDebugMemoryContext2

Notes for Implementers

The debug engine implements this interface to relate the position of a code instruction to a document position.

Notes for Callers

Methods on many interfaces return this interface, most typically, IDebugStackFrame2::GetCodeContext. It is also used extensively with the IDebugDisassemblyStream2 interface as well as in breakpoint resolution information.

Methods in Vtable Order

In addition to the methods on the IDebugMemoryContext2 interface, this interface implements the following methods:

Method

Description

IDebugCodeContext2::GetDocumentContext

Gets the document context that corresponds to the active code context.

IDebugCodeContext2::GetLanguageInfo

Gets the language information for this code context.

Remarks

The key difference between an IDebugCodeContext2 interface and an IDebugMemoryContext2 interface is that an IDebugCodeContext2 is always instruction-aligned. This means that an IDebugCodeContext2 is always pointing to the beginning of an instruction, whereas an IDebugMemoryContext2 may point to any byte of memory in the run-time architecture. IDebugCodeContext2 is incremented by instructions rather than by the basic storage size (typically byte).

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See Also

Reference

IDebugProgram2::GetDisassemblyStream

IDebugThread2::CanSetNextStatement

IDebugThread2::SetNextStatement

IDebugCanStopEvent2::GetCodeContext

IDebugStackFrame2::GetCodeContext

IEnumDebugCodeContexts2::Next

IDebugMemoryContext2