| 787 | } |
| 788 | |
| 789 | DbgTypedValue 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 | |
| 811 | void DbgExprEvaluator::Fail(const StringImpl& error, BfAstNode* node) |
| 812 | { |
nothing calls this directly
no test coverage detected