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 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 type tag of a simple type. |
|
Retrieves the bit position of a location. |
|
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. |
|
(DIA SDK v8.0) Retrieves the name of the compiler used to create the Compiland. |
|
Retrieves a flag indicating whether the user-defined data type has a constructor. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the compiland contains any debugging information. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has a C++-style exception handler. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has an asynchronous exception handler. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has inline assembly. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function contains a longjmp command (part of C-style exception handling). |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the module contains managed code. |
|
Retrieves a flag indicating whether the user-defined data type has nested type definitions. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function or compiland has security checks compiled in (via the /GS (Buffer Security Check) compiler switch). |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has Win32-style Structured Exception Handling. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has been marked with the inline attribute. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the data is part of an aggregate of many symbols. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the symbol file contains C types. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the module was converted from Common Intermediate Language (CIL) to native code. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the elements of a user-defined data type are aligned to a specific boundary. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the module was compiled with the /hotpatch (Create Hotpatchable Image) compiler switch. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the managed compiland was linked with the linker's LTCG. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the managed compiland is a .netmodule (containing only metadata). |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has the naked (C+) attribute. |
|
(DIA SDK v8.0) 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. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether private symbols have been stripped from the symbol file. |
|
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. |
|
(DIA SDK v8.0) Retrieves a list of live local variables at a particular virtual address. |
|
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 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. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function is marked with the noinline attribute. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function has been declared with the noreturn attribute. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether no stack ordering could be done as part of stack buffer checking. |
|
(DIA SDK v8.0) Retrieves a flag indicating whether the function or label is never reached. |
|
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. |
|
(DIA SDK v8.0) 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 relative virtual address (RVA) of the location. |
|
Retrieves a flag indicating whether the user-defined data type appears in a nonglobal lexical scope. |
|
Retrieves the symbol's signature value. |
|
Retrieves the slot number of the location. |
|
Retrieves the file name of the source file. |
|
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 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 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 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