This topic has not yet been rated - Rate this topic

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

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

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.

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.

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).

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ