9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDEBUGMAP_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDEBUGMAP_H
15#include "llvm/Support/Chrono.h"
35 bool isA(
const void *ClassID)
const override {
36 return ClassID == &
ID || SymbolFileCommon::isA(ClassID);
65 llvm::SmallSet<lldb::LanguageType, 4>
84 std::vector<lldb_private::SourceModule> &imported_modules)
override;
103 lldb::SymbolContextItem resolve_scope,
107 lldb::SymbolContextItem resolve_scope,
123 bool include_inlines,
126 bool include_inlines,
132 llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
135 FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> context,
137 llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
142 bool only_root_namespaces)
override;
144 lldb::TypeClass type_mask,
146 std::vector<std::unique_ptr<lldb_private::CallEdge>>
158 std::unordered_map<lldb::CompUnitSP, lldb_private::Args> &args)
override;
232 std::vector<CompileUnitInfo *> &cu_infos);
257 oso_idx < num_oso_idxs; ++oso_idx) {
259 if (closure(oso_dwarf))
273 const CompileUnitInfo *comp_unit_info);
276 const CompileUnitInfo *comp_unit_info);
281 const std::vector<uint32_t> &name_symbol_indexes,
uint32_t max_matches,
285 const lldb::CompUnitSP &cu_sp);
301 bool must_be_implementation);
340 std::map<std::pair<lldb_private::ConstString, llvm::sys::TimePoint<>>,
Identifies a DWARF debug info entry within a given Module.
std::optional< uint32_t > file_index() const
bool operator<(const OSOEntry &rhs) const
uint32_t GetExeSymbolIndex() const
OSOEntry(uint32_t exe_sym_idx, lldb::addr_t oso_file_addr)
lldb::addr_t m_oso_file_addr
void SetOSOFileAddress(lldb::addr_t oso_file_addr)
lldb::addr_t GetOSOFileAddress() const
std::vector< uint32_t > m_func_indexes
SymbolFileDWARF * GetSymbolFileByOSOIndex(uint32_t oso_idx)
void FindTypes(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, llvm::DenseSet< lldb_private::SymbolFile * > &searched_symbol_files, lldb_private::TypeMap &types) override
static SymbolFileDWARF * GetSymbolFileAsSymbolFileDWARF(SymbolFile *sym_file)
static llvm::StringRef GetPluginDescriptionStatic()
lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation)
lldb_private::ObjectFile * GetObjectFileByOSOIndex(uint32_t oso_idx)
std::map< std::pair< lldb_private::ConstString, llvm::sys::TimePoint<> >, OSOInfoSP > m_oso_map
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
void GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
void DumpClangAST(lldb_private::Stream &s) override
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
SymbolFileDWARF * GetSymbolFileByCompUnitInfo(CompileUnitInfo *comp_unit_info)
lldb::CompUnitSP GetCompileUnit(SymbolFileDWARF *oso_dwarf, DWARFCompileUnit &dwarf_cu)
Returns the compile unit associated with the dwarf compile unit.
lldb_private::Status CalculateFrameVariableError(lldb_private::StackFrame &frame) override
Subclasses will override this function to for GetFrameVariableError().
CompileUnitInfo * GetCompileUnitInfoForSymbolWithIndex(uint32_t symbol_idx, uint32_t *oso_idx_ptr)
lldb_private::ModuleList GetDebugInfoModules() override
Get the additional modules that this symbol file uses to parse debug info.
bool Supports_DW_AT_APPLE_objc_complete_type(SymbolFileDWARF *skip_dwarf_oso)
llvm::SmallSet< lldb::LanguageType, 4 > ParseAllLanguages(lldb_private::CompileUnit &comp_unit) override
This function exists because SymbolFileDWARFDebugMap may extra compile units which aren't exposed as ...
UniqueDWARFASTTypeMap m_unique_ast_type_map
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
This function actually returns the first compile unit the object file at the given index contains.
UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap()
bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override
CompileUnitInfo * GetCompUnitInfo(const lldb_private::SymbolContext &sc)
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
lldb::addr_t LinkOSOFileAddress(SymbolFileDWARF *oso_symfile, lldb::addr_t oso_file_addr)
Convert a .o file "file address" to an executable "file address".
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
bool isA(const void *ClassID) const override
LLVM RTTI support.
lldb_private::LineTable * LinkOSOLineTable(SymbolFileDWARF *oso_symfile, lldb_private::LineTable *line_table)
Given a line table full of lines with "file addresses" that are for a .o file represented by oso_symf...
CompileUnitInfo * GetCompileUnitInfo(SymbolFileDWARF *oso_dwarf)
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
void PrivateFindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, const std::vector< uint32_t > &name_symbol_indexes, uint32_t max_matches, lldb_private::VariableList &variables)
lldb_private::ObjectFile * GetObjectFileByCompUnitInfo(CompileUnitInfo *comp_unit_info)
lldb_private::RangeDataVector< lldb::addr_t, lldb::addr_t, lldb::addr_t > FileRangeMap
bool ForEachExternalModule(lldb_private::CompileUnit &, llvm::DenseSet< lldb_private::SymbolFile * > &, llvm::function_ref< bool(lldb_private::Module &)>) override
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
static lldb_private::SymbolFile * CreateInstance(lldb::ObjectFileSP objfile_sp)
bool CompleteType(lldb_private::CompilerType &compiler_type) override
size_t ParseBlocksRecursive(lldb_private::Function &func) override
llvm::StringRef GetPluginName() override
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
static char ID
LLVM RTTI support.
lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override
Return the Xcode SDK comp_unit was compiled against.
std::bitset< kNumFlags > m_flags
lldb_private::Module * GetModuleByOSOIndex(uint32_t oso_idx)
static uint32_t GetOSOIndexFromUserID(lldb::user_id_t uid)
uint32_t GetCompUnitInfoIndex(const CompileUnitInfo *comp_unit_info)
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
lldb_private::Module * GetModuleByCompUnitInfo(CompileUnitInfo *comp_unit_info)
size_t AddOSOARanges(SymbolFileDWARF *dwarf2Data, DWARFDebugAranges *debug_aranges)
~SymbolFileDWARFDebugMap() override
uint32_t CalculateAbilities() 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.
static bool classof(const SymbolFile *obj)
bool AddOSOFileRange(CompileUnitInfo *cu_info, lldb::addr_t exe_file_addr, lldb::addr_t exe_byte_size, lldb::addr_t oso_file_addr, lldb::addr_t oso_byte_size)
void SetCompileUnit(SymbolFileDWARF *oso_dwarf, const lldb::CompUnitSP &cu_sp)
lldb_private::RangeDataVector< lldb::addr_t, lldb::addr_t, OSOEntry > DebugMap
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
std::vector< CompileUnitInfo > m_compile_unit_infos
std::shared_ptr< OSOInfo > OSOInfoSP
static int SymbolContainsSymbolWithID(lldb::user_id_t *symbol_idx_ptr, const CompileUnitInfo *comp_unit_info)
static int SymbolContainsSymbolWithIndex(uint32_t *symbol_idx_ptr, const CompileUnitInfo *comp_unit_info)
uint32_t CalculateNumCompileUnits() override
This function actually returns the number of object files, which may be less than the actual number o...
void FinalizeOSOFileRanges(CompileUnitInfo *cu_info)
void FindTypes(llvm::ArrayRef< lldb_private::CompilerContext > context, lldb_private::LanguageSet languages, llvm::DenseSet< lldb_private::SymbolFile * > &searched_symbol_files, lldb_private::TypeMap &types) override
SymbolFileDWARF * GetSymbolFile(const lldb_private::SymbolContext &sc)
lldb_private::CompilerDeclContext FindNamespace(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces) override
Finds a namespace of name name and whose parent context is parent_decl_ctx.
lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die)
static llvm::StringRef GetPluginNameStatic()
void InitializeObject() override
Initialize the SymbolFile object.
std::vector< std::unique_ptr< lldb_private::CallEdge > > ParseCallEdgesInFunction(lldb_private::UserID func_id) override
void ForEachSymbolFile(std::function< bool(SymbolFileDWARF *)> closure)
std::vector< uint32_t > m_glob_indexes
bool LinkOSOAddress(lldb_private::Address &addr)
Convert addr from a .o file address, to an executable address.
lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
size_t GetCompUnitInfosForModule(const lldb_private::Module *oso_module, std::vector< CompileUnitInfo * > &cu_infos)
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
CompileUnitInfo * GetCompileUnitInfoForSymbolWithID(lldb::user_id_t symbol_id, uint32_t *oso_idx_ptr)
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
uint32_t ResolveSymbolContext(const lldb_private::SourceLocationSpec &src_location_spec, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContextList &sc_list) override
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) override
bool GetFileSpecForSO(uint32_t oso_idx, lldb_private::FileSpec &file_spec)
A section + offset based address class.
A class that describes a compilation unit.
Represents a generic declaration context in a program.
Generic representation of a type in a programming language.
A uniqued constant string class.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that describes a function.
A collection class for Module objects.
A class that encapsulates name lookup information.
A class that describes an executable image and its associated object and symbol files.
A plug-in interface definition class for object file parsers.
"lldb/Core/SourceLocationSpec.h" A source location specifier class.
This base class provides an interface to stack frames.
A stream class that can stream formatted output to a file.
Defines a list of symbol context objects.
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
Defines a symbol context baton that can be handed other debug core functions.
Containing protected virtual methods for child classes to override.
Provides public interface for all SymbolFiles.
std::unordered_map< lldb::CompUnitSP, Args > GetCompileOptions()
Returns a map of compilation unit to the compile option arguments associated with that compilation un...
An abstraction for Xcode-style SDKs that works like ArchSpec.
#define LLDB_INVALID_ADDRESS
LanguageType
Programming language type.
lldb_private::Status oso_load_error
uint32_t first_symbol_index
llvm::SmallDenseMap< uint64_t, uint64_t, 2 > id_to_index_map
A map from the compile unit ID to its index in the vector.
uint32_t last_symbol_index
llvm::sys::TimePoint oso_mod_time
const FileRangeMap & GetFileRangeMap(SymbolFileDWARFDebugMap *exe_symfile)
CompileUnitInfo()=default
lldb_private::FileSpec so_file
bool file_range_map_valid
FileRangeMap file_range_map
llvm::SmallVector< lldb::CompUnitSP, 2 > compile_units_sps
The compile units that an object file contains.
lldb_private::ConstString oso_path
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
A mix in class that contains a generic user ID.