Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/debugger/evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,22 @@ static HRESULT InternalWalkMembers(EvalHelpers *pEvalHelpers, ICorDebugValue *pI
if (className == "decimal") // TODO: implement mechanism for walking over custom type fields
return S_OK;

if (className.back() == '?') // System.Nullable<T>, don't provide class member list.
if (className.back() == '?') // System.Nullable<T>
{
ToRelease<ICorDebugValue> pValueValue;
ToRelease<ICorDebugValue> pHasValueValue;
IfFailRet(GetNullableValue(pInputValue, &pValueValue, &pHasValueValue));

BYTE hasValueByte = 0;
ToRelease<ICorDebugGenericValue> pGenericValue;
IfFailRet(pHasValueValue->QueryInterface(IID_ICorDebugGenericValue, (LPVOID*)&pGenericValue));
IfFailRet(pGenericValue->GetValue((LPVOID)&hasValueByte));

if (hasValueByte != 0)
return InternalWalkMembers(pEvalHelpers, pValueValue, pThread, frameLevel, nullptr, provideSetterData, cb);

return S_OK;
}

CorElementType corElemType;
IfFailRet(pType->GetType(&corElemType));
Expand Down