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

Method FindType

IDEHelper/DbgModule.cpp:7564–7597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7562}
7563
7564DbgType* DbgModule::FindType(const String& typeName, DbgType* contextType, DbgLanguage language, bool bfObjectPtr)
7565{
7566 if ((language == DbgLanguage_Unknown) && (contextType != NULL))
7567 language = contextType->mLanguage;
7568
7569 if (typeName.length() > 0)
7570 {
7571 if (typeName[typeName.length() - 1] == '*')
7572 {
7573 DbgType* dbgType = FindType(typeName.Substring(0, typeName.length() - 1), contextType, language, bfObjectPtr);
7574 if (dbgType == NULL)
7575 return NULL;
7576 return GetPointerType(dbgType);
7577 }
7578 }
7579
7580 auto entry = GetLinkedModule()->mTypeMap.Find(typeName.c_str(), language);
7581 if (entry != NULL)
7582 {
7583 if ((bfObjectPtr) && (entry->mValue->IsBfObject()))
7584 return GetPointerType(entry->mValue);
7585 return entry->mValue;
7586 }
7587
7588 if (contextType != NULL)
7589 {
7590 DbgType* checkType = contextType;
7591 if (checkType->IsPointer())
7592 checkType = checkType->mTypeParam;
7593
7594 return FindTypeHelper(typeName, checkType);
7595 }
7596 return NULL;
7597}
7598
7599DbgTypeMap::Entry* DbgModule::FindType(const char* typeName, DbgLanguage language)
7600{

Callers 7

ResolveTypeRefMethod · 0.45
GetBeefTypeByIdMethod · 0.45
MatchMethodMethod · 0.45
ScanMethod · 0.45
EvaluateMethod · 0.45
GetCompilerSettingsMethod · 0.45

Calls 6

SubstringMethod · 0.80
IsBfObjectMethod · 0.80
lengthMethod · 0.45
FindMethod · 0.45
c_strMethod · 0.45
IsPointerMethod · 0.45

Tested by

no test coverage detected