LLDB mainline
|
#include <DWARFCompileUnit.h>
Public Member Functions | |
void | BuildAddressRangeTable (DWARFDebugAranges *debug_aranges) override |
void | Dump (Stream *s) const override |
DWARFCompileUnit & | GetNonSkeletonUnit () |
DWARFDIE | LookupAddress (const dw_addr_t address) |
Public Member Functions inherited from lldb_private::plugin::dwarf::DWARFUnit | |
virtual | ~DWARFUnit () |
bool | IsDWOUnit () |
std::optional< uint64_t > | GetDWOId () |
Get the DWO ID from the DWARFUnitHeader for DWARF5, or from the unit DIE's DW_AT_dwo_id or DW_AT_GNU_dwo_id for DWARF4 and earlier. | |
std::optional< uint64_t > | GetHeaderDWOId () |
Get the DWO ID from the DWARFUnitHeader only. | |
void | ExtractUnitDIEIfNeeded () |
void | ExtractUnitDIENoDwoIfNeeded () |
void | ExtractDIEsIfNeeded () |
ScopedExtractDIEs | ExtractDIEsScoped () |
bool | Verify (Stream *s) const |
virtual void | Dump (Stream *s) const =0 |
const DWARFDataExtractor & | GetData () const |
Get the data that contains the DIE information for this unit. | |
uint32_t | GetHeaderByteSize () const |
Get the size in bytes of the unit header. | |
dw_offset_t | GetOffset () const |
size_t | GetLengthByteSize () const |
Get the size in bytes of the length field in the header. | |
bool | ContainsDIEOffset (dw_offset_t die_offset) const |
dw_offset_t | GetFirstDIEOffset () const |
dw_offset_t | GetNextUnitOffset () const |
size_t | GetDebugInfoSize () const |
dw_offset_t | GetLength () const |
uint16_t | GetVersion () const |
const llvm::DWARFAbbreviationDeclarationSet * | GetAbbreviations () const |
dw_offset_t | GetAbbrevOffset () const |
uint8_t | GetAddressByteSize () const |
dw_addr_t | GetAddrBase () const |
dw_addr_t | GetBaseAddress () const |
dw_offset_t | GetLineTableOffset () |
dw_addr_t | GetRangesBase () const |
dw_addr_t | GetStrOffsetsBase () const |
void | SetAddrBase (dw_addr_t addr_base) |
void | SetLoclistsBase (dw_addr_t loclists_base) |
void | SetRangesBase (dw_addr_t ranges_base) |
void | SetStrOffsetsBase (dw_offset_t str_offsets_base) |
virtual void | BuildAddressRangeTable (DWARFDebugAranges *debug_aranges)=0 |
dw_addr_t | ReadAddressFromDebugAddrSection (uint32_t index) const |
lldb::ByteOrder | GetByteOrder () const |
const DWARFDebugAranges & | GetFunctionAranges () |
void | SetBaseAddress (dw_addr_t base_addr) |
DWARFBaseDIE | GetUnitDIEOnly () |
DWARFDIE | DIE () |
DWARFDIE | GetDIE (dw_offset_t die_offset) |
llvm::StringRef | PeekDIEName (dw_offset_t die_offset) |
Returns the AT_Name of the DIE at die_offset , if it exists, without parsing the entire compile unit. | |
DWARFUnit & | GetNonSkeletonUnit () |
lldb_private::CompileUnit * | GetLLDBCompUnit () const |
void | SetLLDBCompUnit (lldb_private::CompileUnit *cu) |
DWARFCompileUnit * | GetSkeletonUnit () |
Get the skeleton compile unit for a DWO file. | |
bool | LinkToSkeletonUnit (DWARFUnit &skeleton_unit) |
bool | Supports_unnamed_objc_bitfields () |
SymbolFileDWARF & | GetSymbolFileDWARF () const |
DWARFProducer | GetProducer () |
llvm::VersionTuple | GetProducerVersion () |
uint64_t | GetDWARFLanguageType () |
bool | GetIsOptimized () |
const FileSpec & | GetCompilationDirectory () |
const FileSpec & | GetAbsolutePath () |
FileSpec | GetFile (size_t file_idx) |
FileSpec::Style | GetPathStyle () |
SymbolFileDWARFDwo * | GetDwoSymbolFile (bool load_all_debug_info=true) |
die_iterator_range | dies () |
DIERef::Section | GetDebugSection () const |
uint8_t | GetUnitType () const |
bool | IsTypeUnit () const |
bool | IsSkeletonUnit () const |
Note that this check only works for DWARF5+. | |
std::optional< uint64_t > | GetStringOffsetSectionItem (uint32_t index) const |
llvm::Expected< llvm::DWARFAddressRangesVector > | FindRnglistFromOffset (dw_offset_t offset) |
Return a list of address ranges resulting from a (possibly encoded) range list starting at a given offset in the appropriate ranges section. | |
llvm::Expected< llvm::DWARFAddressRangesVector > | FindRnglistFromIndex (uint32_t index) |
Return a list of address ranges retrieved from an encoded range list whose offset is found via a table lookup given an index (DWARF v5 and later). | |
llvm::Expected< uint64_t > | GetRnglistOffset (uint32_t Index) |
Return a rangelist's offset based on an index. | |
std::optional< uint64_t > | GetLoclistOffset (uint32_t Index) |
std::unique_ptr< llvm::DWARFLocationTable > | GetLocationTable (const DataExtractor &data) const |
Return the location table for parsing the given location list data. | |
DWARFDataExtractor | GetLocationData () const |
bool | HasAny (llvm::ArrayRef< dw_tag_t > tags) |
Returns true if any DIEs in the unit match any DW_TAG values in tags. | |
const Status & | GetDwoError () const |
Get the fission .dwo file specific error for this compile unit. | |
void | SetDwoError (Status &&error) |
Set the fission .dwo file specific error for this compile unit. | |
Public Member Functions inherited from lldb_private::UserID | |
UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
Construct with optional user ID. | |
~UserID ()=default | |
Destructor. | |
void | Clear () |
Clears the object state. | |
lldb::user_id_t | GetID () const |
Get accessor for the user ID. | |
void | SetID (lldb::user_id_t uid) |
Set accessor for the user ID. | |
Static Public Member Functions | |
static bool | classof (const DWARFUnit *unit) |
Static Public Member Functions inherited from lldb_private::plugin::dwarf::DWARFUnit | |
static llvm::Expected< DWARFUnitSP > | extract (SymbolFileDWARF &dwarf2Data, lldb::user_id_t uid, const DWARFDataExtractor &debug_info, DIERef::Section section, lldb::offset_t *offset_ptr) |
static uint8_t | GetAddressByteSize (const DWARFUnit *cu) |
static uint8_t | GetDefaultAddressSize () |
Private Member Functions | |
DWARFCompileUnit (SymbolFileDWARF &dwarf, lldb::user_id_t uid, const llvm::DWARFUnitHeader &header, const llvm::DWARFAbbreviationDeclarationSet &abbrevs, DIERef::Section section, bool is_dwo) | |
DWARFCompileUnit (const DWARFCompileUnit &)=delete | |
const DWARFCompileUnit & | operator= (const DWARFCompileUnit &)=delete |
Friends | |
class | DWARFUnit |
Additional Inherited Members | |
Protected Member Functions inherited from lldb_private::plugin::dwarf::DWARFUnit | |
DWARFUnit (SymbolFileDWARF &dwarf, lldb::user_id_t uid, const llvm::DWARFUnitHeader &header, const llvm::DWARFAbbreviationDeclarationSet &abbrevs, DIERef::Section section, bool is_dwo) | |
llvm::Error | ExtractHeader (SymbolFileDWARF &dwarf, const DWARFDataExtractor &data, lldb::offset_t *offset_ptr) |
const DWARFDebugInfoEntry * | GetUnitDIEPtrOnly () |
const DWARFDebugInfoEntry * | DIEPtr () |
const std::optional< llvm::DWARFDebugRnglistTable > & | GetRnglistTable () |
DWARFDataExtractor | GetRnglistData () const |
Protected Attributes inherited from lldb_private::plugin::dwarf::DWARFUnit | |
SymbolFileDWARF & | m_dwarf |
std::shared_ptr< DWARFUnit > | m_dwo |
llvm::DWARFUnitHeader | m_header |
const llvm::DWARFAbbreviationDeclarationSet * | m_abbrevs = nullptr |
lldb_private::CompileUnit * | m_lldb_cu = nullptr |
std::atomic< DWARFUnit * > | m_skeleton_unit = nullptr |
DWARFDebugInfoEntry::collection | m_die_array |
llvm::sys::RWMutex | m_die_array_mutex |
llvm::sys::RWMutex | m_die_array_scoped_mutex |
std::atomic< bool > | m_cancel_scopes |
DWARFDebugInfoEntry | m_first_die |
llvm::sys::RWMutex | m_first_die_mutex |
std::unique_ptr< DWARFDebugAranges > | m_func_aranges_up |
dw_addr_t | m_base_addr = 0 |
DWARFProducer | m_producer = eProducerInvalid |
llvm::VersionTuple | m_producer_version |
std::optional< uint64_t > | m_language_type |
LazyBool | m_is_optimized = eLazyBoolCalculate |
std::optional< FileSpec > | m_comp_dir |
std::optional< FileSpec > | m_file_spec |
std::optional< dw_addr_t > | m_addr_base |
Value of DW_AT_addr_base. | |
dw_addr_t | m_loclists_base = 0 |
Value of DW_AT_loclists_base. | |
dw_addr_t | m_ranges_base = 0 |
Value of DW_AT_rnglists_base. | |
std::optional< uint64_t > | m_gnu_addr_base |
std::optional< uint64_t > | m_gnu_ranges_base |
dw_offset_t | m_line_table_offset = DW_INVALID_OFFSET |
Value of DW_AT_stmt_list. | |
dw_offset_t | m_str_offsets_base = 0 |
std::optional< llvm::DWARFDebugRnglistTable > | m_rnglist_table |
bool | m_rnglist_table_done = false |
std::optional< llvm::DWARFListTableHeader > | m_loclist_table_header |
const DIERef::Section | m_section |
bool | m_is_dwo |
bool | m_has_parsed_non_skeleton_unit |
std::optional< uint64_t > | m_dwo_id |
Value of DW_AT_GNU_dwo_id (v4) or dwo_id from CU header (v5). | |
Status | m_dwo_error |
If we get an error when trying to load a .dwo file, save that error here. | |
Protected Attributes inherited from lldb_private::UserID | |
lldb::user_id_t | m_uid |
The user ID that uniquely identifies an object. | |
Definition at line 21 of file DWARFCompileUnit.h.
|
inlineprivate |
Definition at line 34 of file DWARFCompileUnit.h.
|
privatedelete |
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFUnit.
Definition at line 33 of file DWARFCompileUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::AddOSOARanges(), lldb_private::plugin::dwarf::DWARFDebugAranges::AppendRange(), lldb_private::SymbolContext::comp_unit, lldb_private::DebugInfo, lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeAddressRanges(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetCompileUnitInfo(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetCompUnitForDWARFCompUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugMapSymfile(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::CompileUnit::GetLineTable(), lldb_private::GetLog(), lldb_private::plugin::dwarf::DWARFDebugAranges::GetNumRanges(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::Range< B, S >::GetRangeEnd(), lldb_private::plugin::dwarf::DWARFUnit::GetSymbolFileDWARF(), lldb_private::plugin::dwarf::DWARFUnit::GetUnitDIEPtrOnly(), LLDB_LOG_ERROR, and lldb_private::plugin::dwarf::DWARFUnit::m_dwarf.
|
inlinestatic |
Definition at line 27 of file DWARFCompileUnit.h.
References lldb_private::plugin::dwarf::DWARFUnit::IsTypeUnit().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFUnit.
Definition at line 23 of file DWARFCompileUnit.cpp.
References lldb_private::Stream::Format(), lldb_private::plugin::dwarf::DWARFUnit::GetAbbrevOffset(), lldb_private::plugin::dwarf::DWARFUnit::GetAddressByteSize(), lldb_private::plugin::dwarf::DWARFUnit::GetLength(), lldb_private::plugin::dwarf::DWARFUnit::GetNextUnitOffset(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), and lldb_private::plugin::dwarf::DWARFUnit::GetVersion().
DWARFCompileUnit & DWARFCompileUnit::GetNonSkeletonUnit | ( | ) |
Definition at line 100 of file DWARFCompileUnit.cpp.
References lldb_private::plugin::dwarf::DWARFUnit::GetNonSkeletonUnit().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionAndBlock().
Definition at line 104 of file DWARFCompileUnit.cpp.
References lldb_private::plugin::dwarf::DWARFUnit::DIE(), lldb_private::plugin::dwarf::DWARFDebugAranges::FindAddress(), lldb_private::plugin::dwarf::DWARFUnit::GetDIE(), lldb_private::plugin::dwarf::DWARFUnit::GetFunctionAranges(), and lldb_private::plugin::dwarf::DWARFDebugAranges::IsEmpty().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionAndBlock().
|
privatedelete |
|
friend |
Definition at line 43 of file DWARFCompileUnit.h.