Debugging Tools for Windows

GetInstructionOffset

The GetInstructionOffset method returns the location of the current thread's current instruction.

HRESULT
  IDebugRegisters::GetInstructionOffset(
    OUT PULONG64  Offset
    );

Parameters

Offset
Receives the location in the target's virtual address space of the target's current instruction.

Return Value

S_OK
The method was successful.

This list does not contain all the errors that might occur. For a list of possible errors, see HRESULT Values.

Interface Version

GetInstructionOffset is available in all versions of IDebugRegisters.

Comments

The meaning of the value returned by this method is architecture-dependent. In particular, for an Itanium processor, the virtual address returned can indicate an address within a bundle.

The method GetInstructionOffset2 performs the same task as this method but also allows the register source to be specified.

For an overview of the IDebugRegisters interface and other register-related methods, see Registers.

Requirements

Headers: Defined in DbgEng.h. Include DbgEng.h.

See Also

GetInstructionOffset2

Build machine: CAPEBUILD