LLDB mainline
|
#include <SymbolFileCTF.h>
Classes | |
struct | ctf_header_t |
struct | ctf_preamble_t |
struct | ctf_stype_t |
struct | ctf_type_t |
Public Types | |
enum | TypeKind : uint32_t { eUnknown = 0 , eInteger = 1 , eFloat = 2 , ePointer = 3 , eArray = 4 , eFunction = 5 , eStruct = 6 , eUnion = 7 , eEnum = 8 , eForward = 9 , eTypedef = 10 , eVolatile = 11 , eConst = 12 , eRestrict = 13 , eSlice = 14 } |
Public Types inherited from lldb_private::SymbolFile | |
enum | Abilities { CompileUnits = (1u << 0) , LineTables = (1u << 1) , Functions = (1u << 2) , Blocks = (1u << 3) , GlobalVariables = (1u << 4) , LocalVariables = (1u << 5) , VariableTypes = (1u << 6) , kAllAbilities = ((1u << 7) - 1u) } |
Public Member Functions | |
SymbolFileCTF (lldb::ObjectFileSP objfile_sp) | |
llvm::StringRef | GetPluginName () override |
uint32_t | CalculateAbilities () override |
void | InitializeObject () override |
Initialize the SymbolFile object. | |
lldb::LanguageType | ParseLanguage (CompileUnit &comp_unit) override |
bool | ParseHeader () |
size_t | ParseFunctions (CompileUnit &comp_unit) override |
size_t | ParseObjects (CompileUnit &comp_unit) |
bool | ParseLineTable (CompileUnit &comp_unit) override |
bool | ParseDebugMacros (CompileUnit &comp_unit) override |
bool | ParseSupportFiles (CompileUnit &comp_unit, SupportFileList &support_files) override |
size_t | ParseTypes (CompileUnit &cu) override |
bool | ParseImportedModules (const SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override |
size_t | ParseBlocksRecursive (Function &func) override |
size_t | ParseVariablesForContext (const SymbolContext &sc) override |
uint32_t | CalculateNumCompileUnits () override |
lldb::CompUnitSP | ParseCompileUnitAtIndex (uint32_t index) override |
Type * | ResolveTypeUID (lldb::user_id_t type_uid) override |
std::optional< ArrayInfo > | GetDynamicArrayInfoForUID (lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override |
If type_uid points to an array type, return its characteristics. | |
bool | CompleteType (CompilerType &compiler_type) override |
uint32_t | ResolveSymbolContext (const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override |
void | AddSymbols (Symtab &symtab) override |
void | GetTypes (lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override |
void | FindTypes (const lldb_private::TypeQuery &match, lldb_private::TypeResults &results) override |
Find types using a type-matching object that contains all search parameters. | |
void | FindTypesByRegex (const lldb_private::RegularExpression ®ex, uint32_t max_matches, lldb_private::TypeMap &types) |
void | FindFunctions (const lldb_private::Module::LookupInfo &lookup_info, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool include_inlines, lldb_private::SymbolContextList &sc_list) override |
void | FindFunctions (const lldb_private::RegularExpression ®ex, bool include_inlines, lldb_private::SymbolContextList &sc_list) override |
void | FindGlobalVariables (lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override |
void | FindGlobalVariables (const lldb_private::RegularExpression ®ex, uint32_t max_matches, lldb_private::VariableList &variables) override |
Public Member Functions inherited from lldb_private::SymbolFileCommon | |
SymbolFileCommon (lldb::ObjectFileSP objfile_sp) | |
~SymbolFileCommon () override=default | |
uint32_t | GetAbilities () override |
Get a mask of what this symbol file supports for the object file that it was constructed with. | |
Symtab * | GetSymtab (bool can_create=true) override |
ObjectFile * | GetObjectFile () override |
const ObjectFile * | GetObjectFile () const override |
ObjectFile * | GetMainObjectFile () override |
void | SectionFileAddressesChanged () override |
Notify the SymbolFile that the file addresses in the Sections for this module have been changed. | |
uint32_t | GetNumCompileUnits () override |
lldb::CompUnitSP | GetCompileUnitAtIndex (uint32_t idx) override |
llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemForLanguage (lldb::LanguageType language) override |
void | Dump (Stream &s) override |
uint64_t | GetDebugInfoSize (bool load_all_debug_info=false) override |
Metrics gathering functions. | |
bool | GetDebugInfoIndexWasLoadedFromCache () const override |
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module index cache. | |
void | SetDebugInfoIndexWasLoadedFromCache () override |
bool | GetDebugInfoIndexWasSavedToCache () const override |
void | SetDebugInfoIndexWasSavedToCache () override |
bool | GetDebugInfoHadFrameVariableErrors () const override |
Accessors for the bool that indicates if there was debug info, but errors stopped variables from being able to be displayed correctly. | |
void | SetDebugInfoHadFrameVariableErrors () override |
lldb::TypeSP | MakeType (lldb::user_id_t uid, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, Type::EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, Type::ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0) override |
This function is used to create types that belong to a SymbolFile. | |
lldb::TypeSP | CopyType (const lldb::TypeSP &other_type) override |
Public Member Functions inherited from lldb_private::SymbolFile | |
SymbolFile ()=default | |
~SymbolFile () override=default | |
virtual SymbolFile * | GetBackingSymbolFile () |
SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand. | |
virtual std::recursive_mutex & | GetModuleMutex () const |
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this symbol file modifies type information in. | |
virtual bool | GetLoadDebugInfoEnabled () |
Whether debug info will be loaded or not. | |
virtual void | SetLoadDebugInfoEnabled () |
Specify debug info should be loaded. | |
virtual XcodeSDK | ParseXcodeSDK (CompileUnit &comp_unit) |
Return the Xcode SDK comp_unit was compiled against. | |
virtual llvm::SmallSet< lldb::LanguageType, 4 > | ParseAllLanguages (CompileUnit &comp_unit) |
This function exists because SymbolFileDWARFDebugMap may extra compile units which aren't exposed as "real" compile units. | |
virtual bool | ForEachExternalModule (lldb_private::CompileUnit &comp_unit, llvm::DenseSet< lldb_private::SymbolFile * > &visited_symbol_files, llvm::function_ref< bool(Module &)> lambda) |
Apply a lambda to each external lldb::Module referenced by this comp_unit . | |
virtual bool | ParseIsOptimized (CompileUnit &comp_unit) |
virtual void | ParseDeclsForContext (CompilerDeclContext decl_ctx) |
virtual CompilerDecl | GetDeclForUID (lldb::user_id_t uid) |
virtual CompilerDeclContext | GetDeclContextForUID (lldb::user_id_t uid) |
virtual CompilerDeclContext | GetDeclContextContainingUID (lldb::user_id_t uid) |
virtual std::vector< CompilerContext > | GetCompilerContextForUID (lldb::user_id_t uid) |
Status | GetFrameVariableError (StackFrame &frame) |
Get an error that describes why variables might be missing for a given symbol context. | |
virtual Status | CalculateFrameVariableError (StackFrame &frame) |
Subclasses will override this function to for GetFrameVariableError(). | |
virtual uint32_t | ResolveSymbolContext (const SourceLocationSpec &src_location_spec, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) |
virtual void | DumpClangAST (Stream &s, llvm::StringRef filter, bool show_colors) |
virtual void | GetMangledNamesForFunction (const std::string &scope_qualified_name, std::vector< ConstString > &mangled_names) |
virtual llvm::Expected< SymbolContext > | ResolveFunctionCallLabel (FunctionCallLabel &label) |
Resolves the function corresponding to the specified LLDB function call label . | |
virtual void | PreloadSymbols () |
virtual CompilerDeclContext | FindNamespace (ConstString name, const CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces=false) |
Finds a namespace of name name and whose parent context is parent_decl_ctx. | |
virtual std::vector< std::unique_ptr< CallEdge > > | ParseCallEdgesInFunction (UserID func_id) |
virtual lldb::UnwindPlanSP | GetUnwindPlan (const Address &address, const RegisterInfoResolver &resolver) |
virtual llvm::Expected< lldb::addr_t > | GetParameterStackSize (Symbol &symbol) |
Return the number of stack bytes taken up by the parameters to this function. | |
virtual StatsDuration::Duration | GetDebugInfoParseTime () |
Return the time taken to parse the debug information. | |
virtual StatsDuration::Duration | GetDebugInfoIndexTime () |
Return the time it took to index the debug information in the object file. | |
virtual void | ResetStatistics () |
Reset the statistics for the symbol file. | |
virtual ModuleList | GetDebugInfoModules () |
Get the additional modules that this symbol file uses to parse debug info. | |
virtual bool | GetSeparateDebugInfo (StructuredData::Dictionary &d, bool errors_only, bool load_all_debug_info=false) |
Return true if separate debug info files are supported and this function succeeded, false otherwise. | |
virtual DWOStats | GetDwoStats () |
Retrieves statistics about DWO files associated with this symbol file. | |
std::unordered_map< lldb::CompUnitSP, Args > | GetCompileOptions () |
Returns a map of compilation unit to the compile option arguments associated with that compilation unit. | |
std::string | GetObjectName () const |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static llvm::StringRef | GetPluginNameStatic () |
static llvm::StringRef | GetPluginDescriptionStatic () |
static lldb_private::SymbolFile * | CreateInstance (lldb::ObjectFileSP objfile_sp) |
static bool | classof (const SymbolFileCommon *obj) |
Static Public Member Functions inherited from lldb_private::SymbolFile | |
static SymbolFile * | FindPlugin (lldb::ObjectFileSP objfile_sp) |
static bool | classof (const SymbolFile *obj) |
Private Types | |
enum | Flags : uint32_t { eFlagCompress = (1u << 0) , eFlagNewFuncInfo = (1u << 1) , eFlagIdxSorted = (1u << 2) , eFlagDynStr = (1u << 3) } |
enum | IntEncoding : uint32_t { eSigned = 0x1 , eChar = 0x2 , eBool = 0x4 , eVarArgs = 0x8 } |
Private Member Functions | |
llvm::Expected< std::unique_ptr< CTFType > > | ParseType (lldb::offset_t &offset, lldb::user_id_t uid) |
llvm::Expected< lldb::TypeSP > | CreateType (CTFType *ctf_type) |
llvm::Expected< lldb::TypeSP > | CreateInteger (const CTFInteger &ctf_integer) |
llvm::Expected< lldb::TypeSP > | CreateModifier (const CTFModifier &ctf_modifier) |
llvm::Expected< lldb::TypeSP > | CreateTypedef (const CTFTypedef &ctf_typedef) |
llvm::Expected< lldb::TypeSP > | CreateArray (const CTFArray &ctf_array) |
llvm::Expected< lldb::TypeSP > | CreateEnum (const CTFEnum &ctf_enum) |
llvm::Expected< lldb::TypeSP > | CreateFunction (const CTFFunction &ctf_function) |
llvm::Expected< lldb::TypeSP > | CreateRecord (const CTFRecord &ctf_record) |
llvm::Expected< lldb::TypeSP > | CreateForward (const CTFForward &ctf_forward) |
llvm::StringRef | ReadString (lldb::offset_t offset) const |
std::vector< uint16_t > | GetFieldSizes (lldb::offset_t field_offset, uint32_t fields, uint32_t struct_size) |
Private Attributes | |
DataExtractor | m_data |
lldb::offset_t | m_body_offset = 0 |
The start offset of the CTF body into m_data. | |
TypeSystemClang * | m_ast |
lldb::CompUnitSP | m_comp_unit_sp |
std::optional< ctf_header_t > | m_header |
llvm::DenseMap< lldb::user_id_t, std::unique_ptr< CTFType > > | m_ctf_types |
Parsed CTF types. | |
llvm::DenseMap< lldb::user_id_t, lldb::TypeSP > | m_types |
Parsed LLDB types. | |
llvm::DenseMap< lldb::opaque_compiler_type_t, const CTFType * > | m_compiler_types |
To complete types, we need a way to map (imcomplete) compiler types back to parsed CTF types. | |
std::vector< lldb::FunctionSP > | m_functions |
std::vector< lldb::VariableSP > | m_variables |
Static Private Attributes | |
static char | ID |
LLVM RTTI support. | |
static constexpr uint16_t | g_ctf_magic = 0xcff1 |
static constexpr uint8_t | g_ctf_version = 4 |
static constexpr uint16_t | g_ctf_field_threshold = 0x2000 |
bool | isA (const void *ClassID) const override |
LLVM RTTI support. | |
static bool | classof (const SymbolFile *obj) |
Additional Inherited Members | |
Protected Member Functions inherited from lldb_private::SymbolFileCommon | |
virtual TypeList & | GetTypeList () |
void | SetCompileUnitAtIndex (uint32_t idx, const lldb::CompUnitSP &cu_sp) |
Protected Member Functions inherited from lldb_private::SymbolFile | |
void | AssertModuleLock () |
virtual void | GetCompileOptions (std::unordered_map< lldb::CompUnitSP, lldb_private::Args > &args) |
Protected Attributes inherited from lldb_private::SymbolFileCommon | |
lldb::ObjectFileSP | m_objfile_sp |
std::optional< std::vector< lldb::CompUnitSP > > | m_compile_units |
TypeList | m_type_list |
uint32_t | m_abilities = 0 |
bool | m_calculated_abilities = false |
bool | m_index_was_loaded_from_cache = false |
bool | m_index_was_saved_to_cache = false |
bool | m_debug_info_had_variable_errors = false |
Set to true if any variable feteching errors have been found when calling GetFrameVariableError(). |
Definition at line 22 of file SymbolFileCTF.h.
|
private |
Enumerator | |
---|---|
eFlagCompress | |
eFlagNewFuncInfo | |
eFlagIdxSorted | |
eFlagDynStr |
Definition at line 152 of file SymbolFileCTF.h.
|
private |
Enumerator | |
---|---|
eSigned | |
eChar | |
eBool | |
eVarArgs |
Definition at line 159 of file SymbolFileCTF.h.
enum lldb_private::SymbolFileCTF::TypeKind : uint32_t |
Enumerator | |
---|---|
eUnknown | |
eInteger | |
eFloat | |
ePointer | |
eArray | |
eFunction | |
eStruct | |
eUnion | |
eEnum | |
eForward | |
eTypedef | |
eVolatile | |
eConst | |
eRestrict | |
eSlice |
Definition at line 133 of file SymbolFileCTF.h.
SymbolFileCTF::SymbolFileCTF | ( | lldb::ObjectFileSP | objfile_sp | ) |
Definition at line 52 of file SymbolFileCTF.cpp.
References lldb_private::SymbolFileCommon::SymbolFileCommon().
Referenced by CreateInstance().
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 1001 of file SymbolFileCTF.cpp.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 936 of file SymbolFileCTF.cpp.
References lldb_private::SymbolFile::Functions, lldb_private::SymbolFile::GlobalVariables, lldb_private::SymbolFileCommon::m_objfile_sp, ParseHeader(), and lldb_private::SymbolFile::VariableTypes.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFileCommon.
Definition at line 85 of file SymbolFileCTF.h.
|
inlinestatic |
Definition at line 32 of file SymbolFileCTF.h.
References ID, and lldb_private::SymbolFile::isA().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 514 of file SymbolFileCTF.cpp.
References lldb_private::TypeSystemClang::AddFieldToRecordType(), lldb::eAccessPublic, lldb_private::CTFRecord::fields, lldb_private::Type::GetByteSize(), lldb_private::Type::GetFullCompilerType(), lldb_private::GetLog(), lldb_private::CompilerType::GetOpaqueQualType(), LLDB_LOG, m_ast, m_compiler_types, m_ctf_types, lldb_private::CTFRecord::Field::name, ResolveTypeUID(), lldb_private::Symbols, lldb_private::CTFRecord::Field::type, and lldb_private::CTFType::uid.
|
private |
Definition at line 433 of file SymbolFileCTF.cpp.
References lldb_private::Type::eEncodingIsUID, lldb_private::Type::Full, lldb_private::Type::GetByteSize(), lldb_private::Type::GetFullCompilerType(), LLDB_INVALID_UID, m_ast, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFArray::nelems, ResolveTypeUID(), lldb_private::CTFArray::type, and lldb_private::CTFType::uid.
Referenced by CreateType().
|
private |
Definition at line 457 of file SymbolFileCTF.cpp.
References lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb::eBasicTypeInt, lldb_private::Type::eEncodingIsUID, lldb_private::Type::Full, LLDB_INVALID_UID, m_ast, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFEnum::Value::name, lldb_private::CTFType::name, lldb_private::CTFEnum::size, lldb_private::CTFType::uid, lldb_private::CTFEnum::Value::value, and lldb_private::CTFEnum::values.
Referenced by CreateType().
|
private |
Definition at line 561 of file SymbolFileCTF.cpp.
References lldb::eAccessPublic, lldb_private::Type::eEncodingIsUID, lldb::eLanguageTypeC, lldb_private::Type::Forward, LLDB_INVALID_UID, m_ast, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFType::name, and lldb_private::CTFType::uid.
Referenced by CreateType().
|
private |
Definition at line 477 of file SymbolFileCTF.cpp.
References lldb_private::CTFFunction::args, lldb_private::Type::eEncodingIsUID, lldb_private::Type::Full, lldb_private::Type::GetFullCompilerType(), LLDB_INVALID_UID, m_ast, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFType::name, ResolveTypeUID(), lldb_private::CTFFunction::return_type, lldb_private::CTFType::uid, and lldb_private::CTFFunction::variadic.
Referenced by CreateType().
|
static |
Definition at line 68 of file SymbolFileCTF.cpp.
References SymbolFileCTF().
Referenced by Initialize(), and Terminate().
|
private |
Definition at line 334 of file SymbolFileCTF.cpp.
References lldb_private::CTFInteger::bits, lldb::eBasicTypeBool, lldb::eBasicTypeInvalid, lldb::eBasicTypeVoid, lldb_private::Type::eEncodingIsUID, lldb_private::CTFInteger::encoding, eSigned, lldb_private::Type::Full, lldb_private::TypeSystemClang::GetBasicTypeEnumeration(), GetBytes(), lldb_private::CompilerType::GetDisplayTypeName(), lldb_private::ConstString::GetStringRef(), lldb_private::CompilerType::IsIntegerType(), LLDB_INVALID_UID, m_ast, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFType::name, and lldb_private::CTFType::uid.
Referenced by CreateType().
|
private |
Definition at line 377 of file SymbolFileCTF.cpp.
References lldb_private::CompilerType::AddConstModifier(), lldb_private::CompilerType::AddRestrictModifier(), lldb_private::CompilerType::AddVolatileModifier(), lldb_private::CTFType::eConst, lldb_private::Type::eEncodingIsUID, lldb_private::CTFType::ePointer, lldb_private::CTFType::eRestrict, lldb_private::CTFType::eVolatile, lldb_private::Type::Full, lldb_private::Type::GetFullCompilerType(), lldb_private::CompilerType::GetPointerType(), lldb_private::CTFType::kind, LLDB_INVALID_UID, lldb_private::SymbolFileCommon::MakeType(), ResolveTypeUID(), lldb_private::CTFModifier::type, and lldb_private::CTFType::uid.
Referenced by CreateType().
|
private |
Definition at line 502 of file SymbolFileCTF.cpp.
References lldb::eAccessPublic, lldb_private::Type::eEncodingIsUID, lldb::eLanguageTypeC, lldb_private::Type::Forward, lldb_private::CompilerType::GetOpaqueQualType(), lldb_private::CTFType::kind, LLDB_INVALID_UID, m_ast, m_compiler_types, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFType::name, lldb_private::CTFRecord::size, TranslateRecordKind(), and lldb_private::CTFType::uid.
Referenced by CreateType().
Definition at line 571 of file SymbolFileCTF.cpp.
References CreateArray(), CreateEnum(), CreateForward(), CreateFunction(), CreateInteger(), CreateModifier(), CreateRecord(), CreateTypedef(), lldb_private::CTFType::eArray, lldb_private::CTFType::eConst, lldb_private::CTFType::eEnum, lldb_private::CTFType::eFloat, lldb_private::CTFType::eForward, lldb_private::CTFType::eFunction, lldb_private::CTFType::eInteger, lldb_private::CTFType::ePointer, lldb_private::CTFType::eRestrict, lldb_private::CTFType::eSlice, lldb_private::CTFType::eStruct, lldb_private::CTFType::eTypedef, lldb_private::CTFType::eUnion, lldb_private::CTFType::eUnknown, lldb_private::CTFType::eVolatile, lldb_private::CTFType::kind, lldb_private::CTFType::name, and lldb_private::CTFType::uid.
Referenced by ResolveTypeUID().
|
private |
Definition at line 413 of file SymbolFileCTF.cpp.
References lldb_private::CompilerType::CreateTypedef(), lldb_private::Type::eEncodingIsUID, lldb_private::Type::Full, lldb_private::Type::GetFullCompilerType(), LLDB_INVALID_UID, m_ast, lldb_private::SymbolFileCommon::MakeType(), lldb_private::CTFType::name, ResolveTypeUID(), lldb_private::CTFTypedef::type, and lldb_private::CTFType::uid.
Referenced by CreateType().
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 1074 of file SymbolFileCTF.cpp.
References lldb_private::SymbolContextList::Append(), lldb_private::SymbolContext::comp_unit, lldb_private::SymbolContext::function, lldb_private::Module::LookupInfo::GetLookupName(), m_comp_unit_sp, m_functions, and ParseFunctions().
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 1091 of file SymbolFileCTF.cpp.
References lldb_private::SymbolContextList::Append(), lldb_private::SymbolContext::comp_unit, lldb_private::RegularExpression::Execute(), lldb_private::SymbolContext::function, m_comp_unit_sp, and m_functions.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 1121 of file SymbolFileCTF.cpp.
References lldb_private::VariableList::AddVariable(), lldb_private::RegularExpression::Execute(), m_comp_unit_sp, m_variables, and ParseObjects().
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 1104 of file SymbolFileCTF.cpp.
References lldb_private::VariableList::AddVariable(), m_comp_unit_sp, m_variables, and ParseObjects().
|
overridevirtual |
Find types using a type-matching object that contains all search parameters.
[in] | query | A type matching object that contains all of the details of the type search. |
[in] | results | Any matching types will be populated into the results object using TypeMap::InsertUnique(...). |
Reimplemented from lldb_private::SymbolFile.
Definition at line 1043 of file SymbolFileCTF.cpp.
References lldb_private::TypeResults::AlreadySearched(), lldb_private::TypeResults::Done(), lldb_private::TypeQuery::GetTypeBasename(), lldb_private::SymbolFileCommon::GetTypeList(), lldb_private::TypeResults::InsertUnique(), and lldb_private::Types.
void SymbolFileCTF::FindTypesByRegex | ( | const lldb_private::RegularExpression & | regex, |
uint32_t | max_matches, | ||
lldb_private::TypeMap & | types ) |
Definition at line 1059 of file SymbolFileCTF.cpp.
References lldb_private::RegularExpression::Execute(), lldb_private::SymbolFileCommon::GetTypeList(), lldb_private::TypeMap::Insert(), m_comp_unit_sp, ParseTypes(), and lldb_private::Types.
|
inlineoverridevirtual |
If type_uid
points to an array type, return its characteristics.
To support variable-length array types, this function takes an optional ExecutionContext
. If exe_ctx
is non-null, the dynamic characteristics for that context are returned.
Implements lldb_private::SymbolFile.
Definition at line 90 of file SymbolFileCTF.h.
|
private |
|
static |
Definition at line 64 of file SymbolFileCTF.cpp.
Referenced by Initialize().
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 48 of file SymbolFileCTF.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 41 of file SymbolFileCTF.h.
Referenced by GetPluginName(), and Initialize().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 104 of file SymbolFileCTF.h.
|
static |
Definition at line 55 of file SymbolFileCTF.cpp.
References CreateInstance(), GetPluginDescriptionStatic(), GetPluginNameStatic(), and lldb_private::PluginManager::RegisterPlugin().
|
overridevirtual |
Initialize the SymbolFile object.
The SymbolFile object with the best set of abilities (detected in "uint32_t SymbolFile::GetAbilities()) will have this function called if it is chosen to parse an object file. More complete initialization can happen in this function which will get called prior to any other functions in the SymbolFile protocol.
Reimplemented from lldb_private::SymbolFile.
Definition at line 267 of file SymbolFileCTF.cpp.
References lldb::eLanguageTypeC, lldb_private::eLazyBoolNo, lldb_private::GetLog(), lldb_private::SymbolFileCommon::GetTypeSystemForLanguage(), LLDB_LOG_ERROR, m_ast, m_comp_unit_sp, lldb_private::SymbolFileCommon::m_objfile_sp, ParseTypes(), and lldb_private::Symbols.
|
inlineoverridevirtual |
LLVM RTTI support.
Reimplemented from lldb_private::SymbolFileCommon.
Definition at line 29 of file SymbolFileCTF.h.
References ID, and lldb_private::SymbolFileCommon::isA().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 81 of file SymbolFileCTF.h.
|
overridevirtual |
Implements lldb_private::SymbolFileCommon.
Definition at line 990 of file SymbolFileCTF.cpp.
References m_comp_unit_sp.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 66 of file SymbolFileCTF.h.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 769 of file SymbolFileCTF.cpp.
References lldb_private::CompileUnit::AddFunction(), lldb_private::Symtab::eDebugYes, lldb_private::Type::eEncodingIsUID, eFunction, lldb::eSymbolTypeCode, eUnknown, lldb_private::Symtab::eVisibilityAny, lldb_private::Symtab::FindSymbolWithType(), lldb_private::Type::Full, lldb_private::Symbol::GetAddress(), lldb_private::Symbol::GetByteSize(), lldb_private::Symbol::GetFileAddress(), lldb_private::Type::GetFullCompilerType(), GetKind(), lldb_private::GetLog(), lldb_private::Symbol::GetMangled(), lldb_private::ModuleChild::GetModule(), lldb_private::Symbol::GetName(), lldb_private::SymbolFileCommon::GetObjectFile(), GetVLen(), LLDB_INVALID_UID, LLDB_LOG, m_ast, m_body_offset, m_data, m_functions, m_header, m_types, lldb_private::SymbolFileCommon::MakeType(), ParseHeader(), ResolveTypeUID(), and lldb_private::Symbols.
Referenced by FindFunctions().
bool SymbolFileCTF::ParseHeader | ( | ) |
Definition at line 72 of file SymbolFileCTF.cpp.
References lldb_private::Stream::AsRawOstream(), lldb::eDescriptionLevelBrief, eFlagCompress, lldb::eSectionTypeCTF, lldb_private::SectionList::FindSectionByType(), lldb_private::SymbolFileCTF::ctf_preamble_t::flags, lldb_private::SymbolFileCTF::ctf_header_t::funcoff, g_ctf_magic, g_ctf_version, lldb_private::StreamString::GetData(), lldb_private::GetLog(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), lldb_private::SymbolFileCTF::ctf_header_t::lbloff, LLDB_LOG, m_body_offset, m_data, m_header, lldb_private::SymbolFileCommon::m_objfile_sp, lldb_private::SymbolFileCTF::ctf_preamble_t::magic, lldb_private::SymbolFileCTF::ctf_header_t::objtoff, lldb_private::SymbolFileCTF::ctf_header_t::parlabel, lldb_private::SymbolFileCTF::ctf_header_t::parname, lldb_private::SymbolFileCTF::ctf_header_t::preamble, lldb_private::SymbolFileCTF::ctf_header_t::strlen, lldb_private::SymbolFileCTF::ctf_header_t::stroff, lldb_private::Symbols, lldb_private::SymbolFileCTF::ctf_header_t::typeoff, and lldb_private::SymbolFileCTF::ctf_preamble_t::version.
Referenced by CalculateAbilities(), ParseFunctions(), ParseObjects(), and ParseTypes().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 75 of file SymbolFileCTF.h.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 54 of file SymbolFileCTF.h.
References lldb::eLanguageTypeUnknown.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 64 of file SymbolFileCTF.h.
size_t SymbolFileCTF::ParseObjects | ( | CompileUnit & | comp_unit | ) |
Definition at line 884 of file SymbolFileCTF.cpp.
References lldb_private::RangeVector< B, S, N >::Append(), CreateDWARFExpression(), lldb_private::Symtab::eDebugYes, lldb::eSymbolTypeData, lldb::eValueTypeVariableGlobal, lldb_private::Symtab::eVisibilityAny, lldb_private::Symtab::FindSymbolWithType(), lldb_private::GetLog(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), LLDB_LOG, m_ast, m_body_offset, m_comp_unit_sp, m_data, m_header, m_variables, ParseHeader(), and lldb_private::Symbols.
Referenced by FindGlobalVariables(), FindGlobalVariables(), and ParseVariablesForContext().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 68 of file SymbolFileCTF.h.
|
private |
Definition at line 609 of file SymbolFileCTF.cpp.
References lldb_private::bits(), eArray, eConst, eEnum, eFloat, eForward, eFunction, eInteger, ePointer, eRestrict, eSlice, eStruct, eTypedef, eUnion, eUnknown, eVolatile, g_ctf_field_threshold, GetBits(), GetEncoding(), GetKind(), lldb_private::SymbolFileCTF::ctf_stype_t::GetSize(), lldb_private::SymbolFileCTF::ctf_stype_t::GetType(), GetVLen(), lldb_private::SymbolFileCTF::ctf_stype_t::info, m_data, lldb_private::SymbolFileCTF::ctf_stype_t::name, ReadString(), and lldb_private::SymbolFileCTF::ctf_stype_t::size.
Referenced by ParseTypes().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 709 of file SymbolFileCTF.cpp.
References lldb_private::GetLog(), LLDB_LOG, LLDB_LOG_ERROR, m_ast, m_body_offset, m_ctf_types, m_header, m_types, ParseHeader(), ParseType(), ResolveTypeUID(), and lldb_private::Symbols.
Referenced by FindTypesByRegex(), and InitializeObject().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 997 of file SymbolFileCTF.cpp.
References m_comp_unit_sp, and ParseObjects().
|
private |
Definition at line 285 of file SymbolFileCTF.cpp.
References m_body_offset, m_data, and m_header.
Referenced by ParseType().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 946 of file SymbolFileCTF.cpp.
References lldb_private::SymbolContext::function, lldb_private::Address::GetFileAddress(), lldb_private::SymbolFile::GetModuleMutex(), m_functions, lldb_private::SymbolFileCommon::m_objfile_sp, m_variables, lldb_private::SymbolContext::symbol, and lldb_private::SymbolContext::variable.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 1006 of file SymbolFileCTF.cpp.
References CreateType(), lldb_private::GetLog(), lldb_private::StreamString::GetString(), LLDB_LOG_ERROR, LLDB_LOGV, m_ctf_types, m_types, lldb_private::Symbols, and lldb_private::CTFType::uid.
Referenced by CompleteType(), CreateArray(), CreateFunction(), CreateModifier(), CreateTypedef(), ParseFunctions(), and ParseTypes().
|
static |
Definition at line 60 of file SymbolFileCTF.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
staticconstexprprivate |
Definition at line 260 of file SymbolFileCTF.h.
Referenced by ParseType().
|
staticconstexprprivate |
Definition at line 258 of file SymbolFileCTF.h.
Referenced by ParseHeader().
|
staticconstexprprivate |
Definition at line 259 of file SymbolFileCTF.h.
Referenced by ParseHeader().
|
staticprivate |
LLVM RTTI support.
Definition at line 24 of file SymbolFileCTF.h.
|
private |
Definition at line 239 of file SymbolFileCTF.h.
Referenced by CompleteType(), CreateArray(), CreateEnum(), CreateForward(), CreateFunction(), CreateInteger(), CreateRecord(), CreateTypedef(), InitializeObject(), ParseFunctions(), ParseObjects(), and ParseTypes().
|
private |
The start offset of the CTF body into m_data.
If the body is uncompressed, m_data contains the header and the body and the body starts after the header. If the body is compressed, m_data only contains the body and the offset is zero.
Definition at line 237 of file SymbolFileCTF.h.
Referenced by ParseFunctions(), ParseHeader(), ParseObjects(), ParseTypes(), and ReadString().
|
private |
Definition at line 240 of file SymbolFileCTF.h.
Referenced by FindFunctions(), FindFunctions(), FindGlobalVariables(), FindGlobalVariables(), FindTypesByRegex(), InitializeObject(), ParseCompileUnitAtIndex(), ParseObjects(), and ParseVariablesForContext().
|
private |
To complete types, we need a way to map (imcomplete) compiler types back to parsed CTF types.
Definition at line 253 of file SymbolFileCTF.h.
Referenced by CompleteType(), and CreateRecord().
|
private |
Parsed CTF types.
Definition at line 245 of file SymbolFileCTF.h.
Referenced by CompleteType(), ParseTypes(), and ResolveTypeUID().
|
private |
Definition at line 231 of file SymbolFileCTF.h.
Referenced by ParseFunctions(), ParseHeader(), ParseObjects(), ParseType(), and ReadString().
|
private |
Definition at line 255 of file SymbolFileCTF.h.
Referenced by FindFunctions(), FindFunctions(), ParseFunctions(), and ResolveSymbolContext().
|
private |
Definition at line 242 of file SymbolFileCTF.h.
Referenced by ParseFunctions(), ParseHeader(), ParseObjects(), ParseTypes(), and ReadString().
|
private |
Parsed LLDB types.
Definition at line 248 of file SymbolFileCTF.h.
Referenced by ParseFunctions(), ParseTypes(), and ResolveTypeUID().
|
private |
Definition at line 256 of file SymbolFileCTF.h.
Referenced by FindGlobalVariables(), FindGlobalVariables(), ParseObjects(), and ResolveSymbolContext().