Debugging Tools for Windows

IG_DUMP_SYMBOL_INFO

The IG_DUMP_SYMBOL_INFO Ioctl operation provides information about the type of a symbol. When calling Ioctl with IoctlType set to IG_DUMP_SYMBOL_INFO, IpvData should contain an instance of the SYM_DUMP_PARAM structure.

typedef struct _SYM_DUMP_PARAM {
    ULONG  size;
    PUCHAR  sName;
    ULONG  Options;
    ULONG64  addr;
    PFIELD_INFO  listLink;
    union {
        PVOID  Context;
        PVOID  pBuffer;
    };
    PSYM_DUMP_FIELD_CALLBACK CallbackRoutine;
    ULONG  nFields;
    PFIELD_INFO  Fields;
    ULONG64  ModBase;
    ULONG  TypeId;
    ULONG  TypeSize;
    ULONG  BufferSize;
    ULONG  fPointer:2;
    ULONG  fArray:1;
    ULONG   fStruct:1;
    ULONG  fConstant:1;
    ULONG  Reserved:27;
} SYM_DUMP_PARAM, *PSYM_DUMP_PARAM;

Members

size
Specifies the size, in bytes, of this structure. It should be set to

.
sName
Specifies the name of the symbol to lookup.
Options
Specifies the flags that determine the behavior of this Ioctl operation. For a description of these flags, see DBG_DUMP_XXX.
addr
Specifies the address of the symbol.
listLink
Specifies the field that contains the next item in a linked list. If the symbol is an entry in a linked list, this Ioctl operation can iterate over the items in the list using the field specified here as the pointer to the next item in the list. The type of this structure is FIELD_INFO.

The callback function specified in the fieldCallBack member of this structure is called, during this Ioctl operation, for each item in the list. When it is called, it is passed this linkList structure with the members filled in for the list entry along with the contents of the Context member.

DBG_DUMP_LIST should be set in Options to tell this Ioctl to iterate over the list.

Context
Specifies a pointer that is passed to the callback function in the CallbackRoutine member and to the callback functions in the fieldCallBack member of the linkList and Fields members.
pBuffer
Specifies a buffer that receives information about the symbol. This buffer is only used if the DBG_DUMP_COPY_TYPE_DATA flag is set in Options. The size of this buffer is specified in BufferSize.
CallbackRoutine
Specifies a callback function that is called by the engine. The engine provides the callback function with information about the symbol and its members.
nFields
Specifies the number of entries in the Fields array.
Fields
Specifies an array of FIELD_INFO structures that control the behavior of this operation for individual members of the specified symbol. See FIELD_INFO for details.
ModBase
Receives the location in the target's memory of the start of the module that contains the symbol.
TypeId
Receives the type ID of the symbol.
TypeSize
Receives the size, in bytes, of the symbol in the target's memory.
BufferSize
Specifies the size, in bytes, of the pBuffer buffer.
fPointer
Receives a Boolean value that indicates whether the symbol is a pointer. fPointer is FALSE if the symbol is not a pointer. It is 1 if the symbol is a 32-bit pointer and 3 if the symbol is a 64-bit pointer.
fArray
Receives a Boolean value that indicates whether the symbol is an array. fArray is FALSE if the symbol is not an array and TRUE if it is.
fStruct
Receives a Boolean value that indicates whether the symbol is a structure. fStruct is FALSE if the symbol is not a structure and TRUE if it is.
fConstant
Receives a Boolean value that indicates whether the symbol is a constant. fConstant is FALSE if the symbol is not a constant and TRUE if it is.

Return Value

If this Ioctl operation succeeds, the return value from Ioctl is TRUE; otherwise, it is FALSE.

Comments

The parameters for the IG_DUMP_SYMBOL_INFO Ioctl operation are the members of the SYM_DUMP_PARAM structure.

This Ioctl operation looks up the module information for the symbol, loading module symbols if possible.

If nFields is zero and DBG_DUMP_CALL_FOR_EACH is set in Options, the callback function specified in CallbackRoutine is called for every field in the symbol.

If nFields is non-zero and DBG_DUMP_CALL_FOR_EACH is set in Options, callbacks are only made for those fields matching the fName member of one of the Fields elements. If a field matches a fName member and the fieldCallBack member is not NULL, the callback function in fieldCallBack is called; if it is NULL, the callback function in CallbackRoutine is called instead.

Requirements

Headers: Declared in wdbgexts.h. If you are writing a WdbgExts extension, include wdbgexts.h. If you are writing a DbgEng extension that uses this Ioctl operation, include wdbgexts.h before dbgeng.h (see Writing DbgEng Extension Code for details).

See Also

Ioctl, DBG_DUMP_XXX, FIELD_INFO

Build machine: CAPEBUILD