C# Класс PowerStudio.DebugEngine.CodeDocumentContext

Наследование: IDebugDocumentContext2, IDebugCodeContext2, IEnumDebugCodeContexts2, IDebugMemoryContext2
Показать файл Открыть проект

Открытые методы

Метод Описание
Add ( ulong dwCount, IDebugMemoryContext2 &ppMemCxt ) : int

Adds the specified value to the current context and returns a new context.

A memory context is an address, so adding a value to an address produces a new address that requires a new context interface. This method must always produce a new context, even if the resulting address is outside the memory space associated with this context. The only exception to this is if no memory can be allocated for the new context or if ppMemCxt is a null value (which is an error).

Clone ( IEnumDebugCodeContexts2 &ppEnum ) : int

Returns a copy of the current enumeration as a separate object.

The copy of the enumeration has the same state as the original at the time this method is called. However, the copy's and the original's states are separate and can be changed individually.

Compare ( enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2 rgpMemoryContextSet, uint dwMemoryContextSetLen, uint &pdwMemoryContext ) : int

Compares the memory context to each context in the given array in the manner indicated by compare flags, returning an index of the first context that matches.

A debug engine (DE) does not have to support all types of comparisons, but it must support at least CONTEXT_EQUAL, CONTEXT_LESS_THAN, CONTEXT_GREATER_THAN and CONTEXT_SAME_SCOPE.

Compare ( enum_DOCCONTEXT_COMPARE Compare, IDebugDocumentContext2 rgpDocContextSet, uint dwDocContextSetLen, uint &pdwDocContext ) : int

Compares this document context to a given array of document contexts.

The IDebugDocumentContext2 objects that are passed in the array must be implemented by the same debug engine that implements the IDebugDocumentContext2 object being called on; otherwise, the comparison is not valid.

EnumCodeContexts ( IEnumDebugCodeContexts2 &ppEnumCodeCxts ) : int

Retrieves a list of all code contexts associated with this document context.

A single document context can generate multiple code contexts when the document is using templates or include files.

GetCount ( uint &pcelt ) : int

Returns the number of elements in the enumeration.

This method is not part of the customary COM enumeration interface which specifies that only the Next, Clone, Skip, and Reset methods need to be implemented.

GetDocument ( IDebugDocument2 &ppDocument ) : int

Gets the document that contains this document context.

GetDocumentContext ( IDebugDocumentContext2 &ppSrcCxt ) : int

Gets the document context that corresponds to this code context. The document context represents a position in the source file that corresponds to the source code that generated this instruction.

Generally, the document context can be thought of as a position in a source file while the code context is a position of a code instruction in an execution stream.

GetInfo ( enum_CONTEXT_INFO_FIELDS dwFields, CONTEXT_INFO pinfo ) : int

Retrieves a CONTEXT_INFO structure that describes the context.

GetLanguageInfo ( string &pbstrLanguage, System.Guid &pguidLanguage ) : int

Gets the language information for this code context.

At least one of the parameters must return a non-null value.

GetName ( enum_GETNAME_TYPE gnType, string &pbstrFileName ) : int

Gets the displayable name of the document that contains this document context.

This method typically forwards the call to the IDebugDocument2::GetName method, unless the document context is written to store the document name itself.

GetName ( string &pbstrName ) : int

Retrieves the user-displayable name for this context.

The name of a memory context is not normally used.

GetSourceRange ( TEXT_POSITION pBegPosition, TEXT_POSITION pEndPosition ) : int

Gets the source code range of this document context.

A source range is the entire range of source code, from the current statement back to just after the previous statement that contributed code. The source range is typically used for mixing source statements, including comments, with code in the disassembly window. To get the range for just the code statements contained within this document context, call the IDebugDocumentContext2::GetStatementRange method.

GetStatementRange ( TEXT_POSITION pBegPosition, TEXT_POSITION pEndPosition ) : int

Gets the file statement range of the document context.

A statement range is the range of the lines that contributed the code to which this document context refers. To obtain the range of source code (including comments) within this document context, call the IDebugDocumentContext2::GetSourceRange method.

Next ( uint celt, IDebugCodeContext2 rgelt, uint &pceltFetched ) : int

Returns the next set of elements from the enumeration.

Reset ( ) : int

Resets the enumeration to the first element.

After this method is called, the next call to the IEnumDebugCodeContexts2::Next method returns the first element of the enumeration.

Seek ( int nCount, IDebugDocumentContext2 &ppDocContext ) : int

Moves the document context by a given number of statements or lines.

Skip ( uint celt ) : int

Skips over the specified number of elements.

If celt specifies a value greater than the number of remaining elements, the enumeration is set to the end and S_FALSE is returned.

Subtract ( ulong dwCount, IDebugMemoryContext2 &ppMemCxt ) : int

Subtracts the specified value from the current context and returns a new context.

A memory context is an address, so subtracting a value from an address produces a new address that requires a new context interface. This method must always produce a new context, even if the resulting address is outside the memory space associated with this context. The only exception to this is if no memory can be allocated for the new context or if ppMemCxt is a null value (which is an error).

Описание методов

Add() публичный Метод

Adds the specified value to the current context and returns a new context.
A memory context is an address, so adding a value to an address produces a new address that requires a new context interface. This method must always produce a new context, even if the resulting address is outside the memory space associated with this context. The only exception to this is if no memory can be allocated for the new context or if ppMemCxt is a null value (which is an error).
public Add ( ulong dwCount, IDebugMemoryContext2 &ppMemCxt ) : int
dwCount ulong The value to add to the current context.
ppMemCxt IDebugMemoryContext2 Returns a new IDebugMemoryContext2 object.
Результат int

Clone() публичный Метод

Returns a copy of the current enumeration as a separate object.
The copy of the enumeration has the same state as the original at the time this method is called. However, the copy's and the original's states are separate and can be changed individually.
public Clone ( IEnumDebugCodeContexts2 &ppEnum ) : int
ppEnum IEnumDebugCodeContexts2 Returns a copy of this enumeration as a separate object.
Результат int

Compare() публичный Метод

Compares the memory context to each context in the given array in the manner indicated by compare flags, returning an index of the first context that matches.
A debug engine (DE) does not have to support all types of comparisons, but it must support at least CONTEXT_EQUAL, CONTEXT_LESS_THAN, CONTEXT_GREATER_THAN and CONTEXT_SAME_SCOPE.
public Compare ( enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2 rgpMemoryContextSet, uint dwMemoryContextSetLen, uint &pdwMemoryContext ) : int
Compare enum_CONTEXT_COMPARE A value from the CONTEXT_COMPARE enumeration that determines the type of comparison.
rgpMemoryContextSet IDebugMemoryContext2 An array of references to the IDebugMemoryContext2 objects to compare against.
dwMemoryContextSetLen uint The number of contexts in the rgpMemoryContextSet array.
pdwMemoryContext uint Returns the index of the first memory context that satisfies the comparison.
Результат int

Compare() публичный Метод

Compares this document context to a given array of document contexts.
The IDebugDocumentContext2 objects that are passed in the array must be implemented by the same debug engine that implements the IDebugDocumentContext2 object being called on; otherwise, the comparison is not valid.
public Compare ( enum_DOCCONTEXT_COMPARE Compare, IDebugDocumentContext2 rgpDocContextSet, uint dwDocContextSetLen, uint &pdwDocContext ) : int
Compare enum_DOCCONTEXT_COMPARE A value from the DOCCONTEXT_COMPARE enumeration that specifies the type of comparison.
rgpDocContextSet IDebugDocumentContext2 An array of IDebugDocumentContext2 objects that represent the document contexts being compared to.
dwDocContextSetLen uint The length of the array of document contexts to compare.
pdwDocContext uint Returns the index into the rgpDocContextSet array of the first document context that satisfies the comparison.
Результат int

EnumCodeContexts() публичный Метод

Retrieves a list of all code contexts associated with this document context.
A single document context can generate multiple code contexts when the document is using templates or include files.
public EnumCodeContexts ( IEnumDebugCodeContexts2 &ppEnumCodeCxts ) : int
ppEnumCodeCxts IEnumDebugCodeContexts2 Returns an IEnumDebugCodeContexts2 object that contains a list of code contexts.
Результат int

GetCount() публичный Метод

Returns the number of elements in the enumeration.
This method is not part of the customary COM enumeration interface which specifies that only the Next, Clone, Skip, and Reset methods need to be implemented.
public GetCount ( uint &pcelt ) : int
pcelt uint Returns the number of elements in the enumeration.
Результат int

GetDocument() публичный Метод

Gets the document that contains this document context.
public GetDocument ( IDebugDocument2 &ppDocument ) : int
ppDocument IDebugDocument2 Returns an IDebugDocument2 object that represents the document that contains this document context.
Результат int

GetDocumentContext() публичный Метод

Gets the document context that corresponds to this code context. The document context represents a position in the source file that corresponds to the source code that generated this instruction.
Generally, the document context can be thought of as a position in a source file while the code context is a position of a code instruction in an execution stream.
public GetDocumentContext ( IDebugDocumentContext2 &ppSrcCxt ) : int
ppSrcCxt IDebugDocumentContext2 Returns the IDebugDocumentContext2 object that corresponds to the code context.
Результат int

GetInfo() публичный Метод

Retrieves a CONTEXT_INFO structure that describes the context.
public GetInfo ( enum_CONTEXT_INFO_FIELDS dwFields, CONTEXT_INFO pinfo ) : int
dwFields enum_CONTEXT_INFO_FIELDS A combination of flags from the CONTEXT_INFO_FIELDS enumeration that indicate which fields of the CONTEXT_INFO structure are to be fill in.
pinfo CONTEXT_INFO The CONTEXT_INFO structure that is filled in.
Результат int

GetLanguageInfo() публичный Метод

Gets the language information for this code context.
At least one of the parameters must return a non-null value.
public GetLanguageInfo ( string &pbstrLanguage, System.Guid &pguidLanguage ) : int
pbstrLanguage string Returns a string that contains the name of the language, such as "C++."
pguidLanguage System.Guid Returns the GUID for the language of the code context, for example, guidCPPLang.
Результат int

GetName() публичный Метод

Gets the displayable name of the document that contains this document context.
This method typically forwards the call to the IDebugDocument2::GetName method, unless the document context is written to store the document name itself.
public GetName ( enum_GETNAME_TYPE gnType, string &pbstrFileName ) : int
gnType enum_GETNAME_TYPE A value from the GETNAME_TYPE enumeration that specifies the type of name to return.
pbstrFileName string Returns the name of the file.
Результат int

GetName() публичный Метод

Retrieves the user-displayable name for this context.
The name of a memory context is not normally used.
public GetName ( string &pbstrName ) : int
pbstrName string Returns the name of the memory context.
Результат int

GetSourceRange() публичный Метод

Gets the source code range of this document context.
A source range is the entire range of source code, from the current statement back to just after the previous statement that contributed code. The source range is typically used for mixing source statements, including comments, with code in the disassembly window. To get the range for just the code statements contained within this document context, call the IDebugDocumentContext2::GetStatementRange method.
public GetSourceRange ( TEXT_POSITION pBegPosition, TEXT_POSITION pEndPosition ) : int
pBegPosition TEXT_POSITION A TEXT_POSITION structure that is filled in with the starting position. Set this argument to a null value if this information is not needed.
pEndPosition TEXT_POSITION A TEXT_POSITION structure that is filled in with the ending position. Set this argument to a null value if this information is not needed.
Результат int

GetStatementRange() публичный Метод

Gets the file statement range of the document context.
A statement range is the range of the lines that contributed the code to which this document context refers. To obtain the range of source code (including comments) within this document context, call the IDebugDocumentContext2::GetSourceRange method.
public GetStatementRange ( TEXT_POSITION pBegPosition, TEXT_POSITION pEndPosition ) : int
pBegPosition TEXT_POSITION A TEXT_POSITION structure that is filled in with the starting position. Set this argument to a null value if this information is not needed.
pEndPosition TEXT_POSITION A TEXT_POSITION structure that is filled in with the ending position. Set this argument to a null value if this information is not needed.
Результат int

Next() публичный Метод

Returns the next set of elements from the enumeration.
public Next ( uint celt, IDebugCodeContext2 rgelt, uint &pceltFetched ) : int
celt uint The number of elements to retrieve. Also specifies the maximum size of the rgelt array.
rgelt IDebugCodeContext2 Array of IDebugCodeContext2 elements to be filled in.
pceltFetched uint Returns the number of elements actually returned in rgelt.
Результат int

Reset() публичный Метод

Resets the enumeration to the first element.
After this method is called, the next call to the IEnumDebugCodeContexts2::Next method returns the first element of the enumeration.
public Reset ( ) : int
Результат int

Seek() публичный Метод

Moves the document context by a given number of statements or lines.
public Seek ( int nCount, IDebugDocumentContext2 &ppDocContext ) : int
nCount int The number of statements or lines to move ahead, depending on the document context.
ppDocContext IDebugDocumentContext2 Returns a new IDebugDocumentContext2 object with the new position.
Результат int

Skip() публичный Метод

Skips over the specified number of elements.
If celt specifies a value greater than the number of remaining elements, the enumeration is set to the end and S_FALSE is returned.
public Skip ( uint celt ) : int
celt uint Number of elements to skip.
Результат int

Subtract() публичный Метод

Subtracts the specified value from the current context and returns a new context.
A memory context is an address, so subtracting a value from an address produces a new address that requires a new context interface. This method must always produce a new context, even if the resulting address is outside the memory space associated with this context. The only exception to this is if no memory can be allocated for the new context or if ppMemCxt is a null value (which is an error).
public Subtract ( ulong dwCount, IDebugMemoryContext2 &ppMemCxt ) : int
dwCount ulong The number of memory bytes to decrement.
ppMemCxt IDebugMemoryContext2 Returns a new IDebugMemoryContext2 object.
Результат int