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

#include <DWARFTypeUnit.h>

Inheritance diagram for DWARFTypeUnit:
Inheritance graph
[legend]

Public Member Functions

void BuildAddressRangeTable (DWARFDebugAranges *debug_aranges) override
 
void Dump (lldb_private::Stream *s) const override
 
uint64_t GetTypeHash ()
 
dw_offset_t GetTypeOffset ()
 
- Public Member Functions inherited from DWARFUnit
virtual ~DWARFUnit ()
 
bool IsDWOUnit ()
 
std::optional< uint64_t > GetDWOId ()
 
void ExtractUnitDIEIfNeeded ()
 
void ExtractUnitDIENoDwoIfNeeded ()
 
void ExtractDIEsIfNeeded ()
 
ScopedExtractDIEs ExtractDIEsScoped ()
 
bool Verify (lldb_private::Stream *s) const
 
virtual void Dump (lldb_private::Stream *s) const =0
 
const lldb_private::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
 
uint32_t GetLength () const
 
uint16_t GetVersion () const
 
const DWARFAbbreviationDeclarationSetGetAbbreviations () 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)
 
DWARFUnitGetNonSkeletonUnit ()
 
void * GetUserData () const
 
void SetUserData (void *d)
 
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 lldb_private::FileSpecGetCompilationDirectory ()
 
const lldb_private::FileSpecGetAbsolutePath ()
 
lldb_private::FileSpec GetFile (size_t file_idx)
 
lldb_private::FileSpec::Style GetPathStyle ()
 
SymbolFileDWARFDwoGetDwoSymbolFile ()
 
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 lldb_private::DataExtractor &data) const
 Return the location table for parsing the given location list data.
 
lldb_private::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 lldb_private::StatusGetDwoError () const
 Get the fission .dwo file specific error for this compile unit.
 
void SetDwoError (const lldb_private::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 DWARFUnit
static llvm::Expected< DWARFUnitSPextract (SymbolFileDWARF &dwarf2Data, lldb::user_id_t uid, const lldb_private::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 DWARFUnitHeader &header, const DWARFAbbreviationDeclarationSet &abbrevs, DIERef::Section section, bool is_dwo)
 

Friends

class DWARFUnit
 

Additional Inherited Members

- Protected Member Functions inherited from DWARFUnit
 DWARFUnit (SymbolFileDWARF &dwarf, lldb::user_id_t uid, const DWARFUnitHeader &header, const DWARFAbbreviationDeclarationSet &abbrevs, DIERef::Section section, bool is_dwo)
 
llvm::Error ExtractHeader (SymbolFileDWARF &dwarf, const lldb_private::DWARFDataExtractor &data, lldb::offset_t *offset_ptr)
 
const DWARFDebugInfoEntryGetUnitDIEPtrOnly ()
 
const DWARFDebugInfoEntryDIEPtr ()
 
const std::optional< llvm::DWARFDebugRnglistTable > & GetRnglistTable ()
 
lldb_private::DWARFDataExtractor GetRnglistData () const
 
- Protected Attributes inherited from DWARFUnit
SymbolFileDWARFm_dwarf
 
std::shared_ptr< DWARFUnitm_dwo
 
DWARFUnitHeader m_header
 
const DWARFAbbreviationDeclarationSetm_abbrevs = nullptr
 
void * m_user_data = 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
 
lldb_private::LazyBool m_is_optimized = lldb_private::eLazyBoolCalculate
 
std::optional< lldb_private::FileSpecm_comp_dir
 
std::optional< lldb_private::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).
 
lldb_private::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 15 of file DWARFTypeUnit.h.

Constructor & Destructor Documentation

◆ DWARFTypeUnit()

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

Definition at line 28 of file DWARFTypeUnit.h.

Member Function Documentation

◆ BuildAddressRangeTable()

void DWARFTypeUnit::BuildAddressRangeTable ( DWARFDebugAranges debug_aranges)
inlineoverridevirtual

Implements DWARFUnit.

Definition at line 17 of file DWARFTypeUnit.h.

◆ classof()

static bool DWARFTypeUnit::classof ( const DWARFUnit unit)
inlinestatic

Definition at line 25 of file DWARFTypeUnit.h.

References DWARFUnit::IsTypeUnit().

◆ Dump()

void DWARFTypeUnit::Dump ( lldb_private::Stream s) const
overridevirtual

◆ GetTypeHash()

uint64_t DWARFTypeUnit::GetTypeHash ( )
inline

Definition at line 21 of file DWARFTypeUnit.h.

References DWARFUnitHeader::GetTypeHash(), and DWARFUnit::m_header.

◆ GetTypeOffset()

dw_offset_t DWARFTypeUnit::GetTypeOffset ( )
inline

Friends And Related Function Documentation

◆ DWARFUnit

friend class DWARFUnit
friend

Definition at line 34 of file DWARFTypeUnit.h.


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