Symbol Locations

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Most symbols have a defined location within the image file. A symbol's location is specified with a value from the LocationType Enumeration enumeration. The symbol may support additional properties depending on its location.

The following table shows the most commonly used location types and their additional properties.

Location type Additional properties
LocIsNull none
LocIsStatic IDiaSymbol::get_addressOffset

IDiaSymbol::get_addressSection

IDiaSymbol::get_relativeVirtualAddress (if relative virtual addresses are enabled)

IDiaSymbol::get_virtualAddress (if the image base has been set to nonzero)
LocIsTLS IDiaSymbol::get_addressSection

IDiaSymbol::get_addressOffset
LocIsRegRel IDiaSymbol::get_registerId

IDiaSymbol::get_offset
LocIsThisRel IDiaSymbol::get_offset
LocIsEnregistered IDiaSymbol::get_registerId
LocIsBitField IDiaSymbol::get_bitPosition

IDiaSymbol::get_length

IDiaSymbol::get_offset
LocIsSlot IDiaSymbol::get_slot
LocIsIlRel IDiaSymbol::get_offset
LocInMetaData IDiaSymbol::get_token
LocIsConstant IDiaSymbol::get_value

See Also

IDiaSymbol::get_addressOffset
IDiaSymbol::get_addressSection
IDiaSymbol::get_bitPosition
IDiaSymbol::get_length
IDiaSymbol::get_locationType
IDiaSymbol::get_offset
IDiaSymbol::get_registerId
IDiaSymbol::get_relativeVirtualAddress
IDiaSymbol::get_slot
IDiaSymbol::get_token
IDiaSymbol::get_value
IDiaSymbol::get_virtualAddress
LocationType Enumeration
Symbols and Symbol Tags