9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DEBUGNAMESDWARFINDEX_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DEBUGNAMESDWARFINDEX_H
16#include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"
23 static llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>>
31 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
34 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
37 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
40 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override {}
42 ConstString class_name,
bool must_be_implementation,
43 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
48 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
50 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
52 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
54 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
58 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
60 llvm::function_ref<
bool(
DWARFDIE die)> callback)
override;
66 std::unique_ptr<llvm::DWARFDebugNames> debug_names_up,
111 std::optional<DWARFTypeUnit *>
115 llvm::function_ref<
bool(
DWARFDIE die)> callback);
119 llvm::ArrayRef<DebugNames::Entry> parent_entries)
const;
122 const DebugNames::NameIndex &ni,
123 llvm::StringRef name);
126 static llvm::DenseSet<uint64_t>
static llvm::raw_ostream & error(Stream &strm)
Represents a generic declaration context in a program.
A uniqued constant string class.
A class that encapsulates name lookup information.
A class that describes an executable image and its associated object and symbol files.
A stream class that can stream formatted output to a file.
DebugNamesDWARFIndex(Module &module, std::unique_ptr< llvm::DWARFDebugNames > debug_names_up, DWARFDataExtractor debug_names_data, DWARFDataExtractor debug_str_data, SymbolFileDWARF &dwarf)
static llvm::Expected< std::unique_ptr< DebugNamesDWARFIndex > > Create(Module &module, DWARFDataExtractor debug_names, DWARFDataExtractor debug_str, SymbolFileDWARF &dwarf)
DWARFDataExtractor m_debug_names_data
static llvm::DenseSet< uint64_t > GetTypeUnitSignatures(const DebugNames &debug_names)
static void MaybeLogLookupError(llvm::Error error, const DebugNames::NameIndex &ni, llvm::StringRef name)
DWARFDIE GetDIE(const DebugNames::Entry &entry) const
std::optional< DWARFTypeUnit * > GetForeignTypeUnit(const DebugNames::Entry &entry) const
Checks if an entry is a foreign TU and fetch the type unit.
ManualDWARFIndex m_fallback
void GetTypes(ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback) override
void GetFullyQualifiedType(const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback) override
Uses DWARF5's IDX_parent fields, when available, to speed up this query.
void GetNamespaces(ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback) override
llvm::DWARFDebugNames DebugNames
void Dump(Stream &s) override
bool ProcessEntry(const DebugNames::Entry &entry, llvm::function_ref< bool(DWARFDIE die)> callback)
DWARFDataExtractor m_debug_str_data
void GetGlobalVariables(ConstString basename, llvm::function_ref< bool(DWARFDIE die)> callback) override
Finds global variables with the given base name.
void GetCompleteObjCClass(ConstString class_name, bool must_be_implementation, llvm::function_ref< bool(DWARFDIE die)> callback) override
void GetObjCMethods(ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback) override
DWARFDebugInfo & m_debug_info
void GetFunctions(const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback) override
bool SameParentChain(llvm::ArrayRef< llvm::StringRef > parent_names, llvm::ArrayRef< DebugNames::Entry > parent_entries) const
Returns true if parent_entries have identical names to parent_names.
static llvm::DenseSet< dw_offset_t > GetUnits(const DebugNames &debug_names)
DWARFUnit * GetNonSkeletonUnit(const DebugNames::Entry &entry) const
std::unique_ptr< DebugNames > m_debug_names_up