Debugging Tools for Windows |
The GetNearInstruction method returns the location of a processor instruction relative to a given location.
HRESULT
IDebugControl::GetNearInstruction(
IN ULONG64 Offset,
IN LONG Delta,
OUT PULONG64 NearOffset
);
This method may also return error values. See Return Values for more details.
GetNearInstruction is available in all versions of IDebugControl.
On some architectures, like x86 and x64, the size of an instruction may vary. On these architectures, when Delta is negative, the desired instruction location might not be uniquely defined. In this case, the debugger engine will search backward from Offset until it encounters a location such that there are the Delta number of instructions between that location and Offset.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.