IDebugReference2
This interface represents a reference to a stack frame property or some other property.
Note
IDebugReference2
is reserved for future use, and all its methods should return E_NOTIMPL
.
Syntax
IDebugReference2 : IUnknown
Notes for Implementers
The DE implements this interface to represent a reference to a particular kind of value. For example, the value could be a numerical value as a result of an expression evaluation, a memory context used for displaying memory, or a list of registers and their values.
Notes for Callers
Call GetReference to obtain this interface. GetParent and GetDerivedMostReference also return this interface.
Methods in Vtable Order
The following table shows the methods of IDebugReference2
.
Method | Description |
---|---|
GetReferenceInfo | Gets the DEBUG_REFERENCE_INFO structure that describes this reference. |
SetValueAsString | Sets the value of this reference from a string. |
SetValueAsReference | Sets the value of this reference from another reference. |
EnumChildren | Enumerates the children of this reference. |
GetParent | Gets the parent of this reference. |
GetDerivedMostReference | Gets the most-derived reference of this reference. |
GetMemoryBytes | Gets the memory bytes to which this reference refers. |
GetMemoryContext | Gets a memory context for this reference. |
GetSize | Gets the size, in bytes, of this reference. |
SetReferenceType | Sets this reference type. |
Compare | Compares this reference with another. |
Remarks
Note
This use of "property" should not be confused with that meaning a member variable of a class, although an IDebugReference2
can represent such an entity.
- IDebugProperty2 represents a property, while
IDebugReference2
represents a reference to a property, typically a reference to an object in the program being debugged.
The main difference between a property and a reference is that a property refers to a named instance of an object, while a reference refers to an unnamed instance. For example, a property may refer to an object in the program's heap by "a.b"
. Another property may refer to the same object as "c.d"
. The way of referring to this property requires that "a.b"
or "c.d"
be in scope. A reference to this same object is nameless; the object can be referred to as long as the memory for that object is valid.
An IDebugProperty2
interface can be thought of as a value with a name, a type, and an address. An IDebugReference2
, on the other hand, can be thought of as a type and an address.
Requirements
Header: msdbg.h
Namespace: Microsoft.VisualStudio.Debugger.Interop
Assembly: Microsoft.VisualStudio.Debugger.Interop.dll