|
LLDB mainline
|
Classes | |
| class | ArraySubscriptNode |
| class | ASTNode |
| The rest of the classes in this file, except for the Visitor class at the very end, define all the types of AST nodes used by the DIL parser and expression evaluator. More... | |
| class | BinaryOpNode |
| class | BitFieldExtractionNode |
| class | BooleanLiteralNode |
| class | CastNode |
| class | ConditionalNode |
| class | DILDiagnosticError |
| class | DILLexer |
| Class for doing the simple lexing required by DIL. More... | |
| class | DILParser |
| Pure recursive descent parser for C++ like expressions. More... | |
| class | ErrorNode |
| class | FloatLiteralNode |
| class | IdentifierNode |
| class | IntegerLiteralNode |
| class | Interpreter |
| class | MemberOfNode |
| class | SizeOfNode |
| class | Token |
| Class defining the tokens generated by the DIL lexer and used by the DIL parser. More... | |
| class | UnaryOpNode |
| class | Visitor |
| This class contains one Visit method for each specialized type of DIL AST node. More... | |
Typedefs | |
| using | ASTNodeUP = std::unique_ptr<ASTNode> |
Functions | |
| BinaryOpKind | GetBinaryOpKindFromToken (Token::Kind token_kind) |
| Translates DIL tokens to BinaryOpKind. | |
| lldb::ValueObjectSP | LookupPersistentIdentifier (llvm::StringRef name_ref, StackFrame &stack_frame, lldb::TargetSP target_sp, lldb::LanguageType language) |
| Given the name of a persistent identifier (i.e., one that starts with a $), find the ValueObject for that name (if it exists). | |
| lldb::ValueObjectSP | LookupIdentifier (llvm::StringRef name_ref, StackFrame &stack_frame, lldb::DynamicValueType use_dynamic) |
| Given the name of an identifier (variable name, member name, type name, etc.), find the ValueObject for that name (if it exists), excluding global variables, and create and return an IdentifierInfo object containing all the relevant information about that object (for DIL parsing and evaluating). | |
| lldb::ValueObjectSP | LookupGlobalIdentifier (llvm::StringRef name_ref, StackFrame &stack_frame, lldb::TargetSP target_sp, lldb::DynamicValueType use_dynamic) |
| Given the name of an identifier, check to see if it matches the name of a global variable. | |
| lldb::ValueObjectSP | LookupEnumValue (llvm::StringRef name_ref, ExecutionContextScope &ctx_scope) |
| Given the name of an identifier, attempt to find an enumeration value. | |
| CompilerType | ResolveTypeByName (const std::string &name, ExecutionContextScope &ctx_scope) |
| static CompilerType | GetBasicType (lldb::TypeSystemSP type_system, lldb::BasicType basic_type) |
| static lldb::ValueObjectSP | ArrayToPointerConversion (ValueObject &valobj, ExecutionContextScope &ctx, llvm::StringRef name) |
| static llvm::Expected< lldb::LanguageType > | GetSourceLanguageFromCU (StackFrame &ctx) |
| static llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemFromCU (StackFrame &ctx) |
| static size_t | ConversionRank (CompilerType type) |
| Basic types with a lower rank are converted to the basic type with a higher rank. | |
| static lldb::BasicType | BasicTypeToUnsigned (lldb::BasicType basic_type) |
| static lldb::VariableSP | DILFindVariable (ConstString name, VariableList &variable_list) |
| static bool | HasFloatingRepresentation (CompilerType ct) |
| static llvm::Expected< bool > | VerifyAssignmentTypes (CompilerType lhs_type, CompilerType rhs_type) |
| static bool | IsLiteralZero (lldb::ValueObjectSP &val, bool is_literal) |
| static bool | IsLetter (char c) |
| static bool | IsDigit (char c) |
| static std::optional< llvm::StringRef > | IsWord (llvm::StringRef expr, llvm::StringRef &remainder) |
| static bool | IsNumberBodyChar (char ch) |
| static std::optional< llvm::StringRef > | IsNumber (llvm::StringRef &remainder, bool &isFloat) |
| static llvm::Error | IsNotAllowedByMode (llvm::StringRef expr, Token token, lldb::DILMode mode) |
| using lldb_private::dil::ASTNodeUP = std::unique_ptr<ASTNode> |
|
strong |
The binary operators recognized by DIL.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| kOk | |
| kInvalidExpressionSyntax | |
| kUndeclaredIdentifier | |
| kUnknown | |
Definition at line 31 of file DILParser.h.
|
strong |
|
strong |
|
strong |
|
static |
Definition at line 37 of file DILEval.cpp.
References lldb_private::ExecutionContextScope::CalculateExecutionContext(), lldb_private::ValueObject::CreateValueObjectFromAddress(), lldb_private::CompilerType::GetArrayElementType(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetLoadAddress(), and lldb_private::CompilerType::GetPointerType().
Referenced by lldb_private::dil::Interpreter::UnaryConversion(), lldb_private::dil::Interpreter::ValidateComparison(), and lldb_private::dil::Interpreter::Visit().
|
static |
Definition at line 183 of file DILEval.cpp.
References lldb::eBasicTypeChar, lldb::eBasicTypeInt, lldb::eBasicTypeInt128, lldb::eBasicTypeLong, lldb::eBasicTypeLongLong, lldb::eBasicTypeShort, lldb::eBasicTypeSignedChar, lldb::eBasicTypeUnsignedChar, lldb::eBasicTypeUnsignedInt, lldb::eBasicTypeUnsignedInt128, lldb::eBasicTypeUnsignedLong, lldb::eBasicTypeUnsignedLongLong, and lldb::eBasicTypeUnsignedShort.
Referenced by lldb_private::dil::Interpreter::PromoteSignedInteger().
|
static |
Basic types with a lower rank are converted to the basic type with a higher rank.
Definition at line 146 of file DILEval.cpp.
References lldb::eBasicTypeBool, lldb::eBasicTypeChar, lldb::eBasicTypeDouble, lldb::eBasicTypeFloat, lldb::eBasicTypeHalf, lldb::eBasicTypeInt, lldb::eBasicTypeInt128, lldb::eBasicTypeLong, lldb::eBasicTypeLongDouble, lldb::eBasicTypeLongLong, lldb::eBasicTypeShort, lldb::eBasicTypeSignedChar, lldb::eBasicTypeUnsignedChar, lldb::eBasicTypeUnsignedInt, lldb::eBasicTypeUnsignedInt128, lldb::eBasicTypeUnsignedLong, lldb::eBasicTypeUnsignedLongLong, lldb::eBasicTypeUnsignedShort, lldb_private::CompilerType::GetBasicTypeEnumeration(), and lldb_private::CompilerType::GetCanonicalType().
Referenced by lldb_private::dil::Interpreter::ArithmeticConversion().
|
static |
Definition at line 287 of file DILEval.cpp.
References lldb_private::ConstString::GetStringRef().
Referenced by LookupGlobalIdentifier().
|
static |
Definition at line 29 of file DILEval.cpp.
Referenced by lldb_private::dil::Interpreter::EvaluateComparison(), lldb_private::dil::Interpreter::PromoteSignedInteger(), lldb_private::dil::Interpreter::UnaryConversion(), lldb_private::dil::Interpreter::Visit(), and lldb_private::dil::Interpreter::Visit().
| BinaryOpKind lldb_private::dil::GetBinaryOpKindFromToken | ( | Token::Kind | token_kind | ) |
Translates DIL tokens to BinaryOpKind.
Definition at line 14 of file DILAST.cpp.
References Add, AddAssign, lldb_private::dil::Token::amp, lldb_private::dil::Token::ampamp, lldb_private::dil::Token::ampequal, And, AndAssign, Assign, lldb_private::dil::Token::caret, lldb_private::dil::Token::caretequal, Div, DivAssign, EQ, lldb_private::dil::Token::equal, lldb_private::dil::Token::equalequal, lldb_private::dil::Token::exclaimequal, GE, lldb_private::dil::Token::greater, lldb_private::dil::Token::greaterequal, lldb_private::dil::Token::greatergreater, lldb_private::dil::Token::greatergreaterequal, GT, LAnd, LE, lldb_private::dil::Token::less, lldb_private::dil::Token::lessequal, lldb_private::dil::Token::lessless, lldb_private::dil::Token::lesslessequal, LOr, LT, lldb_private::dil::Token::minus, lldb_private::dil::Token::minusequal, Mul, MulAssign, NE, Or, OrAssign, lldb_private::dil::Token::percent, lldb_private::dil::Token::percentequal, lldb_private::dil::Token::pipe, lldb_private::dil::Token::pipeequal, lldb_private::dil::Token::pipepipe, lldb_private::dil::Token::plus, lldb_private::dil::Token::plusequal, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, lldb_private::dil::Token::slash, lldb_private::dil::Token::slashequal, lldb_private::dil::Token::star, lldb_private::dil::Token::starequal, Sub, SubAssign, Xor, and XorAssign.
Referenced by lldb_private::dil::DILParser::ParseAdditiveExpression(), lldb_private::dil::DILParser::ParseAndExpression(), lldb_private::dil::DILParser::ParseAssignmentExpression(), lldb_private::dil::DILParser::ParseEqualityExpression(), lldb_private::dil::DILParser::ParseExclusiveOrExpression(), lldb_private::dil::DILParser::ParseInclusiveOrExpression(), lldb_private::dil::DILParser::ParseLogicalAndExpression(), lldb_private::dil::DILParser::ParseLogicalOrExpression(), lldb_private::dil::DILParser::ParseMultiplicativeExpression(), lldb_private::dil::DILParser::ParseRelationalExpression(), and lldb_private::dil::DILParser::ParseShiftExpression().
|
static |
Definition at line 50 of file DILEval.cpp.
References lldb_private::SymbolContext::comp_unit, lldb_private::StackFrame::GetFunctionName(), lldb_private::CompileUnit::GetLanguage(), and lldb_private::StackFrame::GetSymbolContext().
Referenced by lldb_private::dil::Interpreter::Visit().
|
static |
Definition at line 60 of file DILEval.cpp.
References lldb_private::SymbolContext::comp_unit, lldb_private::StackFrame::GetFunctionName(), lldb_private::CompileUnit::GetLanguage(), lldb_private::StackFrame::GetSymbolContext(), and lldb_private::SymbolContext::module_sp.
Referenced by lldb_private::dil::Interpreter::EvaluateBinarySubtraction(), lldb_private::dil::Interpreter::EvaluateComparison(), lldb_private::dil::Interpreter::EvaluateLogical(), lldb_private::dil::Interpreter::PromoteSignedInteger(), lldb_private::dil::Interpreter::UnaryConversion(), lldb_private::dil::Interpreter::Visit(), lldb_private::dil::Interpreter::Visit(), lldb_private::dil::Interpreter::Visit(), lldb_private::dil::Interpreter::Visit(), lldb_private::dil::Interpreter::Visit(), and lldb_private::dil::Interpreter::Visit().
|
static |
Definition at line 981 of file DILEval.cpp.
References lldb_private::CompilerType::GetTypeInfo().
Referenced by VerifyAssignmentTypes().
|
static |
Definition at line 127 of file DILLexer.cpp.
Referenced by IsNumber(), IsNumberBodyChar(), and IsWord().
|
static |
Definition at line 123 of file DILLexer.cpp.
Referenced by IsNumberBodyChar(), and IsWord().
|
static |
Definition at line 1039 of file DILEval.cpp.
Referenced by lldb_private::dil::Interpreter::ValidateComparison().
|
static |
Definition at line 174 of file DILLexer.cpp.
References lldb::eDILModeFull, lldb::eDILModeLegacy, lldb::eDILModeSimple, lldb_private::dil::Token::GetLocation(), and lldb_private::dil::Token::IsOneOf().
Referenced by lldb_private::dil::DILLexer::Create().
|
static |
Definition at line 147 of file DILLexer.cpp.
References IsDigit(), and IsNumberBodyChar().
Referenced by lldb_private::dil::DILLexer::Lex().
|
static |
Definition at line 143 of file DILLexer.cpp.
References IsDigit(), and IsLetter().
Referenced by IsNumber().
|
static |
Definition at line 131 of file DILLexer.cpp.
References IsDigit(), and IsLetter().
Referenced by lldb_private::dil::DILLexer::Lex().
| lldb::ValueObjectSP lldb_private::dil::LookupEnumValue | ( | llvm::StringRef | name_ref, |
| ExecutionContextScope & | ctx_scope ) |
Given the name of an identifier, attempt to find an enumeration value.
If found, return a ValueObject with a const scalar value of the enum.
Definition at line 416 of file DILEval.cpp.
References lldb_private::ValueObject::CreateValueObjectFromScalar(), lldb_private::CompilerType::ForEachEnumerator(), and ResolveTypeByName().
Referenced by lldb_private::dil::Interpreter::Visit().
| lldb::ValueObjectSP lldb_private::dil::LookupGlobalIdentifier | ( | llvm::StringRef | name_ref, |
| StackFrame & | stack_frame, | ||
| lldb::TargetSP | target_sp, | ||
| lldb::DynamicValueType | use_dynamic ) |
Given the name of an identifier, check to see if it matches the name of a global variable.
If so, find the ValueObject for that global variable, and create and return an IdentifierInfo object containing all the relevant information about it.
Definition at line 312 of file DILEval.cpp.
References lldb_private::SymbolContext::comp_unit, lldb_private::ValueObjectVariable::Create(), DILFindVariable(), lldb_private::VariableList::Empty(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::StackFrame::GetValueObjectForFrameVariable(), and lldb_private::CompileUnit::GetVariableList().
Referenced by lldb_private::dil::DILParser::ParseTypeId(), and lldb_private::dil::Interpreter::Visit().
| lldb::ValueObjectSP lldb_private::dil::LookupIdentifier | ( | llvm::StringRef | name_ref, |
| StackFrame & | stack_frame, | ||
| lldb::DynamicValueType | use_dynamic ) |
Given the name of an identifier (variable name, member name, type name, etc.), find the ValueObject for that name (if it exists), excluding global variables, and create and return an IdentifierInfo object containing all the relevant information about that object (for DIL parsing and evaluating).
Definition at line 368 of file DILEval.cpp.
References lldb_private::ValueObjectRegister::Create(), lldb_private::StackFrame::FindVariable(), lldb_private::StackFrame::GetInScopeVariableList(), lldb_private::SymbolContext::GetInstanceName(), lldb_private::StackFrame::GetRegisterContext(), lldb_private::StackFrame::GetSymbolContext(), and lldb_private::StackFrame::GetValueObjectForFrameVariable().
Referenced by lldb_private::dil::DILParser::ParseTypeId(), and lldb_private::dil::Interpreter::Visit().
| lldb::ValueObjectSP lldb_private::dil::LookupPersistentIdentifier | ( | llvm::StringRef | name_ref, |
| StackFrame & | stack_frame, | ||
| lldb::TargetSP | target_sp, | ||
| lldb::LanguageType | language ) |
Given the name of a persistent identifier (i.e., one that starts with a $), find the ValueObject for that name (if it exists).
Definition at line 354 of file DILEval.cpp.
Referenced by lldb_private::dil::Interpreter::Visit().
| CompilerType lldb_private::dil::ResolveTypeByName | ( | const std::string & | name, |
| ExecutionContextScope & | ctx_scope ) |
Definition at line 62 of file DILParser.cpp.
References lldb_private::ExecutionContextScope::CalculateTarget(), lldb_private::ModuleList::FindTypes(), lldb_private::TypeResults::GetFirstType(), lldb_private::ConstString::GetStringRef(), lldb_private::CompilerType::GetTypeName(), and lldb_private::CompilerType::IsValid().
Referenced by LookupEnumValue(), and lldb_private::dil::DILParser::ParseTypeId().
|
static |
Definition at line 985 of file DILEval.cpp.
References HasFloatingRepresentation(), lldb_private::CompilerType::IsInteger(), lldb_private::CompilerType::IsPointerType(), lldb_private::CompilerType::IsScalarType(), lldb_private::CompilerType::IsUnscopedEnumerationType(), and lldb_private::CompilerType::TypeDescription().
Referenced by lldb_private::dil::Interpreter::EvaluateAssignment().