IDiaSymbol
Describes the properties of a symbol instance.
IDiaSymbol : IUnknown
Methods in Alphabetical Order
The following table shows the methods of IDiaSymbol.
Note
Symbols will return meaningful data for only some of these methods, depending on the type of symbol. If a method returns S_OK, then that method has returned meaningful data.
Method |
Description |
---|---|
Retrieves all children of the symbol. |
|
Retrieves the children of the symbol. This method is the extended version of IDiaSymbol::findChildren. |
|
Retrieves the children of the symbol that are valid at a specified address. |
|
Retrieves the children of the symbol that are valid at a specified relative virtual address (RVA). |
|
Retrieves the children of the symbol that are valid at a specified virtual address. |
|
Retrieves an enumeration that allows a client to iterate through all of the inline frames on a given address. |
|
Retrieves an enumeration that allows a client to iterate through all of the inline frames on a specified relative virtual address (RVA). |
|
Retrieves an enumeration that allows a client to iterate through all of the inline frames on a specified virtual address (VA). |
|
Retrieves an enumeration that allows a client to iterate through the line number information of all functions that are inlined, directly or indirectly, in this symbol. |
|
Retrieves an enumeration that allows a client to iterate through the line number information of all functions that are inlined, directly or indirectly, in this symbol within the specified address range. |
|
Retrieves an enumeration that allows a client to iterate through the line number information of all functions that are inlined, directly or indirectly, in this symbol within the specified relative virtual address (RVA). |
|
Retrieves an enumeration that allows a client to iterate through the line number information of all functions that are inlined, directly or indirectly, in this symbol within the specified virtual address (VA). |
|
Given a corresponding tag value, this method returns an enumeration of symbols that are contained in this stub function at a specified relative virtual address. |
|
Returns the number of accelerator pointer tags in a C++ AMP stub function. |
|
Returns all accelerator pointer tag values that correspond to a C++ AMP accelerator stub function. |
|
Retrieves the access modifier of a class member. |
|
Retrieves the offset part of an address location. |
|
Retrieves the section part of an address location. |
|
Retrieves a flag indicating whether another symbol references this address. |
|
Retrieves the age value of a program database. |
|
Retrieves the symbol identifier of the array index type. |
|
Retrieves the array index type identifier of the symbol. |
|
Retrieves the back-end major version number. |
|
Retrieves the back-end minor version number. |
|
Retrieves the back-end build number. |
|
Retrieves the base data offset. |
|
Retrieves the base data slot. |
|
Retrieves the symbol from which the pointer is based. |
|
Retrieves the symbol ID from which the pointer is based. |
|
Retrieves the type tag of a simple type. |
|
Retrieves the bit position of a location. |
|
Retrieves a built-in kind of the HLSL type. |
|
Returns an indicator of a method's calling convention. |
|
Retrieves a reference to the class parent of the symbol. |
|
Retrieves the class parent identifier of the symbol. |
|
Retrieves a flag indicating whether the symbol refers to a code address. |
|
Retrieves a flag indicating whether the symbol was compiler-generated. |
|
Retrieves the name of the compiler used to create the Compiland. |
|
Retrieves a flag indicating whether the user-defined data type has a constructor. |
|
Retrieves the containing symbol of this symbol. |
|
Retrieves a flag indicating whether the user-defined data type is constant. |
|
Retrieves the number of items in a list or array. |
|
Retrieves the number of valid address ranges associated with the local symbol. |
|
Retrieves a flag indicating whether the function uses a custom calling convention. |
|
Retrieves the data bytes of an OEM symbol. |
|
Retrieves the variable classification of a data symbol. |
|
Retrieves the flag describing the Edit and Continue features of the compiled program or unit. |
|
Retrieves a flag indicating whether the function uses a far return. |
|
Retrieves the front-end major version number. |
|
Retrieves the front-end minor version number. |
|
Retrieves the front-end build number. |
|
Retrieves a flag indicating whether the public symbol refers to a function. |
|
Retrieves the symbol's GUID. |
|
Retrieves a flag indicating whether the function contains a call to alloca. |
|
Retrieves a flag indicating whether the user-defined data type has any assignment operators defined. |
|
Retrieves a flag indicating whether the user-defined data type has any cast operators defined. |
|
Retrieves a flag indicating whether the compiland contains any debugging information. |
|
Retrieves a flag indicating whether the function has a C++-style exception handler. |
|
Retrieves a flag indicating whether the function has an asynchronous exception handler. |
|
Retrieves a flag indicating whether the function has inline assembly. |
|
Retrieves a flag indicating whether the function contains a longjmp command (part of C-style exception handling). |
|
Retrieves a flag indicating whether the module contains managed code. |
|
Retrieves a flag indicating whether the user-defined data type has nested type definitions. |
|
Retrieves a flag indicating whether the function or compiland has security checks compiled in (via the /GS (Buffer Security Check) compiler switch). |
|
Retrieves a flag indicating whether the function has Win32-style Structured Exception Handling. |
|
Retrieves a flag indicating whether the function contains a setjmp command. |
|
Retrieves a flag indicating whether the user-defined data type is an indirect virtual base class. |
|
Retrieves a flag indicating whether the function has been marked with the inline attribute. |
|
Retrieves a flag indicating whether the function has a return from interrupt instruction. |
|
Retrieves a flag indicating whether the function is the base class virtual function. |
|
Retrieves a flag that indicates whether the symbol corresponds to a group shared local variable in code compiled for a C++ AMP Accelerator. |
|
Retrieves a flag that indicates whether the symbol corresponds to the definition range symbol for the tag component of a pointer variable in code compiled for a C++ AMP Accelerator. The definition range symbol is the location of a variable for a span of addresses. |
|
Indicates whether the symbol corresponds to a top-level function symbol for a shader compiled for an accelerator that corresponds to a parallel_for_each call. |
|
Retrieves a flag indicating whether the data is part of an aggregate of many symbols. |
|
Retrieves a flag indicating whether the symbol file contains C types. |
|
Retrieves a flag indicating whether the module was converted from Common Intermediate Language (CIL) to native code. |
|
Retrieves a flag indicating whether the elements of a user-defined data type are aligned to a specific boundary. |
|
Specifies whether this symbol represents High Level Shader Language (HLSL) data. |
|
Retrieves a flag indicating whether the module was compiled with the /hotpatch (Create Hotpatchable Image) compiler switch. |
|
Retrieves a flag indicating whether the managed compiland was linked with the linker's LTCG. |
|
Specifies whether the matrix is row major. |
|
Retrieves a flag indicating whether the managed compiland is a .netmodule (containing only metadata). |
|
Specifies whether the this pointer points to a data member with multiple inheritance. |
|
Retrieves a flag indicating whether the function has the naked (C++) attribute. |
|
Specifies whether the variable is optimized away. |
|
Specifies whether the this pointer is based on a symbol value. |
|
Specifies whether this symbol is a pointer to a data member. |
|
Specifies whether this symbol is a pointer to a member function. |
|
Specifies whether the variable carries a return value. |
|
Specifies whether the module is compiled with the /SDL option. |
|
Specifies whether the this pointer points to a data member with single inheritance. |
|
Retrieves a flag indicating whether the data has been split into an aggregate of separate symbols. |
|
Retrieves a flag indicating whether a function or thunk layer is static. |
|
Retrieves a flag indicating whether private symbols have been stripped from the symbol file. |
|
Specifies whether the this pointer points to a data member with virtual inheritance. |
|
Retrieves the language of the source. |
|
Retrieves the number of bytes of memory used by the object represented by this symbol. |
|
Retrieves a reference to the lexical parent of the symbol. |
|
Retrieves the lexical parent identifier of the symbol. |
|
Retrieves the file name of the library or object file from which the object was loaded. |
|
Returns the length of the address range in which the local symbol is valid. |
|
Returns the section part of the starting address range in which the local symbol is valid. |
|
Returns the offset part of the starting address range in which the local symbol is valid. |
|
Returns the start of the address range in which the local symbol is valid. |
|
Retrieves the location type of a data symbol. |
|
Retrieves the lower bound of a FORTRAN array dimension. |
|
Retrieves the symbol identifier of the lower bound of a FORTRAN array dimension. |
|
Retrieves the type of the target CPU. |
|
Retrieves a flag that indicating whether the symbol refers to managed code. |
|
Retrieves the memory space kind. |
|
Retrieves a flag indicating whether the symbol refers to Microsoft Intermediate Language (MSIL) code. |
|
Retrieves the name of the symbol. |
|
Retrieves a flag indicating whether the user-defined data type is nested. |
|
Retrieves a flag indicating whether the function is marked with the noinline attribute. |
|
Retrieves a flag indicating whether the function has been declared with the noreturn attribute. |
|
Retrieves a flag indicating whether no stack ordering could be done as part of stack buffer checking. |
|
Retrieves a flag indicating whether the function or label is never reached. |
|
Returns the number of accelerator pointer tags in a C++ AMP stub function. |
|
Retrieves the number of modifiers that are applied to the original type. |
|
Retrieves the number of register indices. |
|
Retrieves the number of rows in the matrix. |
|
Retrieves the number of columns in the matrix. |
|
Retrieves the object file name. |
|
Retrieves the type of the object pointer for a class method. |
|
Retrieves the symbol's oemId value. |
|
Retrieves the symbol's oemSymbolId value. |
|
Retrieves the offset of the symbol location. |
|
Retrieves a flag indicating whether the function or label contains optimized code as well as debug information. |
|
Retrieves a flag indicating whether the user-defined data type has overloaded operators. |
|
Retrieves a flag indicating whether the user-defined data type is packed. |
|
Retrieves the platform type for which the program or compiland was compiled. |
|
Retrieves a flag that indicating whether the function is pure virtual. |
|
Retrieves the rank of a FORTRAN multidimensional array. |
|
Retrieves a flag indicating whether a pointer type is a reference. |
|
Retrieves the register designator of the location. |
|
Retrieves the register type. |
|
Retrieves the relative virtual address (RVA) of the location. |
|
Specifies whether the this pointer is flagged as restricted. |
|
Retrieves the sampler slot. |
|
Retrieves a flag indicating whether the user-defined data type appears in a nonglobal lexical scope. |
|
Retrieves the symbol's signature value. |
|
Retrieves the size of a member of a user-defined type. |
|
Retrieves the slot number of the location. |
|
Retrieves the file name of the source file. |
|
Retrieves the source file and line number that indicate where a specified user-defined type is defined. |
|
Retrieves the stride of the matrix or strided array. |
|
Retrieves the sub type. |
|
Retrieves the sub type ID. |
|
Retrieves the name of the file from which the symbols were loaded. |
|
Retrieves the unique symbol identifier. |
|
Retrieves the symbol type classifier. |
|
Retrieves the offset section of a thunk target. |
|
Retrieves the relative virtual address (RVA) of a thunk target. |
|
Retrieves the address section of a thunk target. |
|
Retrieves the virtual address (VA) of a thunk target. |
|
Retrieves the texture slot. |
|
Retrieves the logical this adjustor for the method. |
|
Retrieves the thunk type of a function. |
|
Retrieves the timestamp of the underlying executable file. |
|
Retrieves the metadata token of a managed function or variable. |
|
Retrieves a reference to the function signature. |
|
Retrieves the type identifier of the symbol. |
|
Retrieves an array of compiler-specific type values for this symbol. |
|
Retrieves an array of compiler-specific type identifier values for this symbol. |
|
Retrieves the uav slot. |
|
Retrieves the variety of a user-defined type (UDT). |
|
Retrieves a flag indicating whether the user-defined data type is unaligned. |
|
Retrieves the undecorated name for a C++ decorated, or linkage, name. |
|
Extension of the get_undecoratedName method that retrieves the undecorated name based on the value of an extension field. |
|
Retrieves the ID of the original (unmodified) type. |
|
Retrieves the upper bound of a FORTRAN array dimension. |
|
Retrieves the symbol identifier of the upper bound of a FORTRAN array dimension. |
|
Retrieves the value of a constant. |
|
Retrieves a flag indicating whether the function is virtual. |
|
Retrieves the virtual address (VA) of the location. |
|
Retrieves a flag indicating whether the user-defined data type is a virtual base class. |
|
Retrieves the index to the virtual base displacement table. |
|
Retrieves the offset in the virtual function table of a virtual function. |
|
Retrieves the offset of the virtual base pointer. |
|
Retrieves the type of a virtual base table pointer. |
|
Retrieves the symbol interface of the type of the virtual table for a user-defined type. |
|
Retrieves the virtual table shape identifier of the symbol. |
|
Retrieves a flag indicating whether the user-defined data type is volatile. |
Remarks
Notes for Callers
Obtain this interface by calling one of the following methods:
Example
This example shows how to display the local variables for a function at a given relative virtual address. It also shows how symbols of different types are related to each other.
Note
CDiaBSTR is a class that wraps a BSTR and automatically handles freeing the string when the instantiation goes out of scope.
void DumpLocalVars( DWORD rva, IDiaSession *pSession )
{
CComPtr< IDiaSymbol > pBlock;
if ( FAILED( psession->findSymbolByRVA( rva, SymTagBlock, &pBlock ) ) )
{
Fatal( "Failed to find symbols by RVA" );
}
CComPtr< IDiaSymbol > pscope;
for ( ; pBlock != NULL; )
{
CComPtr< IDiaEnumSymbols > pEnum;
// local data search
if ( FAILED( pBlock->findChildren( SymTagNull, NULL, nsNone, &pEnum ) ) )
{
Fatal( "Local scope findChildren failed" );
}
CComPtr< IDiaSymbol > pSymbol;
DWORD tag;
DWORD celt;
while ( pEnum != NULL &&
SUCCEEDED( pEnum->Next( 1, &pSymbol, &celt ) ) &&
celt == 1)
{
pSymbol->get_symTag( &tag );
if ( tag == SymTagData )
{
CDiaBSTR name;
DWORD kind;
pSymbol->get_name( &name );
pSymbol->get_dataKind( &kind );
if ( name != NULL )
wprintf_s( L"\t%s (%s)\n", name, szDataKinds[ kind ] );
}
else if ( tag == SymTagAnnotation )
{
CComPtr< IDiaEnumSymbols > pValues;
// local data search
wprintf_s( L"\tAnnotation:\n" );
if ( FAILED( pSymbol->findChildren( SymTagNull, NULL, nsNone, &pValues ) ) )
Fatal( "Annotation findChildren failed" );
pSymbol = NULL;
while ( pValues != NULL &&
SUCCEEDED( pValues->Next( 1, &pSymbol, &celt ) ) &&
celt == 1 )
{
CComVariant value;
if ( pSymbol->get_value( &value ) != S_OK )
Fatal( "No value for annotation data." );
wprintf_s( L"\t\t%ws\n", value.bstrVal );
pSymbol = NULL;
}
}
pSymbol = NULL;
}
pBlock->get_symTag( &tag );
if ( tag == SymTagFunction ) // stop when at function scope
break;
// move to lexical parent
CComPtr< IDiaSymbol > pParent;
if ( SUCCEEDED( pBlock->get_lexicalParent( &pParent ) )
&& pParent != NULL ) {
pBlock = pParent;
}
else
{
Fatal( "Finding lexical parent failed." );
}
};
}
Requirements
Header: Dia2.h
Library: diaguids.lib
DLL: msdia80.dll
See Also
Reference
Class Hierarchy of Symbol Types