LLDB mainline
|
#include <Type.h>
Classes | |
struct | ParsedName |
Public Types | |
enum | EncodingDataType { eEncodingInvalid , eEncodingIsUID , eEncodingIsConstUID , eEncodingIsRestrictUID , eEncodingIsVolatileUID , eEncodingIsTypedefUID , eEncodingIsPointerUID , eEncodingIsLValueReferenceUID , eEncodingIsRValueReferenceUID , eEncodingIsAtomicUID , eEncodingIsSyntheticUID , eEncodingIsLLVMPtrAuthUID } |
enum class | ResolveState : unsigned char { Unresolved = 0 , Forward = 1 , Layout = 2 , Full = 3 } |
typedef uint32_t | Payload |
Static Public Member Functions | |
static int | Compare (const Type &a, const Type &b) |
static std::optional< ParsedName > | GetTypeScopeAndBasename (llvm::StringRef name) |
Protected Member Functions | |
Type * | GetEncodingType () |
bool | ResolveCompilerType (ResolveState compiler_type_resolve_state) |
Protected Attributes | |
ConstString | m_name |
SymbolFile * | m_symbol_file = nullptr |
SymbolContextScope * | m_context = nullptr |
The symbol context in which this type is defined. | |
Type * | m_encoding_type = nullptr |
lldb::user_id_t | m_encoding_uid = LLDB_INVALID_UID |
EncodingDataType | m_encoding_uid_type = eEncodingInvalid |
uint64_t | m_byte_size: 63 |
uint64_t | m_byte_size_has_value: 1 |
Declaration | m_decl |
CompilerType | m_compiler_type |
ResolveState | m_compiler_type_resolve_state = ResolveState::Unresolved |
Payload | m_payload |
Language-specific flags. | |
Protected Attributes inherited from lldb_private::UserID | |
lldb::user_id_t | m_uid |
The user ID that uniquely identifies an object. |
Private Member Functions | |
Type (lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0) | |
Type () | |
Type (Type &t)=default | |
Type (Type &&t)=default | |
Type & | operator= (const Type &t)=default |
Type & | operator= (Type &&t)=default |
Friends | |
class | lldb_private::SymbolFileCommon |
Only allow Symbol File to create types, as they should own them by keeping them in their TypeList. |
typedef uint32_t lldb_private::Type::Payload |
|
strong |
|
private |
Definition at line 277 of file Type.cpp.
References m_byte_size, m_byte_size_has_value, m_compiler_type, m_compiler_type_resolve_state, m_context, m_decl, m_encoding_uid, m_encoding_uid_type, m_name, m_payload, m_symbol_file, Type(), Unresolved, and lldb_private::UserID::UserID().
Referenced by Compare(), GetByteSize(), GetEncodingMask(), GetEncodingType(), GetTypedefType(), operator=(), operator=(), ResolveCompilerType(), SetEncodingType(), Type(), Type(), Type(), and Type().
|
private |
Definition at line 298 of file Type.cpp.
References m_byte_size, m_byte_size_has_value, m_name, m_payload, Type(), and lldb_private::UserID::UserID().
void Type::Dump | ( | Stream * | s, |
bool | show_context, | ||
lldb::DescriptionLevel | level = lldb::eDescriptionLevelFull ) |
Definition at line 373 of file Type.cpp.
References lldb_private::CompilerType::DumpTypeDescription(), eEncodingInvalid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, lldb_private::Stream::EOL(), lldb_private::Stream::Format(), GetForwardCompilerType(), lldb_private::Stream::Indent(), LLDB_INVALID_UID, m_byte_size, m_byte_size_has_value, m_compiler_type, m_context, m_decl, m_encoding_uid, m_encoding_uid_type, m_name, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::UserID::UserID().
void Type::DumpTypeName | ( | Stream * | s | ) |
Definition at line 451 of file Type.cpp.
References lldb_private::ConstString::Dump(), and GetName().
Referenced by lldb_private::Variable::Dump().
ConstString Type::GetBaseName | ( | ) |
Definition at line 447 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::GetTypeName().
llvm::Expected< uint64_t > Type::GetByteSize | ( | ExecutionContextScope * | exe_scope | ) |
Definition at line 459 of file Type.cpp.
References eEncodingInvalid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, lldb_private::CompilerType::GetByteSize(), GetByteSize(), GetEncodingType(), GetLayoutCompilerType(), m_byte_size, m_byte_size_has_value, m_encoding_uid_type, m_symbol_file, and Type().
Referenced by DWARFASTParserClang::CompleteEnumType(), lldb_private::SymbolFileCTF::CompleteType(), lldb_private::SymbolFileCTF::CreateArray(), GetByteSize(), GetDescription(), DWARFASTParserClang::ParseArrayType(), DWARFASTParserClang::ParseSingleMember(), and ReadFromMemory().
const Declaration & Type::GetDeclaration | ( | ) | const |
Definition at line 584 of file Type.cpp.
References m_decl.
Referenced by lldb_private::Block::AddRange().
void Type::GetDescription | ( | Stream * | s, |
lldb::DescriptionLevel | level, | ||
bool | show_name, | ||
ExecutionContextScope * | exe_scope ) |
Definition at line 305 of file Type.cpp.
References lldb_private::CompilerType::DumpTypeDescription(), lldb::eDescriptionLevelVerbose, eEncodingInvalid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, GetByteSize(), GetForwardCompilerType(), GetName(), GetQualifiedName(), LLDB_INVALID_UID, m_byte_size, m_compiler_type, m_decl, m_encoding_uid, m_encoding_uid_type, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::UserID::UserID().
Referenced by lldb_private::SymbolContext::GetDescription().
lldb::Encoding Type::GetEncoding | ( | uint64_t & | count | ) |
Definition at line 534 of file Type.cpp.
References lldb_private::CompilerType::GetEncoding(), and GetForwardCompilerType().
uint32_t Type::GetEncodingMask | ( | ) |
Definition at line 763 of file Type.cpp.
References GetEncodingMask(), GetEncodingType(), m_encoding_uid_type, and Type().
Referenced by GetCXXMethodCVQuals(), and GetEncodingMask().
|
protected |
Definition at line 453 of file Type.cpp.
References LLDB_INVALID_UID, m_encoding_type, m_encoding_uid, m_symbol_file, and Type().
Referenced by GetByteSize(), GetEncodingMask(), and ResolveCompilerType().
ModuleSP Type::GetExeModule | ( | ) |
GetModule may return module for compile unit's object file.
GetExeModule returns module for executable object file that contains compile unit where type was actually defined. GetModule and GetExeModule may return the same value.
Definition at line 857 of file Type.cpp.
References lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFile::GetObjectFile(), and m_compiler_type.
lldb::Format Type::GetFormat | ( | ) |
Definition at line 532 of file Type.cpp.
References lldb_private::CompilerType::GetFormat(), and GetForwardCompilerType().
CompilerType Type::GetForwardCompilerType | ( | ) |
Definition at line 782 of file Type.cpp.
References Forward, m_compiler_type, and ResolveCompilerType().
Referenced by PDBASTParser::CreateLLDBTypeFromPDBType(), DWARFASTParserClang::CreateStaticMemberVariable(), Dump(), GetBaseName(), DWARFASTParserClang::GetClangDeclForDIE(), lldb_private::Value::GetCompilerType(), lldb_private::ValueObjectVariable::GetCompilerTypeImpl(), PDBASTParser::GetDeclForSymbol(), GetDescription(), lldb_private::ValueObjectVariable::GetDisplayTypeName(), GetEncoding(), GetFormat(), GetName(), GetNumChildren(), GetQualifiedName(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), InferArtificialCoroType(), IsAggregateType(), IsTemplateType(), lldb_private::StackFrame::LegacyGetValueForVariableExpressionPath(), lldb_private::ClangExpressionDeclMap::LookUpLldbClass(), DWARFASTParserClang::ParseArrayType(), DWARFASTParserClang::ParseChildParameters(), DWARFASTParserClang::ParseCXXMethod(), DWARFASTParserClang::ParsePointerToMemberType(), DWARFASTParserClang::ParseSubroutine(), DWARFASTParserClang::ParseTemplateDIE(), PrivateAutoComplete(), ResolveCompilerType(), and lldb_private::ClangUserExpression::ScanContext().
CompilerType Type::GetFullCompilerType | ( | ) |
Definition at line 772 of file Type.cpp.
References Full, m_compiler_type, and ResolveCompilerType().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), PDBASTParser::AddRecordBases(), PDBASTParser::AddRecordMethod(), lldb_private::SymbolFileCTF::CompleteType(), DWARFASTParserClang::CopyUniqueClassMethodTypes(), lldb_private::SymbolFileCTF::CreateArray(), lldb_private::SymbolFileCTF::CreateFunction(), PDBASTParser::CreateLLDBTypeFromPDBType(), lldb_private::SymbolFileCTF::CreateModifier(), lldb_private::SymbolFileCTF::CreateTypedef(), lldb_private::Function::GetCompilerType(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), lldb_private::ClangExpressionDeclMap::LookUpLldbObjCClass(), DWARFASTParserClang::ParseEnum(), lldb_private::SymbolFileCTF::ParseFunctions(), DWARFASTParserClang::ParseInheritance(), and lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts().
CompilerType Type::GetLayoutCompilerType | ( | ) |
Definition at line 777 of file Type.cpp.
References Layout, m_compiler_type, and ResolveCompilerType().
Referenced by PDBASTParser::AddRecordMembers(), GetByteSize(), DWARFASTParserClang::ParseObjCProperty(), and DWARFASTParserClang::ParseSingleMember().
ModuleSP Type::GetModule | ( | ) |
ConstString Type::GetName | ( | ) |
Definition at line 441 of file Type.cpp.
References GetForwardCompilerType(), lldb_private::CompilerType::GetTypeName(), and m_name.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::CompleteType(), lldb_private::Address::Dump(), DumpTypeName(), lldb::SBFunction::GetDescription(), GetDescription(), and lldb_private::ValueObjectVariable::GetTypeName().
|
inline |
llvm::Expected< uint32_t > Type::GetNumChildren | ( | bool | omit_empty_base_classes | ) |
Definition at line 510 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::GetNumChildren().
|
inline |
ConstString Type::GetQualifiedName | ( | ) |
Definition at line 787 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::GetTypeName().
Referenced by GetDescription(), and lldb_private::ValueObjectVariable::GetQualifiedTypeName().
|
inline |
|
inline |
|
inline |
Definition at line 476 of file Type.h.
References m_symbol_file.
Referenced by lldb_private::Variable::GetDecl(), lldb_private::Variable::GetDeclContext(), and ResolveCompilerType().
|
inline |
Definition at line 477 of file Type.h.
References m_symbol_file.
lldb::TypeSP Type::GetTypedefType | ( | ) |
Definition at line 522 of file Type.cpp.
References IsTypedef(), m_encoding_uid, m_symbol_file, and Type().
|
static |
Definition at line 792 of file Type.cpp.
References lldb_private::Type::ParsedName::basename, lldb_private::Type::ParsedName::scope, and lldb_private::Type::ParsedName::type_class.
Referenced by lldb_private::npdb::SymbolFileNativePDB::GetContextForType(), and lldb_private::TypeQuery::TypeQuery().
bool Type::IsAggregateType | ( | ) |
Definition at line 514 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::IsAggregateType().
bool Type::IsTemplateType | ( | ) |
Definition at line 518 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::IsTemplateType().
|
inline |
Definition at line 494 of file Type.h.
References eEncodingIsTypedefUID, and m_encoding_uid_type.
Referenced by GetTypedefType().
|
inline |
Definition at line 492 of file Type.h.
References eEncodingInvalid, and m_encoding_uid_type.
bool Type::ReadFromMemory | ( | ExecutionContext * | exe_ctx, |
lldb::addr_t | address, | ||
AddressType | address_type, | ||
DataExtractor & | data ) |
Definition at line 539 of file Type.cpp.
References lldb_private::eAddressTypeFile, lldb_private::eAddressTypeHost, error(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::DataExtractor::GetByteSize(), GetByteSize(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::DataExtractor::PeekData(), lldb_private::Process::ReadMemory(), and lldb_private::DataExtractor::SetData().
|
protected |
Definition at line 586 of file Type.cpp.
References lldb_private::CompilerType::AddConstModifier(), lldb_private::CompilerType::AddPtrAuthModifier(), lldb_private::CompilerType::AddRestrictModifier(), lldb_private::CompilerType::AddVolatileModifier(), lldb_private::CompilerType::CreateTypedef(), lldb::eBasicTypeVoid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, lldb::eLanguageTypeC, Forward, Full, lldb_private::CompilerType::GetAtomicType(), lldb_private::CompilerType::GetBasicTypeFromAST(), GetEncodingType(), GetForwardCompilerType(), lldb_private::UserID::GetID(), lldb_private::GetLog(), lldb_private::CompilerType::GetLValueReferenceType(), lldb_private::CompilerType::GetPointerType(), lldb_private::CompilerType::GetRValueReferenceType(), GetSymbolFile(), lldb_private::CompilerType::IsValid(), Layout, LLDB_INVALID_UID, LLDB_LOG_ERROR, m_compiler_type, m_compiler_type_resolve_state, m_encoding_uid, m_encoding_uid_type, m_name, m_payload, m_symbol_file, ResolveCompilerType(), lldb_private::Symbols, and Type().
Referenced by GetForwardCompilerType(), GetFullCompilerType(), GetLayoutCompilerType(), and ResolveCompilerType().
|
inline |
Definition at line 566 of file Type.h.
References m_encoding_type, and Type().
|
inline |
|
inline |
bool Type::WriteToMemory | ( | ExecutionContext * | exe_ctx, |
lldb::addr_t | address, | ||
AddressType | address_type, | ||
DataExtractor & | data ) |
|
friend |
|
protected |
Definition at line 584 of file Type.h.
Referenced by Dump(), GetByteSize(), GetDescription(), Type(), and Type().
|
protected |
|
protected |
Definition at line 587 of file Type.h.
Referenced by Dump(), GetDescription(), GetExeModule(), GetForwardCompilerType(), GetFullCompilerType(), GetLayoutCompilerType(), ResolveCompilerType(), and Type().
|
protected |
Definition at line 588 of file Type.h.
Referenced by ResolveCompilerType(), and Type().
|
protected |
The symbol context in which this type is defined.
Definition at line 580 of file Type.h.
Referenced by Dump(), GetSymbolContextScope(), GetSymbolContextScope(), SetSymbolContextScope(), and Type().
|
protected |
Definition at line 586 of file Type.h.
Referenced by Dump(), GetDeclaration(), GetDescription(), and Type().
|
protected |
Definition at line 581 of file Type.h.
Referenced by GetEncodingType(), and SetEncodingType().
|
protected |
Definition at line 582 of file Type.h.
Referenced by Dump(), GetDescription(), GetEncodingType(), GetTypedefType(), ResolveCompilerType(), and Type().
|
protected |
Definition at line 583 of file Type.h.
Referenced by Dump(), GetByteSize(), GetDescription(), GetEncodingMask(), IsTypedef(), IsValidType(), ResolveCompilerType(), and Type().
|
protected |
|
protected |
Language-specific flags.
Definition at line 590 of file Type.h.
Referenced by GetPayload(), ResolveCompilerType(), SetPayload(), Type(), and Type().
|
protected |
Definition at line 578 of file Type.h.
Referenced by GetByteSize(), GetEncodingType(), GetModule(), GetSymbolFile(), GetSymbolFile(), GetTypedefType(), ResolveCompilerType(), and Type().