mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Display type name in System.Type debug summary string
This commit is contained in:
parent
e64ba8a8a3
commit
0feaaded22
1 changed files with 23 additions and 18 deletions
|
@ -3544,7 +3544,29 @@ String CeDebugger::TypedValueToString(const BfTypedValue& origTypedValue, const
|
||||||
if (formatInfo.mRawString)
|
if (formatInfo.mRawString)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
if ((!isNull) && (!formatInfo.mNoVisualizers) && (!hadCustomDisplayString))
|
String reflectedTypeName;
|
||||||
|
if (displayType->IsInstanceOf(mCompiler->mTypeTypeDef))
|
||||||
|
{
|
||||||
|
auto typeInst = displayType->ToTypeInstance();
|
||||||
|
auto typeIdField = typeInst->mTypeDef->GetFieldByName("mTypeId");
|
||||||
|
if (typeIdField != NULL)
|
||||||
|
{
|
||||||
|
auto& fieldInstance = typeInst->mFieldInstances[typeIdField->mIdx];
|
||||||
|
int typeId = 0;
|
||||||
|
memcpy(&typeId, data + fieldInstance.mDataOffset, fieldInstance.mResolvedType->mSize);
|
||||||
|
auto typeType = mCompiler->mContext->FindTypeById(typeId);
|
||||||
|
if (typeType != NULL)
|
||||||
|
reflectedTypeName = module->TypeToString(typeType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!reflectedTypeName.IsEmpty())
|
||||||
|
{
|
||||||
|
displayString += "{ ";
|
||||||
|
displayString += reflectedTypeName;
|
||||||
|
displayString += " }";
|
||||||
|
}
|
||||||
|
else if ((!isNull) && (!formatInfo.mNoVisualizers) && (!hadCustomDisplayString))
|
||||||
{
|
{
|
||||||
// Create our own custom display
|
// Create our own custom display
|
||||||
|
|
||||||
|
@ -3783,23 +3805,6 @@ String CeDebugger::TypedValueToString(const BfTypedValue& origTypedValue, const
|
||||||
}
|
}
|
||||||
else if ((!isNull) && (!isBadSrc))
|
else if ((!isNull) && (!isBadSrc))
|
||||||
{
|
{
|
||||||
if (memberListType->IsInstanceOf(mCompiler->mTypeTypeDef))
|
|
||||||
{
|
|
||||||
auto typeInst = memberListType->ToTypeInstance();
|
|
||||||
auto typeIdField = typeInst->mTypeDef->GetFieldByName("mTypeId");
|
|
||||||
if (typeIdField != NULL)
|
|
||||||
{
|
|
||||||
auto& fieldInstance = typeInst->mFieldInstances[typeIdField->mIdx];
|
|
||||||
int typeId = 0;
|
|
||||||
memcpy(&typeId, data + fieldInstance.mDataOffset, fieldInstance.mResolvedType->mSize);
|
|
||||||
auto typeType = mCompiler->mContext->FindTypeById(typeId);
|
|
||||||
if (typeType != NULL)
|
|
||||||
{
|
|
||||||
retVal += "\n[Type]\t" + module->TypeToString(typeType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
retVal += "\n" + GetMemberList(memberListType, addr, dataAddr, false);
|
retVal += "\n" + GetMemberList(memberListType, addr, dataAddr, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue