|
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 , Sub , Mul , Div , Rem } |
| 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, std::shared_ptr< StackFrame > frame_sp, 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, std::shared_ptr< StackFrame > frame_sp, 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. | |
| 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 (std::shared_ptr< 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 | 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) |
| static CompilerType | ResolveTypeByName (const std::string &name, ExecutionContextScope &ctx_scope) |
| 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 33 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 151 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 114 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 257 of file DILEval.cpp.
References lldb_private::ConstString::GetStringRef().
Referenced by LookupGlobalIdentifier().
|
static |
Definition at line 25 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, Div, lldb_private::dil::Token::minus, Mul, lldb_private::dil::Token::percent, lldb_private::dil::Token::plus, Rem, lldb_private::dil::Token::slash, lldb_private::dil::Token::star, and Sub.
Referenced by lldb_private::dil::DILParser::ParseAdditiveExpression(), and lldb_private::dil::DILParser::ParseMultiplicativeExpression().
|
static |
Definition at line 46 of file DILEval.cpp.
References lldb_private::SymbolContext::comp_unit, lldb_private::CompileUnit::GetLanguage(), 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 71 of file DILLexer.cpp.
Referenced by IsNumber(), IsNumberBodyChar(), and IsWord().
|
static |
Definition at line 67 of file DILLexer.cpp.
Referenced by IsNumberBodyChar(), and IsWord().
|
static |
Definition at line 118 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 91 of file DILLexer.cpp.
References IsDigit(), and IsNumberBodyChar().
Referenced by lldb_private::dil::DILLexer::Lex().
|
static |
Definition at line 87 of file DILLexer.cpp.
References IsDigit(), and IsLetter().
Referenced by IsNumber().
|
static |
Definition at line 75 of file DILLexer.cpp.
References IsDigit(), and IsLetter().
Referenced by lldb_private::dil::DILLexer::Lex().
| lldb::ValueObjectSP lldb_private::dil::LookupGlobalIdentifier | ( | llvm::StringRef | name_ref, |
| std::shared_ptr< StackFrame > | frame_sp, | ||
| 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 282 of file DILEval.cpp.
References lldb_private::SymbolContext::comp_unit, lldb_private::ValueObjectVariable::Create(), DILFindVariable(), lldb_private::VariableList::Empty(), 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, |
| std::shared_ptr< StackFrame > | frame_sp, | ||
| 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 323 of file DILEval.cpp.
References lldb_private::ValueObjectRegister::Create(), and lldb_private::SymbolContext::GetInstanceVariableName().
Referenced by lldb_private::dil::DILParser::ParseTypeId(), and lldb_private::dil::Interpreter::Visit().
|
static |
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 lldb_private::dil::DILParser::ParseTypeId().