Debugging Tools for Windows

OutputSymbolByOffset

The OutputSymbolByOffset method looks up a symbol by address and prints the symbol name and other symbol information to the debugger console.

HRESULT
  IDebugSymbols3::OutputSymbolByOffset(
    IN ULONG  OutputControl,
    IN ULONG  Flags,
    IN ULONG64  Offset
    );

Parameters

OutputControl
Specifies where to send the output. For possible values, see DEBUG_OUTCTL_XXX.
Flags
Specifies the flags used to determine what information is printed with the symbol.

The following flags can be present:

Bit-flag Effect
DEBUG_OUTSYM_FORCE_OFFSET Include the location of the symbol.
DEBUG_OUTSYM_SOURCE_LINE Include the file name and line number of the source file where the symbol is defined.
DEBUG_OUTSYM_ALLOW_DISPLACEMENT Do not require an exact match for the symbols location.

This allows the Offset parameter to specify any address within the symbol's memory allocation ‑ not just the base address.

Offset
Specifies the location in the process's virtual address space of the symbol to be printed.

Return Value

S_OK
The method was successful.
E_NOINTERFACE
No symbol was found at the specified location.

This method may also return error values. See Return Values for more details.

Interface Version

OutputSymbolByOffset is available in IDebugSymbols3 and later versions.

Comments

For more information about symbols, see Symbols.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

GetNameByOffset

Build machine: CAPEBUILD