IDebugRegisters2::GetInstructionOffset2 method

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

Syntax


HRESULT GetInstructionOffset2(
  [in]   ULONG Source,
  [out]  PULONG64 Offset
);

Parameters

Source [in]

Specifies the register source to query.

The possible values are listed in the following table.

ValueRegister source

DEBUG_REGSRC_DEBUGGEE

Fetch register information from the target.

DEBUG_REGSRC_EXPLICIT

Fetch register information from the current explicit register context.

DEBUG_REGSRC_FRAME

Fetch register information from the current scope's register context.

Note   Stack unwinding does not guarantee accurate updating of the register context, so the scope frame's register context might not be accurate in all cases.

 

Offset [out]

Receives the location in the process's virtual address space of the current instruction of the current thread.

Return value

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

Return codeDescription
S_OK

The method was successful.

 

Remarks

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

The method GetInstructionOffset performs the same task as this method but always uses the target as the register source.

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

Requirements

Header

Dbgeng.h (include DbgEng.h)

See also

IDebugRegisters2
GetInstructionOffset

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft