|
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 | 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 | 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> |
Enumerations | |
| enum class | NodeKind { eArraySubscriptNode , eBinaryOpNode , eBitExtractionNode , eBooleanLiteralNode , eCastNode , eErrorNode , eFloatLiteralNode , eIdentifierNode , eIntegerLiteralNode , eMemberOfNode , eUnaryOpNode } |
| The various types DIL AST nodes (used by the DIL parser). More... | |
| enum class | UnaryOpKind { AddrOf , Deref , Minus , Plus } |
| The Unary operators recognized by DIL. More... | |
| enum class | BinaryOpKind { Add , AddAssign , Assign , Div , Mul , Rem , Shl , Shr , Sub , SubAssign } |
| The binary operators recognized by DIL. More... | |
| enum class | CastKind { eArithmetic , eEnumeration , ePointer , eNone } |
| The type casts allowed by DIL. More... | |
| enum class | IntegerTypeSuffix { None , Long , LongLong } |
| enum class | ErrorCode : unsigned char { kOk = 0 , kInvalidExpressionSyntax , kUndeclaredIdentifier , kUnknown } |
Functions | |
| BinaryOpKind | GetBinaryOpKindFromToken (Token::Kind token_kind) |
| Translates DIL tokens to BinaryOpKind. | |
| 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::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 | 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 |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| kOk | |
| kInvalidExpressionSyntax | |
| kUndeclaredIdentifier | |
| kUnknown | |
Definition at line 31 of file DILParser.h.
|
strong |
|
strong |
|
strong |
|
static |
Definition at line 35 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(), and lldb_private::dil::Interpreter::Visit().
|
static |
Definition at line 155 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 118 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 259 of file DILEval.cpp.
References lldb_private::ConstString::GetStringRef().
Referenced by LookupGlobalIdentifier().
|
static |
Definition at line 27 of file DILEval.cpp.
Referenced by lldb_private::dil::Interpreter::PromoteSignedInteger(), lldb_private::dil::Interpreter::UnaryConversion(), 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, Assign, Div, lldb_private::dil::Token::equal, lldb_private::dil::Token::greatergreater, lldb_private::dil::Token::lessless, lldb_private::dil::Token::minus, lldb_private::dil::Token::minusequal, Mul, lldb_private::dil::Token::percent, lldb_private::dil::Token::plus, lldb_private::dil::Token::plusequal, Rem, Shl, Shr, lldb_private::dil::Token::slash, lldb_private::dil::Token::star, Sub, and SubAssign.
Referenced by lldb_private::dil::DILParser::ParseAdditiveExpression(), lldb_private::dil::DILParser::ParseAssignmentExpression(), lldb_private::dil::DILParser::ParseMultiplicativeExpression(), and lldb_private::dil::DILParser::ParseShiftExpression().
|
static |
Definition at line 47 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::PromoteSignedInteger(), lldb_private::dil::Interpreter::UnaryConversion(), lldb_private::dil::Interpreter::Visit(), lldb_private::dil::Interpreter::Visit(), and lldb_private::dil::Interpreter::Visit().
|
static |
Definition at line 840 of file DILEval.cpp.
References lldb_private::CompilerType::GetTypeInfo().
Referenced by VerifyAssignmentTypes().
|
static |
Definition at line 81 of file DILLexer.cpp.
Referenced by IsNumber(), IsNumberBodyChar(), and IsWord().
|
static |
Definition at line 77 of file DILLexer.cpp.
Referenced by IsNumberBodyChar(), and IsWord().
|
static |
Definition at line 128 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 101 of file DILLexer.cpp.
References IsDigit(), and IsNumberBodyChar().
Referenced by lldb_private::dil::DILLexer::Lex().
|
static |
Definition at line 97 of file DILLexer.cpp.
References IsDigit(), and IsLetter().
Referenced by IsNumber().
|
static |
Definition at line 85 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 374 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 284 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 326 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().
| 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 844 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().