Debugging Tools for Windows

GetFrameOffset2

The GetFrameOffset2 method returns the location of the stack frame for the current function.

HRESULT
  IDebugRegisters2::GetFrameOffset2(
    IN ULONG  Source,
    OUT PULONG64  Offset
    );

Parameters

Source
Specifies the register source to query.

The possible values are listed in the following table.

Value Register 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
The location in the process's virtual address space of the stack frame for the current function.

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

GetFrameOffset2 is available in IDebugRegisters2 and later versions.

Comments

The meaning of the value that is returned by this method is architecture-specific.

The method GetFrameOffset 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

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

See Also

GetFrameOffset
Build machine: CAPEBUILD