LLDB mainline
|
#include <DWARFUnit.h>
Classes | |
class | ScopedExtractDIEs |
Public Member Functions | |
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_DW_AT_APPLE_objc_complete_type () |
bool | DW_AT_decl_file_attributes_are_invalid () |
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< DWARFRangeList > | 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< DWARFRangeList > | 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 (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 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 () |
Protected Member Functions | |
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 | |
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. | |
Private Types | |
using | die_iterator_range = llvm::iterator_range< DWARFDebugInfoEntry::collection::iterator > |
Private Member Functions | |
void | ParseProducerInfo () |
void | ExtractDIEsRWLocked () |
void | ClearDIEsRWLocked () |
void | AddUnitDIE (const DWARFDebugInfoEntry &cu_die) |
void | SetDwoStrOffsetsBase () |
void | ComputeCompDirAndGuessPathStyle () |
void | ComputeAbsolutePath () |
DWARFUnit (const DWARFUnit &)=delete | |
const DWARFUnit & | operator= (const DWARFUnit &)=delete |
Definition at line 41 of file DWARFUnit.h.
|
private |
Definition at line 42 of file DWARFUnit.h.
|
virtualdefault |
|
protected |
Definition at line 35 of file DWARFUnit.cpp.
|
privatedelete |
|
private |
Definition at line 382 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DWARFFormValue::Address(), lldb_private::plugin::dwarf::DWARFAttributes::AttributeAtIndex(), lldb_private::plugin::dwarf::DWARFAttributes::ExtractFormValueAtIndex(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributes(), LLDB_INVALID_ADDRESS, m_base_addr, m_dwo_id, m_gnu_addr_base, m_gnu_ranges_base, m_has_parsed_non_skeleton_unit, m_is_dwo, m_line_table_offset, SetAddrBase(), SetBaseAddress(), SetDwoStrOffsetsBase(), SetLoclistsBase(), SetRangesBase(), SetStrOffsetsBase(), lldb_private::plugin::dwarf::DWARFAttributes::Size(), and lldb_private::plugin::dwarf::DWARFFormValue::Unsigned().
Referenced by ExtractDIEsRWLocked(), and ExtractUnitDIENoDwoIfNeeded().
|
pure virtual |
|
private |
Definition at line 626 of file DWARFUnit.cpp.
References m_die_array, and m_dwo.
|
private |
Definition at line 892 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsString(), GetCompilationDirectory(), GetPathStyle(), GetUnitDIEPtrOnly(), and m_file_spec.
Referenced by GetAbsolutePath().
|
private |
Definition at line 870 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsString(), GetUnitDIEPtrOnly(), lldb_private::FileSpec::GuessPathStyle(), m_comp_dir, and removeHostnameFromPathname().
Referenced by GetCompilationDirectory(), and GetPathStyle().
|
inline |
Definition at line 107 of file DWARFUnit.h.
References GetFirstDIEOffset(), and GetNextUnitOffset().
Referenced by GetDIE(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetUnitContainingDIEOffset(), and lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset().
|
inline |
Definition at line 144 of file DWARFUnit.h.
References DIEPtr().
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::LookupAddress(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseImportedModules(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseTypes().
|
inlineprotected |
Definition at line 294 of file DWARFUnit.h.
References ExtractDIEsIfNeeded(), and m_die_array.
Referenced by DIE(), and GetFunctionAranges().
|
inline |
Definition at line 198 of file DWARFUnit.h.
References ExtractDIEsIfNeeded(), and m_die_array.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnitImpl(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseFunctions().
|
pure virtual |
Implemented in lldb_private::plugin::dwarf::DWARFCompileUnit, and lldb_private::plugin::dwarf::DWARFTypeUnit.
bool DWARFUnit::DW_AT_decl_file_attributes_are_invalid | ( | ) |
Definition at line 741 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::eProducerLLVMGCC, and GetProducer().
|
static |
Definition at line 935 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DIERef::DebugInfo, lldb_private::plugin::dwarf::DWARFContext::GetAsLLVM(), lldb_private::DWARFDataExtractor::GetAsLLVMDWARF(), lldb_private::plugin::dwarf::DWARFContext::isDwo(), and lldb_private::DataExtractor::ValidOffset().
Referenced by lldb_private::plugin::dwarf::DWARFDebugInfo::ParseUnitsFor().
void DWARFUnit::ExtractDIEsIfNeeded | ( | ) |
Definition at line 149 of file DWARFUnit.cpp.
References ExtractDIEsRWLocked(), m_cancel_scopes, m_die_array, and m_die_array_mutex.
|
private |
Definition at line 222 of file DWARFUnit.cpp.
References AddUnitDIE(), elapsed(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::Extract(), GetData(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugInfoParseTimeRef(), GetDebugInfoSize(), GetFirstDIEOffset(), GetNextUnitOffset(), GetOffset(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::HasChildren(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::IsNULL(), LLDB_SCOPED_TIMERF, lldbassert, m_die_array, m_dwarf, m_dwo, m_first_die, m_first_die_mutex, lldb_private::plugin::dwarf::DWARFDebugInfoEntry::SetHasChildren(), and lldb_private::plugin::dwarf::DWARFDebugInfoEntry::SetParentIndex().
Referenced by ExtractDIEsIfNeeded(), and ExtractDIEsScoped().
DWARFUnit::ScopedExtractDIEs DWARFUnit::ExtractDIEsScoped | ( | ) |
Definition at line 169 of file DWARFUnit.cpp.
References ExtractDIEsRWLocked(), lldbassert, m_cancel_scopes, lldb_private::plugin::dwarf::DWARFUnit::ScopedExtractDIEs::m_clear_dies, m_die_array, and m_die_array_mutex.
|
protected |
void DWARFUnit::ExtractUnitDIEIfNeeded | ( | ) |
Definition at line 73 of file DWARFUnit.cpp.
References lldb_private::Status::Clear(), lldb_private::Status::createWithFormat(), ExtractUnitDIENoDwoIfNeeded(), GetBaseAddress(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetOffset(), GetUnitDIEOnly(), GetVersion(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), LinkToSkeletonUnit(), m_addr_base, m_dwarf, m_dwo, m_dwo_error, m_dwo_id, m_first_die, m_gnu_addr_base, m_gnu_ranges_base, m_has_parsed_non_skeleton_unit, SetAddrBase(), SetBaseAddress(), SetDwoError(), SetLoclistsBase(), and SetRangesBase().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateFrameVariableError(), GetDwoSymbolFile(), GetNonSkeletonUnit(), and HasAny().
void DWARFUnit::ExtractUnitDIENoDwoIfNeeded | ( | ) |
Definition at line 46 of file DWARFUnit.cpp.
References AddUnitDIE(), elapsed(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::Extract(), GetData(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugInfoParseTimeRef(), GetFirstDIEOffset(), GetNextUnitOffset(), m_dwarf, m_first_die, and m_first_die_mutex.
Referenced by ExtractUnitDIEIfNeeded(), GetDWOId(), GetLineTableOffset(), and GetUnitDIEPtrOnly().
llvm::Expected< DWARFRangeList > DWARFUnit::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).
Definition at line 1076 of file DWARFUnit.cpp.
References FindRnglistFromOffset(), and GetRnglistOffset().
Referenced by GetRangesOrReportError().
llvm::Expected< DWARFRangeList > DWARFUnit::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.
Definition at line 1031 of file DWARFUnit.cpp.
References lldb_private::RangeVector< B, S, N >::Append(), lldb_private::plugin::dwarf::DWARFDebugRanges::FindRanges(), GetAddrBase(), GetAddressByteSize(), lldb_private::DWARFDataExtractor::GetAsLLVMDWARF(), GetBaseAddress(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugRanges(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::DataExtractor::GetMaxU64(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadAddrData(), GetRnglistData(), GetRnglistTable(), GetVersion(), m_dwarf, m_header, and lldb_private::RangeVector< B, S, N >::Sort().
Referenced by FindRnglistFromIndex(), and GetRangesOrReportError().
const llvm::DWARFAbbreviationDeclarationSet * DWARFUnit::GetAbbreviations | ( | ) | const |
Definition at line 448 of file DWARFUnit.cpp.
References m_abbrevs.
Referenced by lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr().
dw_offset_t DWARFUnit::GetAbbrevOffset | ( | ) | const |
Definition at line 452 of file DWARFUnit.cpp.
References DW_INVALID_OFFSET, and m_abbrevs.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::Dump(), and lldb_private::plugin::dwarf::DWARFTypeUnit::Dump().
const FileSpec & DWARFUnit::GetAbsolutePath | ( | ) |
Definition at line 839 of file DWARFUnit.cpp.
References ComputeAbsolutePath(), and m_file_spec.
|
inline |
Definition at line 123 of file DWARFUnit.h.
References m_addr_base.
Referenced by lldb_private::plugin::dwarf::DWARFFormValue::Address(), FindRnglistFromOffset(), and ReadAddressFromDebugAddrSection().
|
inline |
Definition at line 122 of file DWARFUnit.h.
References m_header.
Referenced by lldb_private::plugin::dwarf::DWARFFormValue::Address(), lldb_private::plugin::dwarf::DWARFCompileUnit::Dump(), lldb_private::plugin::dwarf::DWARFTypeUnit::Dump(), lldb_private::plugin::dwarf::DWARFFormValue::ExtractValue(), FindRnglistFromOffset(), GetAddressByteSize(), GetExprListFromAtConstValue(), lldb_private::plugin::dwarf::DWARFFormValue::GetFixedSize(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIE(), ReadAddressFromDebugAddrSection(), and lldb_private::plugin::dwarf::DWARFFormValue::SkipValue().
|
static |
Definition at line 704 of file DWARFUnit.cpp.
References GetAddressByteSize(), and GetDefaultAddressSize().
|
inline |
Definition at line 124 of file DWARFUnit.h.
References m_base_addr.
Referenced by ExtractUnitDIEIfNeeded(), lldb_private::plugin::dwarf::DWARFDebugRanges::FindRanges(), FindRnglistFromOffset(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetDIENamesAndRanges(), and lldb_private::DWARFExpression::ParseDWARFLocationList().
lldb::ByteOrder DWARFUnit::GetByteOrder | ( | ) | const |
Definition at line 634 of file DWARFUnit.cpp.
References lldb_private::ObjectFile::GetByteOrder(), lldb_private::SymbolFileCommon::GetObjectFile(), and m_dwarf.
Referenced by GetExprListFromAtConstValue().
const FileSpec & DWARFUnit::GetCompilationDirectory | ( | ) |
Definition at line 833 of file DWARFUnit.cpp.
References ComputeCompDirAndGuessPathStyle(), and m_comp_dir.
Referenced by ComputeAbsolutePath(), MakeAbsoluteAndRemap(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseSupportFiles().
const lldb_private::DWARFDataExtractor & DWARFUnit::GetData | ( | ) | const |
Get the data that contains the DIE information for this unit.
This will return the correct bytes that contain the data for this DWARFUnit. It could be .debug_info or .debug_types depending on where the data for this unit originates.
Definition at line 1003 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DIERef::DebugTypes, lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadDebugInfoData(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadDebugTypesData(), m_dwarf, and m_section.
Referenced by ExtractDIEsRWLocked(), lldb_private::plugin::dwarf::DWARFAttributes::ExtractFormValueAtIndex(), ExtractUnitDIENoDwoIfNeeded(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributes(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValue(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetData(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetDIENamesAndRanges(), and PeekDIEName().
size_t DWARFUnit::GetDebugInfoSize | ( | ) | const |
Definition at line 443 of file DWARFUnit.cpp.
References GetHeaderByteSize(), GetLength(), and GetLengthByteSize().
Referenced by ExtractDIEsRWLocked().
|
inline |
Definition at line 203 of file DWARFUnit.h.
References m_section.
Referenced by lldb_private::plugin::dwarf::NameToDIE::FindAllEntriesForUnit(), and lldb_private::plugin::dwarf::DWARFBaseDIE::GetDIERef().
|
static |
Definition at line 710 of file DWARFUnit.cpp.
Referenced by GetAddressByteSize().
DWARFDIE DWARFUnit::GetDIE | ( | dw_offset_t | die_offset | ) |
Definition at line 652 of file DWARFUnit.cpp.
References CompareDIEOffset(), ContainsDIEOffset(), DW_INVALID_OFFSET, ExtractDIEsIfNeeded(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), GetOffset(), GetSymbolFileDWARF(), and m_die_array.
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetDIE(), lldb_private::plugin::dwarf::DWARFDIE::GetDIE(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), lldb_private::plugin::dwarf::DWARFCompileUnit::LookupAddress(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive().
uint64_t DWARFUnit::GetDWARFLanguageType | ( | ) |
Definition at line 801 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsUnsigned(), GetUnitDIEPtrOnly(), and m_language_type.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateFrameVariableError(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetLanguage(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetLanguageFamily(), DWARFASTParserClang::ParseChildMembers(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit().
|
inline |
Get the fission .dwo file specific error for this compile unit.
The skeleton compile unit only can have a DWO error. Any other type of DWARFUnit will not have a valid DWO error.
Definition at line 263 of file DWARFUnit.h.
References m_dwo_error.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateFrameVariableError(), and lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo().
std::optional< uint64_t > DWARFUnit::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.
Definition at line 376 of file DWARFUnit.cpp.
References ExtractUnitDIENoDwoIfNeeded(), and m_dwo_id.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARFDwo::GetDWOCompileUnitForHash(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetSkeletonUnit(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), and SetLoclistsBase().
SymbolFileDWARFDwo * DWARFUnit::GetDwoSymbolFile | ( | bool | load_all_debug_info = true | ) |
Definition at line 906 of file DWARFUnit.cpp.
References ExtractUnitDIEIfNeeded(), and m_dwo.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugInfoSize(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDIERefSymbolFile(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetMangledNamesForFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), and lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit().
FileSpec DWARFUnit::GetFile | ( | size_t | file_idx | ) |
Definition at line 845 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::GetFile(), and m_dwarf.
Referenced by DWARFASTParserClang::ParseChildEnumerators(), ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(), DWARFASTParserClang::ParseFunctionFromDWARF(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIE().
|
inline |
Definition at line 111 of file DWARFUnit.h.
References GetHeaderByteSize(), and GetOffset().
Referenced by ContainsDIEOffset(), ExtractDIEsRWLocked(), ExtractUnitDIENoDwoIfNeeded(), and lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit().
const DWARFDebugAranges & DWARFUnit::GetFunctionAranges | ( | ) |
Definition at line 914 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(), DIEPtr(), m_dwo, and m_func_aranges_up.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::LookupAddress().
uint32_t DWARFUnit::GetHeaderByteSize | ( | ) | const |
Get the size in bytes of the unit header.
Definition at line 1009 of file DWARFUnit.cpp.
References GetVersion(), and m_header.
Referenced by GetDebugInfoSize(), and GetFirstDIEOffset().
|
inline |
Get the DWO ID from the DWARFUnitHeader only.
DWARF5 skeleton units have the DWO ID in the compile unit header and we sometimes only want to access this cheap value without causing the more expensive attribute fetches that GetDWOId() uses.
Definition at line 60 of file DWARFUnit.h.
References m_header.
bool DWARFUnit::GetIsOptimized | ( | ) |
Definition at line 813 of file DWARFUnit.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsUnsigned(), GetUnitDIEPtrOnly(), and m_is_optimized.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseIsOptimized().
|
inline |
Definition at line 118 of file DWARFUnit.h.
References m_header.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::Dump(), lldb_private::plugin::dwarf::DWARFTypeUnit::Dump(), and GetDebugInfoSize().
|
inline |
Get the size in bytes of the length field in the header.
In DWARF32 this is just 4 bytes
Definition at line 105 of file DWARFUnit.h.
Referenced by GetDebugInfoSize().
dw_offset_t DWARFUnit::GetLineTableOffset | ( | ) |
Definition at line 456 of file DWARFUnit.cpp.
References ExtractUnitDIENoDwoIfNeeded(), and m_line_table_offset.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypeUnitSupportFiles(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseLineTable(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseSupportFiles().
|
inline |
Definition at line 159 of file DWARFUnit.h.
References m_lldb_cu.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetCompUnitForDWARFCompUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFCompileUnit(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit().
DWARFDataExtractor DWARFUnit::GetLocationData | ( | ) | const |
Definition at line 534 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadLocData(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadLocListsData(), GetSymbolFileDWARF(), GetVersion(), and m_header.
Referenced by lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetDIENamesAndRanges(), and GetExprListFromAtLocation().
std::unique_ptr< llvm::DWARFLocationTable > DWARFUnit::GetLocationTable | ( | const DataExtractor & | data | ) | const |
Return the location table for parsing the given location list data.
The format is chosen according to the unit type. Never returns null.
Definition at line 524 of file DWARFUnit.cpp.
References lldb::eByteOrderLittle, lldb_private::DataExtractor::GetAddressByteSize(), lldb_private::DataExtractor::GetByteOrder(), lldb_private::DataExtractor::GetData(), GetVersion(), and m_is_dwo.
Referenced by lldb_private::DWARFExpression::ParseDWARFLocationList().
|
inline |
Definition at line 228 of file DWARFUnit.h.
References lldb_private::DWARFDataExtractor::GetAsLLVM(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadLocListsData(), m_dwarf, m_loclist_table_header, and m_loclists_base.
Referenced by GetExprListFromAtLocation().
|
inline |
Definition at line 114 of file DWARFUnit.h.
References m_header.
Referenced by ContainsDIEOffset(), lldb_private::plugin::dwarf::DWARFCompileUnit::Dump(), lldb_private::plugin::dwarf::DWARFTypeUnit::Dump(), ExtractDIEsRWLocked(), ExtractUnitDIENoDwoIfNeeded(), lldb_private::plugin::dwarf::NameToDIE::FindAllEntriesForUnit(), and lldb_private::plugin::dwarf::AppleDWARFIndex::GetGlobalVariables().
DWARFUnit & DWARFUnit::GetNonSkeletonUnit | ( | ) |
Definition at line 697 of file DWARFUnit.cpp.
References ExtractUnitDIEIfNeeded(), and m_dwo.
Referenced by lldb_private::plugin::dwarf::NameToDIE::FindAllEntriesForUnit(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetForeignTypeUnit(), lldb_private::plugin::dwarf::AppleDWARFIndex::GetGlobalVariables(), lldb_private::plugin::dwarf::DWARFCompileUnit::GetNonSkeletonUnit(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetNonSkeletonUnit(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseFunctions(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseIsOptimized(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseLanguage(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseXcodeSDK().
|
inline |
Definition at line 98 of file DWARFUnit.h.
References m_header.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::BuildAddressRangeTable(), lldb_private::plugin::dwarf::DWARFFormValue::Dump(), lldb_private::plugin::dwarf::DWARFCompileUnit::Dump(), lldb_private::plugin::dwarf::DWARFTypeUnit::Dump(), lldb_private::DWARFExpression::Evaluate(), ExtractDIEsRWLocked(), lldb_private::plugin::dwarf::NameToDIE::FindAllEntriesForUnit(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetCompileUnitAranges(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetDIE(), GetDIE(), GetFirstDIEOffset(), lldb_private::plugin::dwarf::AppleDWARFIndex::GetGlobalVariables(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetGlobalVariables(), GetRnglistOffset(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb_private::plugin::dwarf::DWARFTypeUnit::GetTypeOffset(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetUnitAtOffset(), lldb_private::plugin::dwarf::ManualDWARFIndex::Index(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseLineTable(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseSupportFiles(), lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset(), and lldb_private::plugin::dwarf::DebugNamesDWARFIndex::SameParentChain().
FileSpec::Style DWARFUnit::GetPathStyle | ( | ) |
Definition at line 827 of file DWARFUnit.cpp.
References ComputeCompDirAndGuessPathStyle(), and m_comp_dir.
Referenced by ComputeAbsolutePath(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypeUnitSupportFiles(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseImportedModules(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseSupportFiles().
DWARFProducer DWARFUnit::GetProducer | ( | ) |
Definition at line 789 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::eProducerInvalid, m_producer, and ParseProducerInfo().
Referenced by DW_AT_decl_file_attributes_are_invalid(), Supports_DW_AT_APPLE_objc_complete_type(), and Supports_unnamed_objc_bitfields().
llvm::VersionTuple DWARFUnit::GetProducerVersion | ( | ) |
Definition at line 795 of file DWARFUnit.cpp.
References m_producer_version, and ParseProducerInfo().
Referenced by Supports_unnamed_objc_bitfields().
|
inline |
Definition at line 126 of file DWARFUnit.h.
References m_ranges_base.
Referenced by lldb_private::plugin::dwarf::DWARFDebugRanges::FindRanges().
|
protected |
Definition at line 548 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadRngListsData(), GetSymbolFileDWARF(), and m_header.
Referenced by FindRnglistFromOffset(), GetRnglistOffset(), and GetRnglistTable().
llvm::Expected< uint64_t > DWARFUnit::GetRnglistOffset | ( | uint32_t | Index | ) |
Return a rangelist's offset based on an index.
The index designates an entry in the rangelist table's offset array and is supplied by DW_FORM_rnglistx.
Definition at line 588 of file DWARFUnit.cpp.
References GetOffset(), GetRnglistData(), GetRnglistTable(), and m_ranges_base.
Referenced by FindRnglistFromIndex().
|
protected |
Definition at line 572 of file DWARFUnit.cpp.
References lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), GetRnglistData(), GetSymbolFileDWARF(), GetVersion(), m_ranges_base, m_rnglist_table, m_rnglist_table_done, and lldb_private::toString().
Referenced by FindRnglistFromOffset(), and GetRnglistOffset().
DWARFCompileUnit * DWARFUnit::GetSkeletonUnit | ( | ) |
Get the skeleton compile unit for a DWO file.
We need to keep track of the skeleton compile unit for a DWO file so we can access it. Sometimes this value is cached when the skeleton compile unit is first parsed, but if a .dwp file parses all of the DWARFUnits in the file, the skeleton compile unit might not have been parsed yet, to there might not be a backlink. This accessor handles both cases correctly and avoids crashes.
Definition at line 712 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARFDwo::GetBaseSymbolFile(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSkeletonUnit(), GetSymbolFileDWARF(), IsDWOUnit(), LinkToSkeletonUnit(), and m_skeleton_unit.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetCompUnitForDWARFCompUnit().
std::optional< uint64_t > DWARFUnit::GetStringOffsetSectionItem | ( | uint32_t | index | ) | const |
Definition at line 1025 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadStrOffsetsData(), GetStrOffsetsBase(), lldb_private::DataExtractor::GetU32(), and m_dwarf.
Referenced by lldb_private::plugin::dwarf::DWARFFormValue::AsCString().
|
inline |
Definition at line 127 of file DWARFUnit.h.
References m_str_offsets_base.
Referenced by GetStringOffsetSectionItem().
|
inline |
Definition at line 181 of file DWARFUnit.h.
References m_dwarf.
Referenced by lldb_private::plugin::dwarf::DWARFFormValue::Address(), lldb_private::plugin::dwarf::DWARFFormValue::AsCString(), lldb_private::plugin::dwarf::DWARFCompileUnit::BuildAddressRangeTable(), lldb_private::DWARFExpression::Evaluate(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::Extract(), lldb_private::plugin::dwarf::NameToDIE::FindAllEntriesForUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetCompUnitForDWARFCompUnit(), GetDIE(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetDIENamesAndRanges(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetDIERef(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetForeignTypeUnit(), GetLocationData(), GetOpcodeDataSize(), GetRangesOrReportError(), GetRnglistData(), GetRnglistTable(), GetSkeletonUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypeSystem(), DWARFASTParserClang::ParseTypeFromClangModule(), lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset(), SetDwoStrOffsetsBase(), and SetLoclistsBase().
|
inline |
Definition at line 142 of file DWARFUnit.h.
References GetUnitDIEPtrOnly().
Referenced by ExtractUnitDIEIfNeeded(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetCompileOptions(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetForeignTypeUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseDebugMacros(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseXcodeSDK().
|
inlineprotected |
Definition at line 285 of file DWARFUnit.h.
References ExtractUnitDIENoDwoIfNeeded(), and m_first_die.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::BuildAddressRangeTable(), ComputeAbsolutePath(), ComputeCompDirAndGuessPathStyle(), GetDWARFLanguageType(), GetIsOptimized(), GetUnitDIEOnly(), and ParseProducerInfo().
|
inline |
|
inline |
Definition at line 119 of file DWARFUnit.h.
References m_header.
Referenced by lldb_private::plugin::dwarf::DWARFFormValue::Dump(), lldb_private::plugin::dwarf::DWARFCompileUnit::Dump(), lldb_private::plugin::dwarf::DWARFTypeUnit::Dump(), ExtractUnitDIEIfNeeded(), lldb_private::plugin::dwarf::DWARFFormValue::ExtractValue(), FindRnglistFromOffset(), GetHeaderByteSize(), GetLocationData(), GetLocationTable(), GetRnglistTable(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetSkeletonUnit(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit(), SetDwoStrOffsetsBase(), and lldb_private::plugin::dwarf::DWARFFormValue::SkipValue().
bool DWARFUnit::HasAny | ( | llvm::ArrayRef< dw_tag_t > | tags | ) |
Returns true if any DIEs in the unit match any DW_TAG values in tags.
[in] | tags | An array of dw_tag_t values to check all abbrevitions for. |
Definition at line 1083 of file DWARFUnit.cpp.
References ExtractUnitDIEIfNeeded(), m_die_array, and m_dwo.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateFrameVariableError().
|
inline |
Definition at line 52 of file DWARFUnit.h.
References m_is_dwo.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetCompUnitForDWARFCompUnit(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetForeignTypeUnit(), GetSkeletonUnit(), and lldb_private::plugin::dwarf::DWARFDebugInfo::GetSkeletonUnit().
|
inline |
Note that this check only works for DWARF5+.
Definition at line 208 of file DWARFUnit.h.
References GetUnitType().
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit().
|
inline |
Definition at line 206 of file DWARFUnit.h.
References m_header.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::classof(), and lldb_private::plugin::dwarf::DWARFTypeUnit::classof().
bool DWARFUnit::LinkToSkeletonUnit | ( | DWARFUnit & | skeleton_unit | ) |
Definition at line 726 of file DWARFUnit.cpp.
References m_skeleton_unit.
Referenced by ExtractUnitDIEIfNeeded(), and GetSkeletonUnit().
|
privatedelete |
|
private |
Definition at line 754 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::eProducerClang, lldb_private::plugin::dwarf::eProducerGCC, lldb_private::plugin::dwarf::eProducerLLVMGCC, lldb_private::plugin::dwarf::eProducerOther, lldb_private::plugin::dwarf::eProducerSwift, lldb_private::RegularExpression::Execute(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsString(), GetUnitDIEPtrOnly(), m_producer, and m_producer_version.
Referenced by GetProducer(), and GetProducerVersion().
llvm::StringRef DWARFUnit::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.
An empty is string is returned upon error or if the attribute is not present.
Definition at line 673 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::Extract(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValue(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsString(), GetData(), and lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset().
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::SameParentChain().
dw_addr_t DWARFUnit::ReadAddressFromDebugAddrSection | ( | uint32_t | index | ) | const |
Definition at line 614 of file DWARFUnit.cpp.
References GetAddrBase(), GetAddressByteSize(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::DataExtractor::GetMaxU64_unchecked(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadAddrData(), LLDB_INVALID_ADDRESS, and m_dwarf.
Referenced by lldb_private::DWARFExpression::Evaluate(), lldb_private::DWARFExpression::GetLocation_DW_OP_addr(), and lldb_private::DWARFExpression::ParseDWARFLocationList().
void DWARFUnit::SetAddrBase | ( | dw_addr_t | addr_base | ) |
Definition at line 461 of file DWARFUnit.cpp.
References m_addr_base.
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
void DWARFUnit::SetBaseAddress | ( | dw_addr_t | base_addr | ) |
Definition at line 638 of file DWARFUnit.cpp.
References m_base_addr.
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
|
inline |
Set the fission .dwo file specific error for this compile unit.
This helps tracks issues that arise when trying to locate or parse a .dwo file. Things like a missing .dwo file, DWO ID mismatch, and other .dwo errors can be stored in each compile unit so the issues can be communicated to the user.
Definition at line 271 of file DWARFUnit.h.
References error(), and m_dwo_error.
Referenced by ExtractUnitDIEIfNeeded(), and lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit().
|
private |
Definition at line 347 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadStrOffsetsData(), GetSymbolFileDWARF(), lldb_private::DataExtractor::GetU16(), lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU64(), GetVersion(), m_header, and SetStrOffsetsBase().
Referenced by AddUnitDIE().
|
inline |
Definition at line 161 of file DWARFUnit.h.
References m_lldb_cu.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFCompileUnit(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit().
void DWARFUnit::SetLoclistsBase | ( | dw_addr_t | loclists_base | ) |
Definition at line 492 of file DWARFUnit.cpp.
References lldb_private::DWARFDataExtractor::GetAsLLVMDWARF(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFContext(), GetDWOId(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadLocListsData(), GetSymbolFileDWARF(), m_dwarf, m_header, m_loclist_table_header, m_loclists_base, and lldb_private::toString().
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
void DWARFUnit::SetRangesBase | ( | dw_addr_t | ranges_base | ) |
Definition at line 565 of file DWARFUnit.cpp.
References lldbassert, m_ranges_base, and m_rnglist_table_done.
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
void DWARFUnit::SetStrOffsetsBase | ( | dw_offset_t | str_offsets_base | ) |
Definition at line 610 of file DWARFUnit.cpp.
References m_str_offsets_base.
Referenced by AddUnitDIE(), and SetDwoStrOffsetsBase().
bool DWARFUnit::Supports_DW_AT_APPLE_objc_complete_type | ( | ) |
Definition at line 737 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::eProducerLLVMGCC, and GetProducer().
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetCompleteObjCClass(), and lldb_private::plugin::dwarf::SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type().
bool DWARFUnit::Supports_unnamed_objc_bitfields | ( | ) |
Definition at line 747 of file DWARFUnit.cpp.
References lldb_private::plugin::dwarf::eProducerClang, GetProducer(), and GetProducerVersion().
Referenced by DWARFASTParserClang::ParseSingleMember().
bool lldb_private::plugin::dwarf::DWARFUnit::Verify | ( | Stream * | s | ) | const |
|
protected |
Definition at line 308 of file DWARFUnit.h.
Referenced by GetAbbreviations(), and GetAbbrevOffset().
|
protected |
Value of DW_AT_addr_base.
Definition at line 335 of file DWARFUnit.h.
Referenced by ExtractUnitDIEIfNeeded(), GetAddrBase(), and SetAddrBase().
|
protected |
Definition at line 328 of file DWARFUnit.h.
Referenced by AddUnitDIE(), GetBaseAddress(), and SetBaseAddress().
|
protected |
Definition at line 319 of file DWARFUnit.h.
Referenced by ExtractDIEsIfNeeded(), and ExtractDIEsScoped().
|
protected |
Definition at line 333 of file DWARFUnit.h.
Referenced by ComputeCompDirAndGuessPathStyle(), GetCompilationDirectory(), and GetPathStyle().
|
protected |
Definition at line 313 of file DWARFUnit.h.
Referenced by ClearDIEsRWLocked(), DIEPtr(), dies(), ExtractDIEsIfNeeded(), ExtractDIEsRWLocked(), ExtractDIEsScoped(), GetDIE(), and HasAny().
|
mutableprotected |
Definition at line 314 of file DWARFUnit.h.
Referenced by ExtractDIEsIfNeeded(), and ExtractDIEsScoped().
|
mutableprotected |
Definition at line 316 of file DWARFUnit.h.
Referenced by lldb_private::plugin::dwarf::DWARFUnit::ScopedExtractDIEs::ScopedExtractDIEs().
|
protected |
Definition at line 305 of file DWARFUnit.h.
Referenced by lldb_private::plugin::dwarf::DWARFCompileUnit::BuildAddressRangeTable(), ExtractDIEsRWLocked(), ExtractUnitDIEIfNeeded(), ExtractUnitDIENoDwoIfNeeded(), FindRnglistFromOffset(), GetByteOrder(), GetData(), GetFile(), GetLoclistOffset(), GetStringOffsetSectionItem(), GetSymbolFileDWARF(), ReadAddressFromDebugAddrSection(), and SetLoclistsBase().
|
protected |
Definition at line 306 of file DWARFUnit.h.
Referenced by ClearDIEsRWLocked(), ExtractDIEsRWLocked(), ExtractUnitDIEIfNeeded(), GetDwoSymbolFile(), GetFunctionAranges(), GetNonSkeletonUnit(), and HasAny().
|
protected |
If we get an error when trying to load a .dwo file, save that error here.
Errors include .dwo/.dwp file not found, or the .dwp/.dwp file was found but DWO ID doesn't match, etc.
Definition at line 358 of file DWARFUnit.h.
Referenced by ExtractUnitDIEIfNeeded(), GetDwoError(), and SetDwoError().
|
protected |
Value of DW_AT_GNU_dwo_id (v4) or dwo_id from CU header (v5).
Definition at line 354 of file DWARFUnit.h.
Referenced by AddUnitDIE(), ExtractUnitDIEIfNeeded(), and GetDWOId().
|
protected |
Definition at line 334 of file DWARFUnit.h.
Referenced by ComputeAbsolutePath(), and GetAbsolutePath().
|
protected |
Definition at line 323 of file DWARFUnit.h.
Referenced by ExtractDIEsRWLocked(), ExtractUnitDIEIfNeeded(), ExtractUnitDIENoDwoIfNeeded(), and GetUnitDIEPtrOnly().
|
protected |
Definition at line 324 of file DWARFUnit.h.
Referenced by ExtractDIEsRWLocked(), and ExtractUnitDIENoDwoIfNeeded().
|
protected |
Definition at line 327 of file DWARFUnit.h.
Referenced by GetFunctionAranges().
|
protected |
Definition at line 338 of file DWARFUnit.h.
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
|
protected |
Definition at line 339 of file DWARFUnit.h.
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
|
protected |
Definition at line 352 of file DWARFUnit.h.
Referenced by AddUnitDIE(), and ExtractUnitDIEIfNeeded().
|
protected |
Definition at line 307 of file DWARFUnit.h.
Referenced by FindRnglistFromOffset(), GetAddressByteSize(), GetHeaderByteSize(), GetHeaderDWOId(), GetLength(), GetLocationData(), GetNextUnitOffset(), GetOffset(), GetRnglistData(), lldb_private::plugin::dwarf::DWARFTypeUnit::GetTypeHash(), lldb_private::plugin::dwarf::DWARFTypeUnit::GetTypeOffset(), GetUnitType(), GetVersion(), IsTypeUnit(), SetDwoStrOffsetsBase(), and SetLoclistsBase().
|
protected |
Definition at line 351 of file DWARFUnit.h.
Referenced by AddUnitDIE(), GetLocationTable(), and IsDWOUnit().
|
protected |
Definition at line 332 of file DWARFUnit.h.
Referenced by GetIsOptimized().
|
protected |
Definition at line 331 of file DWARFUnit.h.
Referenced by GetDWARFLanguageType().
|
protected |
Value of DW_AT_stmt_list.
Definition at line 342 of file DWARFUnit.h.
Referenced by AddUnitDIE(), and GetLineTableOffset().
|
protected |
Definition at line 309 of file DWARFUnit.h.
Referenced by GetLLDBCompUnit(), and SetLLDBCompUnit().
|
protected |
Definition at line 348 of file DWARFUnit.h.
Referenced by GetLoclistOffset(), and SetLoclistsBase().
|
protected |
Value of DW_AT_loclists_base.
Definition at line 336 of file DWARFUnit.h.
Referenced by GetLoclistOffset(), and SetLoclistsBase().
|
protected |
Definition at line 329 of file DWARFUnit.h.
Referenced by GetProducer(), and ParseProducerInfo().
|
protected |
Definition at line 330 of file DWARFUnit.h.
Referenced by GetProducerVersion(), and ParseProducerInfo().
|
protected |
Value of DW_AT_rnglists_base.
Definition at line 337 of file DWARFUnit.h.
Referenced by GetRangesBase(), GetRnglistOffset(), GetRnglistTable(), and SetRangesBase().
|
protected |
Definition at line 346 of file DWARFUnit.h.
Referenced by GetRnglistTable().
|
protected |
Definition at line 347 of file DWARFUnit.h.
Referenced by GetRnglistTable(), and SetRangesBase().
|
protected |
Definition at line 350 of file DWARFUnit.h.
Referenced by GetData(), and GetDebugSection().
|
protected |
Definition at line 311 of file DWARFUnit.h.
Referenced by GetSkeletonUnit(), and LinkToSkeletonUnit().
|
protected |
Definition at line 344 of file DWARFUnit.h.
Referenced by GetStrOffsetsBase(), and SetStrOffsetsBase().