ICorDebugILFrame::SetIP Method

Sets the instruction pointer to the specified offset location in the Microsoft intermediate language (MSIL) code.

HRESULT SetIP (
    [in] ULONG32 nOffset
);

Parameters

  • nOffset
    The offset location in the MSIL code.

Remarks

Calls to SetIP immediately invalidate all frames and chains for the current thread. If the debugger needs frame information after a call to SetIP, it must perform a new stack trace.

ICorDebug will attempt to keep the stack frame in a valid state. However, even if the frame is in a valid state, there still may be problems such as uninitialized local variables. The caller is responsible for ensuring the coherency of the running program.

On 64-bit platforms, the instruction pointer cannot be moved out of a catch or finally block. If SetIP is called to make such a move on a 64-bit platform, it will return an HRESULT indicating failure.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

ICorDebugILFrame Interface