ICorDebugCode3::GetReturnValueLiveOffset Method
For a specified IL offset, gets the native offsets where a breakpoint should be placed so that the debugger can obtain the return value from a function.
Syntax
HRESULT GetReturnValueLiveOffset(
[in] ULONG32 ILoffset,
[in] ULONG32 bufferSize,
[out] ULONG32 *pFetched,
[out, size_is(buffersize), length_is(*pFetched)] ULong32 pOffsets[]
);
Parameters
ILoffset
The IL offset. It must be a function call site or the function call will fail.
bufferSize
The number of bytes available to store pOffsets
.
pFetched
A pointer to the number of offsets actually returned. Usually, its value is 1, but a single IL instruction can map to multiple CALL
assembly instructions.
pOffsets
An array of native offsets. Typically, pOffsets
contains a single offset, although a single IL instruction can map to multiple map to multiple CALL
assembly instructions.
Remarks
This method is used along with the ICorDebugILFrame3::GetReturnValueForILOffset method to get the return value of a method that returns a reference type. Passing an IL offset to a function call site to this method returns one or more native offsets. The debugger can then set breakpoints on these native offsets in the function. When the debugger hits one of the breakpoints, you can then pass the same IL offset that you passed to this method to the ICorDebugILFrame3::GetReturnValueForILOffset method to get the return value. The debugger should then clear all the breakpoints that it set.
Warning
The ICorDebugCode3::GetReturnValueLiveOffset
and ICorDebugILFrame3::GetReturnValueForILOffset methods allow you to get return value information for reference types only. Retrieving return value information from value types (that is, all types that derive from ValueType) is not supported.
The function returns the HRESULT
values shown in the following table.
HRESULT value |
Description |
---|---|
S_OK |
Success. |
CORDBG_E_INVALID_OPCODE |
The given IL offset site is not a call instruction, or the function returns void . |
CORDBG_E_UNSUPPORTED |
The given IL offset is a proper call, but the return type is unsupported for getting a return value. |
The ICorDebugCode3::GetReturnValueLiveOffset
method is available only on x86-based and AMD64 systems.
Requirements
Platforms: See System Requirements.
Header: CorDebug.idl, CorDebug.h
Library: CorGuids.lib
.NET Framework Versions: Available since 4.5.1
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for