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

Method GetString

IDEHelper/DbgExprEvaluator.cpp:789–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787}
788
789DbgTypedValue DbgExprEvaluator::GetString(const StringImpl& str)
790{
791 String* resultPtr;
792 mDebugger->mLiteralSet.TryAdd(str, &resultPtr);
793
794 DbgTypedValue dbgValue;
795
796 auto language = GetLanguage();
797 auto charPtrType = mDbgModule->GetPrimitiveType((language == DbgLanguage_Beef) ? DbgType_UChar : DbgType_SChar, language);
798 if (charPtrType != NULL)
799 charPtrType = mDbgModule->GetPointerType(charPtrType);
800 if (charPtrType != NULL)
801 {
802 dbgValue.mType = charPtrType;
803 dbgValue.mLocalPtr = resultPtr->c_str();
804 dbgValue.mIsLiteral = true;
805 dbgValue.mDataLen = resultPtr->mLength;
806 }
807
808 return dbgValue;
809}
810
811void DbgExprEvaluator::Fail(const StringImpl& error, BfAstNode* node)
812{

Callers

nothing calls this directly

Calls 4

GetPointerTypeMethod · 0.80
TryAddMethod · 0.45
GetPrimitiveTypeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected