summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index 4501e5acafc..84c421273c2 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -83,16 +83,16 @@ size_t DWARFUnit::ExtractDIEsIfNeeded(bool cu_die_only) {
uint32_t depth = 0;
// We are in our compile unit, parse starting at the offset we were told to
// parse
- const DWARFDataExtractor &debug_info_data = m_dwarf->get_debug_info_data();
+ const DWARFDataExtractor &data = GetData();
std::vector<uint32_t> die_index_stack;
die_index_stack.reserve(32);
die_index_stack.push_back(0);
bool prev_die_had_children = false;
DWARFFormValue::FixedFormSizes fixed_form_sizes =
DWARFFormValue::GetFixedFormSizesForAddressSize(GetAddressByteSize(),
- m_is_dwarf64);
+ IsDWARF64());
while (offset < next_cu_offset &&
- die.FastExtract(debug_info_data, this, fixed_form_sizes, &offset)) {
+ die.FastExtract(data, this, fixed_form_sizes, &offset)) {
// if (log)
// log->Printf("0x%8.8x: %*.*s%s%s",
// die.GetOffset(),
@@ -276,19 +276,14 @@ lldb::user_id_t DWARFUnit::GetID() const {
return local_id;
}
-uint32_t DWARFUnit::Size() const { return IsDWARF64() ? 23 : 11; }
-
dw_offset_t DWARFUnit::GetNextCompileUnitOffset() const {
- return m_offset + (IsDWARF64() ? 12 : 4) + GetLength();
+ return m_offset + GetLengthByteSize() + GetLength();
}
size_t DWARFUnit::GetDebugInfoSize() const {
- return (IsDWARF64() ? 12 : 4) + GetLength() - Size();
+ return GetLengthByteSize() + GetLength() - GetHeaderByteSize();
}
-uint32_t DWARFUnit::GetLength() const { return m_length; }
-uint16_t DWARFUnit::GetVersion() const { return m_version; }
-
const DWARFAbbreviationDeclarationSet *DWARFUnit::GetAbbreviations() const {
return m_abbrevs;
}
@@ -297,14 +292,6 @@ dw_offset_t DWARFUnit::GetAbbrevOffset() const {
return m_abbrevs ? m_abbrevs->GetOffset() : DW_INVALID_OFFSET;
}
-uint8_t DWARFUnit::GetAddressByteSize() const { return m_addr_size; }
-
-dw_addr_t DWARFUnit::GetBaseAddress() const { return m_base_addr; }
-
-dw_addr_t DWARFUnit::GetAddrBase() const { return m_addr_base; }
-
-dw_addr_t DWARFUnit::GetRangesBase() const { return m_ranges_base; }
-
void DWARFUnit::SetAddrBase(dw_addr_t addr_base,
dw_addr_t ranges_base,
dw_offset_t base_obj_offset) {
@@ -632,8 +619,6 @@ LanguageType DWARFUnit::GetLanguageType() {
return m_language_type;
}
-bool DWARFUnit::IsDWARF64() const { return m_is_dwarf64; }
-
bool DWARFUnit::GetIsOptimized() {
if (m_is_optimized == eLazyBoolCalculate) {
const DWARFDebugInfoEntry *die = GetUnitDIEPtrOnly();
@@ -1010,3 +995,4 @@ const DWARFDebugAranges &DWARFUnit::GetFunctionAranges() {
}
return *m_func_aranges_ap.get();
}
+
OpenPOWER on IntegriCloud