MCPcopy Create free account
hub / github.com/beefytech/Beef / GetThis

Method GetThis

IDEHelper/DbgExprEvaluator.cpp:1615–1643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1613}
1614
1615DbgTypedValue DbgExprEvaluator::GetThis()
1616{
1617 if (mExplicitThis)
1618 return mExplicitThis;
1619
1620 String findName = "this";
1621 CPUStackFrame* stackFrame = GetStackFrame();
1622 if (stackFrame != NULL)
1623 {
1624 intptr valAddr;
1625 DbgType* valType;
1626 DbgAddrType addrType = DbgAddrType_Value;
1627 if (mDebugTarget->GetValueByName(GetCurrentMethod(), findName, stackFrame, &valAddr, &valType, &addrType))
1628 {
1629 //valType = valType->RemoveModifiers();
1630 return FixThis(ReadTypedValue(NULL, valType, valAddr, addrType));
1631 }
1632
1633 if (mDebugTarget->GetValueByName(GetCurrentMethod(), "__closure", stackFrame, &valAddr, &valType, &addrType))
1634 {
1635 DbgTypedValue result = ReadTypedValue(NULL, valType, valAddr, addrType);
1636 if (!result)
1637 return result;
1638 SetAndRestoreValue<bool> prevIgnoreError(mIgnoreErrors, true);
1639 return FixThis(LookupField(NULL, result, "__this"));
1640 }
1641 }
1642 return DbgTypedValue();
1643}
1644
1645DbgTypedValue DbgExprEvaluator::GetDefaultTypedValue(DbgType* srcType)
1646{

Callers

nothing calls this directly

Calls 2

DbgTypedValueClass · 0.85
GetValueByNameMethod · 0.80

Tested by

no test coverage detected