SYMBOL_INFO Structure

Debug Help Library

SYMBOL_INFO Structure

Contains symbol information.

typedef struct _SYMBOL_INFO {
ULONG SizeOfStruct;
ULONG TypeIndex;
ULONG64 Reserved[2];
ULONG Index;
ULONG Size;
ULONG64 ModBase;
ULONG Flags;
ULONG64 Value;
ULONG64 Address;
ULONG Register;
ULONG Scope;
ULONG Tag;
ULONG NameLen;
ULONG MaxNameLen;
TCHAR Name[1]; } SYMBOL_INFO,
*PSYMBOL_INFO;

Members

SizeOfStruct

The size of the structure, in bytes. This member must be set to sizeof(SYMBOL_INFO). Note that the total size of the data is the SizeOfStruct + MaxNameLen - 1. The reason to subtract one is that the first character in the name is accounted for in the size of the structure.

TypeIndex

The type index of the symbol. For more information, see the PDB documentation.

Reserved

This member is reserved for system use.

Index

The unique value for the symbol. The value associated with a symbol is not guaranteed to be the same each time you run the process.

For PDB symbols, the index value for a symbol is not generated until the symbol is enumerated or retrieved through a search by name or address. The index values for all CodeView and COFF symbols are generated when the symbols are loaded.

Size

The symbol size, in bytes. This value is typically zero and should be ignored.

ModBase

The base address of the module that contains the symbol.

Flags

This member can be one or more of the following values.

Value Meaning

SYMFLAG_CLR_TOKEN
0x00040000

The symbol is a CLR token.

SYMFLAG_CONSTANT
0x00000100

The symbol is a constant.

SYMFLAG_EXPORT
0x00000200

The symbol is from the export table.

SYMFLAG_FORWARDER
0x00000400

The symbol is a forwarder.

SYMFLAG_FRAMEREL
0x00000020

Offsets are frame relative.

SYMFLAG_FUNCTION
0x00000800

The symbol is a known function.

SYMFLAG_ILREL
0x00010000

The symbol address is an offset relative to the beginning of the intermediate language block. This applies to managed code only.

SYMFLAG_LOCAL
0x00000080

The symbol is a local variable.

SYMFLAG_METADATA
0x00020000

The symbol is managed metadata.

SYMFLAG_PARAMETER
0x00000040

The symbol is a parameter.

SYMFLAG_REGISTER
0x00000008

The symbol is a register. The Register member is used.

SYMFLAG_REGREL
0x00000010

Offsets are register relative.

SYMFLAG_SLOT
0x00008000

The symbol is a managed code slot.

SYMFLAG_THUNK
0x00002000

The symbol is a thunk.

SYMFLAG_TLSREL
0x00004000

The symbol is an offset into the TLS data area.

SYMFLAG_VALUEPRESENT
0x00000001

The Value member is used.

SYMFLAG_VIRTUAL
0x00001000

The symbol is a virtual symbol created by the SymAddSymbol function.

Value

The value of a constant.

Address

The virtual address of the start of the symbol.

Register

The register.

Scope

The DIA scope. For more information, see the Debug Interface Access SDK in the Visual Studio documentation.

Tag

The PDB classification. These values are defined in Dbghelp.h in the SymTagEnum enumeration type. For descriptions, see the PDB documentation.

NameLen

The length of the name, in characters, not including the null-terminating character.

MaxNameLen

The size of the Name buffer, in characters. If this member is 0, the Name member is not used.

Name

The name of the symbol. The name can be undecorated if the SYMOPT_UNDNAME option is used with the SymSetOptions function.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

Declared in DbgHelp.h.

Unicode

Implemented as SYMBOL_INFOW (Unicode) and SYMBOL_INFO (ANSI).

See Also

SymEnumSymbolsProc
SymFromAddr
SymFromName
SymGetTypeFromName


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.