LLDB mainline
Public Member Functions | Static Public Member Functions | Private Member Functions | Friends | List of all members
lldb_private::plugin::dwarf::DWARFTypeUnit Class Reference

#include <DWARFTypeUnit.h>

Inheritance diagram for lldb_private::plugin::dwarf::DWARFTypeUnit:
Inheritance graph
[legend]

Public Member Functions

void BuildAddressRangeTable (DWARFDebugAranges *debug_aranges) override
 
void Dump (Stream *s) const override
 
uint64_t GetTypeHash ()
 
dw_offset_t GetTypeOffset ()
 
- 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 DWARFDataExtractorGetData () 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 DWARFDebugArangesGetFunctionAranges ()
 
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.
 
DWARFUnitGetNonSkeletonUnit ()
 
lldb_private::CompileUnitGetLLDBCompUnit () const
 
void SetLLDBCompUnit (lldb_private::CompileUnit *cu)
 
DWARFCompileUnitGetSkeletonUnit ()
 Get the skeleton compile unit for a DWO file.
 
bool LinkToSkeletonUnit (DWARFUnit &skeleton_unit)
 
bool Supports_DW_AT_APPLE_objc_complete_type ()
 
bool DW_AT_decl_file_attributes_are_invalid ()
 
bool Supports_unnamed_objc_bitfields ()
 
SymbolFileDWARFGetSymbolFileDWARF () const
 
DWARFProducer GetProducer ()
 
llvm::VersionTuple GetProducerVersion ()
 
uint64_t GetDWARFLanguageType ()
 
bool GetIsOptimized ()
 
const FileSpecGetCompilationDirectory ()
 
const FileSpecGetAbsolutePath ()
 
FileSpec GetFile (size_t file_idx)
 
FileSpec::Style GetPathStyle ()
 
SymbolFileDWARFDwoGetDwoSymbolFile (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< DWARFRangeListFindRnglistFromOffset (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< DWARFRangeListFindRnglistFromIndex (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 StatusGetDwoError () const
 Get the fission .dwo file specific error for this compile unit.
 
void SetDwoError (const 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< DWARFUnitSPextract (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

 DWARFTypeUnit (SymbolFileDWARF &dwarf, lldb::user_id_t uid, const llvm::DWARFUnitHeader &header, const llvm::DWARFAbbreviationDeclarationSet &abbrevs, DIERef::Section section, bool is_dwo)
 

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 DWARFDebugInfoEntryGetUnitDIEPtrOnly ()
 
const DWARFDebugInfoEntryDIEPtr ()
 
const std::optional< llvm::DWARFDebugRnglistTable > & GetRnglistTable ()
 
DWARFDataExtractor GetRnglistData () const
 
- Protected Attributes inherited from lldb_private::plugin::dwarf::DWARFUnit
SymbolFileDWARFm_dwarf
 
std::shared_ptr< DWARFUnitm_dwo
 
llvm::DWARFUnitHeader m_header
 
const llvm::DWARFAbbreviationDeclarationSet * m_abbrevs = nullptr
 
lldb_private::CompileUnitm_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< DWARFDebugArangesm_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< FileSpecm_comp_dir
 
std::optional< FileSpecm_file_spec
 
std::optional< dw_addr_tm_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.
 

Detailed Description

Definition at line 21 of file DWARFTypeUnit.h.

Constructor & Destructor Documentation

◆ DWARFTypeUnit()

lldb_private::plugin::dwarf::DWARFTypeUnit::DWARFTypeUnit ( SymbolFileDWARF dwarf,
lldb::user_id_t  uid,
const llvm::DWARFUnitHeader &  header,
const llvm::DWARFAbbreviationDeclarationSet &  abbrevs,
DIERef::Section  section,
bool  is_dwo 
)
inlineprivate

Definition at line 34 of file DWARFTypeUnit.h.

Member Function Documentation

◆ BuildAddressRangeTable()

void lldb_private::plugin::dwarf::DWARFTypeUnit::BuildAddressRangeTable ( DWARFDebugAranges debug_aranges)
inlineoverridevirtual

Implements lldb_private::plugin::dwarf::DWARFUnit.

Definition at line 23 of file DWARFTypeUnit.h.

◆ classof()

static bool lldb_private::plugin::dwarf::DWARFTypeUnit::classof ( const DWARFUnit unit)
inlinestatic

◆ Dump()

void DWARFTypeUnit::Dump ( Stream s) const
overridevirtual

◆ GetTypeHash()

uint64_t lldb_private::plugin::dwarf::DWARFTypeUnit::GetTypeHash ( )
inline

Definition at line 27 of file DWARFTypeUnit.h.

References lldb_private::plugin::dwarf::DWARFUnit::m_header.

◆ GetTypeOffset()

dw_offset_t lldb_private::plugin::dwarf::DWARFTypeUnit::GetTypeOffset ( )
inline

Friends And Related Function Documentation

◆ DWARFUnit

friend class DWARFUnit
friend

Definition at line 40 of file DWARFTypeUnit.h.


The documentation for this class was generated from the following files: