diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
33 files changed, 145 insertions, 194 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp index 989e49452fb..06e87eab33c 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp @@ -32,13 +32,13 @@ DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration(dw_tag_t tag, uint8_t } bool -DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, uint32_t* offset_ptr) +DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, lldb::offset_t* offset_ptr) { return Extract(data, offset_ptr, data.GetULEB128(offset_ptr)); } bool -DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, uint32_t* offset_ptr, dw_uleb128_t code) +DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, lldb::offset_t *offset_ptr, dw_uleb128_t code) { m_code = code; m_attributes.clear(); @@ -155,7 +155,7 @@ DWARFAbbreviationDeclaration::CopyChangingStringToStrp( dw_attr_t attr; dw_form_t form; uint32_t i; - dw_offset_t offset = debug_info_offset; + lldb::offset_t offset = debug_info_offset; for (i = 0; i < num_abbr_decl_attributes; ++i) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h index f748ab141af..f462b7fc108 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h @@ -32,7 +32,7 @@ public: void SetCode(dw_uleb128_t code) { m_code = code; } dw_tag_t Tag() const { return m_tag; } bool HasChildren() const { return m_has_children; } - uint32_t NumAttributes() const { return m_attributes.size(); } + size_t NumAttributes() const { return m_attributes.size(); } dw_attr_t GetAttrByIndex(uint32_t idx) const { return m_attributes.size() > idx ? m_attributes[idx].get_attr() : 0; } dw_form_t GetFormByIndex(uint32_t idx) const { return m_attributes.size() > idx ? m_attributes[idx].get_form() : 0; } bool GetAttrAndFormByIndex(uint32_t idx, dw_attr_t& attr, dw_form_t& form) const @@ -63,8 +63,8 @@ public: const DWARFCompileUnit* cu, const uint32_t strp_min_len); uint32_t FindAttributeIndex(dw_attr_t attr) const; - bool Extract(const lldb_private::DataExtractor& data, uint32_t* offset_ptr); - bool Extract(const lldb_private::DataExtractor& data, uint32_t* offset_ptr, dw_uleb128_t code); + bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr); + bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr, dw_uleb128_t code); // void Append(BinaryStreamBuf& out_buff) const; bool IsValid(); void Dump(lldb_private::Stream *s) const; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h index 2d875875e1e..8310b1dda5f 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h @@ -25,12 +25,12 @@ public: void set_attr(dw_attr_t attr) { m_attr_form = (m_attr_form & 0x0000ffffu) | (attr << 16); } void set_form(dw_form_t form) { m_attr_form = (m_attr_form & 0xffff0000u) | form; } dw_attr_t get_attr() const { return m_attr_form >> 16; } - dw_form_t get_form() const { return m_attr_form; } + dw_form_t get_form() const { return (dw_form_t)m_attr_form; } void get(dw_attr_t& attr, dw_form_t& form) const { register uint32_t attr_form = m_attr_form; attr = attr_form >> 16; - form = attr_form; + form = (dw_form_t)attr_form; } bool operator == (const DWARFAttribute& rhs) const { return m_attr_form == rhs.m_attr_form; } typedef std::vector<DWARFAttribute> collection; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index 08a022f8e68..5d93d194056 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -68,7 +68,7 @@ DWARFCompileUnit::Clear() } bool -DWARFCompileUnit::Extract(const DataExtractor &debug_info, uint32_t* offset_ptr) +DWARFCompileUnit::Extract(const DataExtractor &debug_info, lldb::offset_t *offset_ptr) { Clear(); @@ -103,7 +103,7 @@ DWARFCompileUnit::Extract(const DataExtractor &debug_info, uint32_t* offset_ptr) dw_offset_t -DWARFCompileUnit::Extract(dw_offset_t offset, const DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs) +DWARFCompileUnit::Extract(lldb::offset_t offset, const DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs) { Clear(); @@ -167,8 +167,8 @@ DWARFCompileUnit::ExtractDIEsIfNeeded (bool cu_die_only) // Set the offset to that of the first DIE and calculate the start of the // next compilation unit header. - uint32_t offset = GetFirstDIEOffset(); - uint32_t next_cu_offset = GetNextCompileUnitOffset(); + lldb::offset_t offset = GetFirstDIEOffset(); + lldb::offset_t next_cu_offset = GetNextCompileUnitOffset(); DWARFDebugInfoEntry die; // Keep a flat array of the DIE for binary lookup by DIE offset @@ -273,7 +273,7 @@ DWARFCompileUnit::ExtractDIEsIfNeeded (bool cu_die_only) // unit header). if (offset > next_cu_offset) { - m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning ("DWARF compile unit extends beyond its bounds cu 0x%8.8x at 0x%8.8x\n", + m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning ("DWARF compile unit extends beyond its bounds cu 0x%8.8x at 0x%8.8" PRIx64 "\n", GetOffset(), offset); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h index c400497f0b2..acbbdf1c2a6 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h @@ -29,8 +29,8 @@ public: DWARFCompileUnit(SymbolFileDWARF* dwarf2Data); - bool Extract(const lldb_private::DataExtractor &debug_info, uint32_t* offset_ptr); - dw_offset_t Extract(dw_offset_t offset, const lldb_private::DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs); + bool Extract(const lldb_private::DataExtractor &debug_info, lldb::offset_t *offset_ptr); + dw_offset_t Extract(lldb::offset_t offset, const lldb_private::DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs); size_t ExtractDIEsIfNeeded (bool cu_die_only); bool LookupAddress( const dw_addr_t address, diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp index fcf20c1cf48..47657d5089b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp @@ -30,9 +30,9 @@ DWARFAbbreviationDeclarationSet::Clear() // DWARFAbbreviationDeclarationSet::Extract() //---------------------------------------------------------------------- bool -DWARFAbbreviationDeclarationSet::Extract(const DataExtractor& data, uint32_t* offset_ptr) +DWARFAbbreviationDeclarationSet::Extract(const DataExtractor& data, lldb::offset_t *offset_ptr) { - const uint32_t begin_offset = *offset_ptr; + const lldb::offset_t begin_offset = *offset_ptr; m_offset = begin_offset; Clear(); DWARFAbbreviationDeclaration abbrevDeclaration; @@ -144,7 +144,7 @@ DWARFDebugAbbrev::DWARFDebugAbbrev() : void DWARFDebugAbbrev::Parse(const DataExtractor& data) { - uint32_t offset = 0; + lldb::offset_t offset = 0; while (data.ValidOffset(offset)) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h index 98bddd99c98..eba439928a2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h @@ -43,7 +43,7 @@ public: void Clear(); dw_offset_t GetOffset() const { return m_offset; } void Dump(lldb_private::Stream *s) const; - bool Extract(const lldb_private::DataExtractor& data, uint32_t* offset_ptr); + bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr); //void Encode(BinaryStreamBuf& debug_abbrev_buf) const; dw_uleb128_t AppendAbbrevDeclSequential(const DWARFAbbreviationDeclaration& abbrevDecl); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp index 81dc58cc312..b1eb27299ef 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp @@ -162,7 +162,7 @@ DWARFDebugArangeSet::AddDescriptor(const DWARFDebugArangeSet::Descriptor& range) } bool -DWARFDebugArangeSet::Extract(const DataExtractor &data, uint32_t* offset_ptr) +DWARFDebugArangeSet::Extract(const DataExtractor &data, lldb::offset_t *offset_ptr) { if (data.ValidOffset(*offset_ptr)) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h index 5c1c44e50dd..19ec8d042e7 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h @@ -41,12 +41,12 @@ public: void SetHeader(uint16_t version, uint32_t cu_offset, uint8_t addr_size, uint8_t seg_size); void AddDescriptor(const DWARFDebugArangeSet::Descriptor& range); void Compact(); - bool Extract(const lldb_private::DataExtractor &data, uint32_t* offset_ptr); + bool Extract(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr); void Dump(lldb_private::Stream *s) const; dw_offset_t GetCompileUnitDIEOffset() const { return m_header.cu_offset; } dw_offset_t GetOffsetOfNextEntry() const; dw_offset_t FindAddress(dw_addr_t address) const; - uint32_t NumDescriptors() const { return m_arange_descriptors.size(); } + size_t NumDescriptors() const { return m_arange_descriptors.size(); } const Header& GetHeader() const { return m_header; } const Descriptor* GetDescriptor(uint32_t i) const { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp index 94519a472f1..bcf62b88fef 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp @@ -60,7 +60,7 @@ DWARFDebugAranges::Extract(const DataExtractor &debug_aranges_data) { if (debug_aranges_data.ValidOffset(0)) { - uint32_t offset = 0; + lldb::offset_t offset = 0; DWARFDebugArangeSet set; Range range; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h index e17a37da542..88db929226a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h @@ -66,7 +66,7 @@ public: { return m_aranges.IsEmpty(); } - uint32_t + size_t GetNumRanges() const { return m_aranges.GetSize(); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp index 5395a6adae7..2015b2441f1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -73,10 +73,9 @@ DWARFDebugInfo::GetCompileUnitAranges () log->Printf ("DWARFDebugInfo::GetCompileUnitAranges() for \"%s/%s\" by parsing", m_dwarf2Data->GetObjectFile()->GetFileSpec().GetDirectory().GetCString(), m_dwarf2Data->GetObjectFile()->GetFileSpec().GetFilename().GetCString()); - const uint32_t num_compile_units = GetNumCompileUnits(); - uint32_t idx; + const size_t num_compile_units = GetNumCompileUnits(); const bool clear_dies_if_already_not_parsed = true; - for (idx = 0; idx < num_compile_units; ++idx) + for (size_t idx = 0; idx < num_compile_units; ++idx) { DWARFCompileUnit* cu = GetCompileUnitAtIndex(idx); if (cu) @@ -148,7 +147,7 @@ DWARFDebugInfo::ParseCompileUnitHeadersIfNeeded() { if (m_dwarf2Data != NULL) { - uint32_t offset = 0; + lldb::offset_t offset = 0; const DataExtractor &debug_info_data = m_dwarf2Data->get_debug_info_data(); while (debug_info_data.ValidOffset(offset)) { @@ -168,7 +167,7 @@ DWARFDebugInfo::ParseCompileUnitHeadersIfNeeded() } } -uint32_t +size_t DWARFDebugInfo::GetNumCompileUnits() { ParseCompileUnitHeadersIfNeeded(); @@ -395,7 +394,7 @@ DWARFDebugInfo::Parse(SymbolFileDWARF* dwarf2Data, Callback callback, void* user { if (dwarf2Data) { - uint32_t offset = 0; + lldb::offset_t offset = 0; uint32_t depth = 0; DWARFCompileUnitSP cu(new DWARFCompileUnit(dwarf2Data)); if (cu.get() == NULL) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h index b9010cdefaa..c716fa423ff 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h @@ -45,7 +45,7 @@ public: DWARFDebugInfoEntry** block_die); void AddCompileUnit(DWARFCompileUnitSP& cu); - uint32_t GetNumCompileUnits(); + size_t GetNumCompileUnits(); bool ContainsCompileUnit (const DWARFCompileUnit *cu) const; DWARFCompileUnit* GetCompileUnitAtIndex(uint32_t idx); DWARFCompileUnitSP GetCompileUnit(dw_offset_t cu_offset, uint32_t* idx_ptr = NULL); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 5411ee59bb4..949d6d08488 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -89,7 +89,7 @@ bool DWARFDebugInfoEntry::Attributes::ExtractFormValueAtIndex (SymbolFileDWARF* dwarf2Data, uint32_t i, DWARFFormValue &form_value) const { form_value.SetForm(FormAtIndex(i)); - dw_offset_t offset = DIEOffsetAtIndex(i); + lldb::offset_t offset = DIEOffsetAtIndex(i); return form_value.ExtractValue(dwarf2Data->get_debug_info_data(), &offset, CompileUnitAtIndex(i)); } @@ -119,7 +119,7 @@ DWARFDebugInfoEntry::FastExtract const DataExtractor& debug_info_data, const DWARFCompileUnit* cu, const uint8_t *fixed_form_sizes, - uint32_t* offset_ptr + lldb::offset_t *offset_ptr ) { m_offset = *offset_ptr; @@ -134,7 +134,7 @@ DWARFDebugInfoEntry::FastExtract if (m_abbr_idx) { - uint32_t offset = *offset_ptr; + lldb::offset_t offset = *offset_ptr; const DWARFAbbreviationDeclaration *abbrevDecl = cu->GetAbbreviations()->GetAbbreviationDeclaration(m_abbr_idx); @@ -273,14 +273,14 @@ DWARFDebugInfoEntry::Extract ( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, - uint32_t* offset_ptr + lldb::offset_t *offset_ptr ) { const DataExtractor& debug_info_data = dwarf2Data->get_debug_info_data(); // const DataExtractor& debug_str_data = dwarf2Data->get_debug_str_data(); const uint32_t cu_end_offset = cu->GetNextCompileUnitOffset(); const uint8_t cu_addr_size = cu->GetAddressByteSize(); - uint32_t offset = *offset_ptr; + lldb::offset_t offset = *offset_ptr; // if (offset >= cu_end_offset) // Log::Error("DIE at offset 0x%8.8x is beyond the end of the current compile unit (0x%8.8x)", m_offset, cu_end_offset); if ((offset < cu_end_offset) && debug_info_data.ValidOffset(offset)) @@ -745,12 +745,12 @@ DWARFDebugInfoEntry::GetDIENamesAndRanges if (dwarf2Data == NULL) return false; - dw_addr_t lo_pc = DW_INVALID_ADDRESS; - dw_addr_t hi_pc = DW_INVALID_ADDRESS; + dw_addr_t lo_pc = LLDB_INVALID_ADDRESS; + dw_addr_t hi_pc = LLDB_INVALID_ADDRESS; std::vector<dw_offset_t> die_offsets; bool set_frame_base_loclist_addr = false; - dw_offset_t offset; + lldb::offset_t offset; const DWARFAbbreviationDeclaration* abbrevDecl = GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset); if (abbrevDecl) @@ -859,7 +859,7 @@ DWARFDebugInfoEntry::GetDIENamesAndRanges if (loc_list_length > 0) { frame_base->SetOpcodeData(debug_loc_data, debug_loc_offset, loc_list_length); - if (lo_pc != DW_INVALID_ADDRESS) + if (lo_pc != LLDB_INVALID_ADDRESS) { assert (lo_pc >= cu->GetBaseAddress()); frame_base->SetLocationListSlide(lo_pc - cu->GetBaseAddress()); @@ -882,9 +882,9 @@ DWARFDebugInfoEntry::GetDIENamesAndRanges if (ranges.IsEmpty()) { - if (lo_pc != DW_INVALID_ADDRESS) + if (lo_pc != LLDB_INVALID_ADDRESS) { - if (hi_pc != DW_INVALID_ADDRESS && hi_pc > lo_pc) + if (hi_pc != LLDB_INVALID_ADDRESS && hi_pc > lo_pc) ranges.Append(DWARFDebugRanges::Range (lo_pc, hi_pc - lo_pc)); else ranges.Append(DWARFDebugRanges::Range (lo_pc, 0)); @@ -934,7 +934,7 @@ DWARFDebugInfoEntry::Dump ) const { const DataExtractor& debug_info_data = dwarf2Data->get_debug_info_data(); - uint32_t offset = m_offset; + lldb::offset_t offset = m_offset; if (debug_info_data.ValidOffset(offset)) { @@ -1028,7 +1028,7 @@ DWARFDebugInfoEntry::DumpAttribute SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const DataExtractor& debug_info_data, - uint32_t* offset_ptr, + lldb::offset_t *offset_ptr, Stream &s, dw_attr_t attr, dw_form_t form @@ -1158,7 +1158,7 @@ DWARFDebugInfoEntry::DumpAttribute { if ( !verbose ) form_value.Dump(s, debug_str_data, cu); - uint32_t ranges_offset = form_value.Unsigned(); + lldb::offset_t ranges_offset = form_value.Unsigned(); dw_addr_t base_addr = cu ? cu->GetBaseAddress() : 0; if (dwarf2Data) DWARFDebugRanges::Dump(s, dwarf2Data->get_debug_ranges_data(), &ranges_offset, base_addr); @@ -1190,7 +1190,7 @@ DWARFDebugInfoEntry::GetAttributes uint32_t curr_depth ) const { - uint32_t offset; + lldb::offset_t offset; const DWARFAbbreviationDeclaration* abbrevDecl = GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset); if (abbrevDecl) @@ -1287,7 +1287,7 @@ DWARFDebugInfoEntry::GetAttributeValue dw_offset_t* end_attr_offset_ptr ) const { - uint32_t offset; + lldb::offset_t offset; const DWARFAbbreviationDeclaration* abbrevDecl = GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset); if (abbrevDecl) @@ -1438,7 +1438,7 @@ DWARFDebugInfoEntry::GetAttributeValueAsLocation // We have a location list offset as the value that is // the offset into the .debug_loc section that describes // the value over it's lifetime - dw_offset_t debug_loc_offset = form_value.Unsigned(); + lldb::offset_t debug_loc_offset = form_value.Unsigned(); if (dwarf2Data) { assert(dwarf2Data->get_debug_loc_data().GetAddressByteSize() == cu->GetAddressByteSize()); @@ -1553,7 +1553,7 @@ DWARFDebugInfoEntry::GetName ( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, - const uint32_t die_offset, + const dw_offset_t die_offset, Stream &s ) { @@ -1564,7 +1564,7 @@ DWARFDebugInfoEntry::GetName } DWARFDebugInfoEntry die; - uint32_t offset = die_offset; + lldb::offset_t offset = die_offset; if (die.Extract(dwarf2Data, cu, &offset)) { if (die.IsNULL()) @@ -1602,7 +1602,7 @@ DWARFDebugInfoEntry::AppendTypeName ( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, - const uint32_t die_offset, + const dw_offset_t die_offset, Stream &s ) { @@ -1613,7 +1613,7 @@ DWARFDebugInfoEntry::AppendTypeName } DWARFDebugInfoEntry die; - uint32_t offset = die_offset; + lldb::offset_t offset = die_offset; if (die.Extract(dwarf2Data, cu, &offset)) { if (die.IsNULL()) @@ -1720,11 +1720,11 @@ DWARFDebugInfoEntry::BuildAddressRangeTable { if (m_tag == DW_TAG_subprogram) { - dw_addr_t hi_pc = DW_INVALID_ADDRESS; - dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, DW_INVALID_ADDRESS); - if (lo_pc != DW_INVALID_ADDRESS) - hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS); - if (hi_pc != DW_INVALID_ADDRESS) + dw_addr_t hi_pc = LLDB_INVALID_ADDRESS; + dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS); + if (lo_pc != LLDB_INVALID_ADDRESS) + hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, LLDB_INVALID_ADDRESS); + if (hi_pc != LLDB_INVALID_ADDRESS) { /// printf("BuildAddressRangeTable() 0x%8.8x: %30s: [0x%8.8x - 0x%8.8x)\n", m_offset, DW_TAG_value_to_name(tag), lo_pc, hi_pc); debug_aranges->AppendRange (cu->GetOffset(), lo_pc, hi_pc); @@ -1761,11 +1761,11 @@ DWARFDebugInfoEntry::BuildFunctionAddressRangeTable { if (m_tag == DW_TAG_subprogram) { - dw_addr_t hi_pc = DW_INVALID_ADDRESS; - dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, DW_INVALID_ADDRESS); - if (lo_pc != DW_INVALID_ADDRESS) - hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS); - if (hi_pc != DW_INVALID_ADDRESS) + dw_addr_t hi_pc = LLDB_INVALID_ADDRESS; + dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS); + if (lo_pc != LLDB_INVALID_ADDRESS) + hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, LLDB_INVALID_ADDRESS); + if (hi_pc != LLDB_INVALID_ADDRESS) { // printf("BuildAddressRangeTable() 0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", m_offset, lo_pc, hi_pc); // DEBUG ONLY debug_aranges->AppendRange (GetOffset(), lo_pc, hi_pc); @@ -2052,11 +2052,11 @@ DWARFDebugInfoEntry::LookupAddress if (match_addr_range) { - dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, DW_INVALID_ADDRESS); - if (lo_pc != DW_INVALID_ADDRESS) + dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS); + if (lo_pc != LLDB_INVALID_ADDRESS) { - dw_addr_t hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS); - if (hi_pc != DW_INVALID_ADDRESS) + dw_addr_t hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, LLDB_INVALID_ADDRESS); + if (hi_pc != LLDB_INVALID_ADDRESS) { // printf("\n0x%8.8x: %30s: address = 0x%8.8x [0x%8.8x - 0x%8.8x) ", m_offset, DW_TAG_value_to_name(tag), address, lo_pc, hi_pc); if ((lo_pc <= address) && (address < hi_pc)) @@ -2166,7 +2166,7 @@ DWARFDebugInfoEntry::LookupAddress const DWARFAbbreviationDeclaration* DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr (SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit *cu, - dw_offset_t &offset) const + lldb::offset_t &offset) const { if (dwarf2Data) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h index 0a97bbd1ec7..a77801fe265 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h @@ -75,7 +75,7 @@ public: bool ContainsAttribute(dw_attr_t attr) const; bool RemoveAttribute(dw_attr_t attr); void Clear() { m_infos.clear(); } - uint32_t Size() const { return m_infos.size(); } + size_t Size() const { return m_infos.size(); } protected: struct Info @@ -145,12 +145,12 @@ public: const lldb_private::DataExtractor& debug_info_data, const DWARFCompileUnit* cu, const uint8_t *fixed_form_sizes, - dw_offset_t* offset_ptr); + lldb::offset_t* offset_ptr); bool Extract( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, - dw_offset_t* offset_ptr); + lldb::offset_t* offset_ptr); bool LookupAddress( const dw_addr_t address, @@ -277,7 +277,7 @@ public: SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const lldb_private::DataExtractor& debug_info_data, - uint32_t* offset_ptr, + lldb::offset_t *offset_ptr, lldb_private::Stream &s, dw_attr_t attr, dw_form_t form); @@ -304,7 +304,7 @@ public: const DWARFAbbreviationDeclaration* GetAbbreviationDeclarationPtr (SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit *cu, - dw_offset_t &offset) const; + lldb::offset_t &offset) const; dw_tag_t Tag () const diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index 77fd4eed5d9..0a19aa2cbdd 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -35,11 +35,11 @@ void DWARFDebugLine::Parse(const DataExtractor& debug_line_data) { m_lineTableMap.clear(); - dw_offset_t offset = 0; + lldb::offset_t offset = 0; LineTable::shared_ptr line_table_sp(new LineTable); while (debug_line_data.ValidOffset(offset)) { - const uint32_t debug_line_offset = offset; + const lldb::offset_t debug_line_offset = offset; if (line_table_sp.get() == NULL) break; @@ -135,7 +135,7 @@ DWARFDebugLine::DumpStatementTable(Log *log, const DataExtractor& debug_line_dat { if (debug_line_data.ValidOffset(debug_line_offset)) { - uint32_t offset = debug_line_offset; + lldb::offset_t offset = debug_line_offset; log->Printf( "----------------------------------------------------------------------\n" "debug_line[0x%8.8x]\n" "----------------------------------------------------------------------\n", debug_line_offset); @@ -185,7 +185,7 @@ DWARFDebugLine::DumpOpcodes(Log *log, SymbolFileDWARF* dwarf2Data, dw_offset_t d dw_offset_t DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_data, const dw_offset_t debug_line_offset, uint32_t flags) { - uint32_t offset = debug_line_offset; + lldb::offset_t offset = debug_line_offset; if (debug_line_data.ValidOffset(offset)) { Prologue prologue; @@ -200,7 +200,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d else { offset = debug_line_offset; - log->Printf( "0x%8.8x: skipping pad byte %2.2x", offset, debug_line_data.GetU8(&offset)); + log->Printf( "0x%8.8" PRIx64 ": skipping pad byte %2.2x", offset, debug_line_data.GetU8(&offset)); return offset; } @@ -388,7 +388,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d void DWARFDebugLine::Parse(const DataExtractor& debug_line_data, DWARFDebugLine::State::Callback callback, void* userData) { - uint32_t offset = 0; + lldb::offset_t offset = 0; if (debug_line_data.ValidOffset(offset)) { if (!ParseStatementTable(debug_line_data, &offset, callback, userData)) @@ -401,9 +401,9 @@ DWARFDebugLine::Parse(const DataExtractor& debug_line_data, DWARFDebugLine::Stat // DWARFDebugLine::ParsePrologue //---------------------------------------------------------------------- bool -DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* offset_ptr, Prologue* prologue) +DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, Prologue* prologue) { - const uint32_t prologue_offset = *offset_ptr; + const lldb::offset_t prologue_offset = *offset_ptr; //DEBUG_PRINTF("0x%8.8x: ParsePrologue()\n", *offset_ptr); @@ -416,7 +416,7 @@ DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* return false; prologue->prologue_length = debug_line_data.GetU32(offset_ptr); - const dw_offset_t end_prologue_offset = prologue->prologue_length + *offset_ptr; + const lldb::offset_t end_prologue_offset = prologue->prologue_length + *offset_ptr; prologue->min_inst_length = debug_line_data.GetU8(offset_ptr); prologue->default_is_stmt = debug_line_data.GetU8(offset_ptr); prologue->line_base = debug_line_data.GetU8(offset_ptr); @@ -459,8 +459,8 @@ DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* if (*offset_ptr != end_prologue_offset) { Host::SystemLog (Host::eSystemLogWarning, - "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8x\n", - prologue_offset, + "warning: parsing line table prologue at 0x%8.8" PRIx64 " should have ended at 0x%8.8" PRIx64 " but it ended ad 0x%8.8" PRIx64 "\n", + prologue_offset, end_prologue_offset, *offset_ptr); } @@ -474,7 +474,7 @@ DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, dw_offset_t stmt_list, FileSpecList &support_files) { - uint32_t offset = stmt_list + 4; // Skip the total length + lldb::offset_t offset = stmt_list + 4; // Skip the total length const char * s; uint32_t version = debug_line_data.GetU16(&offset); if (version != 2) @@ -554,7 +554,7 @@ DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, if (offset != end_prologue_offset) { Host::SystemLog (Host::eSystemLogError, - "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8x\n", + "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8" PRIx64 "\n", stmt_list, end_prologue_offset, offset); @@ -573,7 +573,7 @@ bool DWARFDebugLine::ParseStatementTable ( const DataExtractor& debug_line_data, - dw_offset_t* offset_ptr, + lldb::offset_t* offset_ptr, DWARFDebugLine::State::Callback callback, void* userData ) @@ -613,7 +613,7 @@ DWARFDebugLine::ParseStatementTable { // Extended Opcodes always start with a zero opcode followed by // a uleb128 length so you can skip ones you don't know about - dw_offset_t ext_offset = *offset_ptr; + lldb::offset_t ext_offset = *offset_ptr; dw_uleb128_t len = debug_line_data.GetULEB128(offset_ptr); dw_offset_t arg_size = len - (*offset_ptr - ext_offset); @@ -873,7 +873,7 @@ ParseStatementTableCallback(dw_offset_t offset, const DWARFDebugLine::State& sta // the prologue and all rows. //---------------------------------------------------------------------- bool -DWARFDebugLine::ParseStatementTable(const DataExtractor& debug_line_data, uint32_t* offset_ptr, LineTable* line_table) +DWARFDebugLine::ParseStatementTable(const DataExtractor& debug_line_data, lldb::offset_t *offset_ptr, LineTable* line_table) { return ParseStatementTable(debug_line_data, offset_ptr, ParseStatementTableCallback, line_table); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h index 8c7ab6d8259..ade8f9bd9f7 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h @@ -197,11 +197,11 @@ public: static bool DumpOpcodes(lldb_private::Log *log, SymbolFileDWARF* dwarf2Data, dw_offset_t line_offset = DW_INVALID_OFFSET, uint32_t dump_flags = 0); // If line_offset is invalid, dump everything static bool DumpLineTableRows(lldb_private::Log *log, SymbolFileDWARF* dwarf2Data, dw_offset_t line_offset = DW_INVALID_OFFSET); // If line_offset is invalid, dump everything static bool ParseSupportFiles(const lldb::ModuleSP &module_sp, const lldb_private::DataExtractor& debug_line_data, const char *cu_comp_dir, dw_offset_t stmt_list, lldb_private::FileSpecList &support_files); - static bool ParsePrologue(const lldb_private::DataExtractor& debug_line_data, dw_offset_t* offset_ptr, Prologue* prologue); - static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, dw_offset_t* offset_ptr, State::Callback callback, void* userData); + static bool ParsePrologue(const lldb_private::DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, Prologue* prologue); + static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, State::Callback callback, void* userData); static dw_offset_t DumpStatementTable(lldb_private::Log *log, const lldb_private::DataExtractor& debug_line_data, const dw_offset_t line_offset); static dw_offset_t DumpStatementOpcodes(lldb_private::Log *log, const lldb_private::DataExtractor& debug_line_data, const dw_offset_t line_offset, uint32_t flags); - static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, uint32_t* offset_ptr, LineTable* line_table); + static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, lldb::offset_t *offset_ptr, LineTable* line_table); static void Parse(const lldb_private::DataExtractor& debug_line_data, DWARFDebugLine::State::Callback callback, void* userData); // static void AppendLineTableData(const DWARFDebugLine::Prologue* prologue, const DWARFDebugLine::Row::collection& state_coll, const uint32_t addr_size, BinaryStreamBuf &debug_line_data); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp index 0501da8fe40..60ace9e8229 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp @@ -26,7 +26,7 @@ DWARFDebugMacinfo::~DWARFDebugMacinfo() } void -DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, dw_offset_t offset) +DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, lldb::offset_t offset) { DWARFDebugMacinfoEntry maninfo_entry; if (macinfo_data.GetByteSize() == 0) @@ -34,7 +34,7 @@ DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, dw_offset_ s->PutCString("< EMPTY >\n"); return; } - if (offset == DW_INVALID_OFFSET) + if (offset == LLDB_INVALID_OFFSET) { offset = 0; while (maninfo_entry.Extract(macinfo_data, &offset)) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h index 85ddebd1ff2..f35ff165f1f 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h @@ -22,7 +22,7 @@ public: static void Dump (lldb_private::Stream *s, const lldb_private::DataExtractor& macinfo_data, - dw_offset_t offset = DW_INVALID_OFFSET); + lldb::offset_t offset = LLDB_INVALID_OFFSET); }; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp index 0aaeb7e0249..5cd9cb6be47 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp @@ -80,7 +80,7 @@ DWARFDebugMacinfoEntry::Dump(Stream *s) const bool -DWARFDebugMacinfoEntry::Extract(const DataExtractor& mac_info_data, dw_offset_t* offset_ptr) +DWARFDebugMacinfoEntry::Extract(const DataExtractor& mac_info_data, lldb::offset_t* offset_ptr) { if (mac_info_data.ValidOffset(*offset_ptr)) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h index f701c178204..46fd44a22a6 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h @@ -39,7 +39,7 @@ public: bool Extract(const lldb_private::DataExtractor& mac_info_data, - dw_offset_t* offset_ptr); + lldb::offset_t* offset_ptr); protected: diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp index 11e8d4c004d..8e7191e4cb4 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp @@ -40,7 +40,7 @@ DWARFDebugPubnames::Extract(const DataExtractor& data) if (data.ValidOffset(0)) { - uint32_t offset = 0; + lldb::offset_t offset = 0; DWARFDebugPubnamesSet set; while (data.ValidOffset(offset)) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp index 0421ced55d4..2df8d525f03 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp @@ -78,7 +78,7 @@ DWARFDebugPubnamesSet::InitNameIndexes() const bool -DWARFDebugPubnamesSet::Extract(const DataExtractor& data, uint32_t* offset_ptr) +DWARFDebugPubnamesSet::Extract(const DataExtractor& data, lldb::offset_t *offset_ptr) { if (data.ValidOffset(*offset_ptr)) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h index adf93d5a194..941c83e58a4 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h @@ -70,7 +70,7 @@ public: uint32_t NumDescriptors() const { return m_descriptors.size(); } void AddDescriptor(dw_offset_t cu_rel_offset, const char* name); void Clear(); - bool Extract(const lldb_private::DataExtractor& debug_pubnames_data, uint32_t* offset_ptr); + bool Extract(const lldb_private::DataExtractor& debug_pubnames_data, lldb::offset_t *offset_ptr); void Dump(lldb_private::Log *s) const; void InitNameIndexes() const; void Find(const char* name, bool ignore_case, std::vector<dw_offset_t>& die_offset_coll) const; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp index f69b370b515..461b17fc3ab 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp @@ -28,7 +28,7 @@ void DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data) { RangeList range_list; - dw_offset_t offset = 0; + lldb::offset_t offset = 0; dw_offset_t debug_ranges_offset = offset; while (Extract(dwarf2Data, &offset, range_list)) { @@ -82,11 +82,11 @@ DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data) //} bool -DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data, uint32_t* offset_ptr, RangeList &range_list) +DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data, lldb::offset_t *offset_ptr, RangeList &range_list) { range_list.Clear(); - uint32_t range_offset = *offset_ptr; + lldb::offset_t range_offset = *offset_ptr; const DataExtractor& debug_ranges_data = dwarf2Data->get_debug_ranges_data(); uint32_t addr_size = debug_ranges_data.GetAddressByteSize(); @@ -105,12 +105,12 @@ DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data, uint32_t* offset_ptr, Ran { case 2: if (begin == 0xFFFFull) - begin = DW_INVALID_ADDRESS; + begin = LLDB_INVALID_ADDRESS; break; case 4: if (begin == 0xFFFFFFFFull) - begin = DW_INVALID_ADDRESS; + begin = LLDB_INVALID_ADDRESS; break; case 8: @@ -130,60 +130,9 @@ DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data, uint32_t* offset_ptr, Ran return range_offset != *offset_ptr; } -// -//dw_addr_t -//DWARFDebugRanges::RangeList::LowestAddress(const dw_addr_t cu_base_addr) const -//{ -// dw_addr_t addr = DW_INVALID_ADDRESS; -// dw_addr_t curr_base_addr = cu_base_addr; -// if (!ranges.empty()) -// { -// Range::const_iterator pos = ranges.begin(); -// Range::const_iterator end_pos = ranges.end(); -// for (pos = ranges.begin(); pos != end_pos; ++pos) -// { -// if (pos->begin_offset == DW_INVALID_ADDRESS) -// curr_base_addr = pos->end_offset; -// else if (curr_base_addr != DW_INVALID_ADDRESS) -// { -// dw_addr_t curr_addr = curr_base_addr + pos->begin_offset; -// if (addr > curr_addr) -// addr = curr_addr; -// } -// } -// } -// return addr; -//} -// -//dw_addr_t -//DWARFDebugRanges::RangeList::HighestAddress(const dw_addr_t cu_base_addr) const -//{ -// dw_addr_t addr = 0; -// dw_addr_t curr_base_addr = cu_base_addr; -// if (!ranges.empty()) -// { -// Range::const_iterator pos = ranges.begin(); -// Range::const_iterator end_pos = ranges.end(); -// for (pos = ranges.begin(); pos != end_pos; ++pos) -// { -// if (pos->begin_offset == DW_INVALID_ADDRESS) -// curr_base_addr = pos->end_offset; -// else if (curr_base_addr != DW_INVALID_ADDRESS) -// { -// dw_addr_t curr_addr = curr_base_addr + pos->end_offset; -// if (addr < curr_addr) -// addr = curr_addr; -// } -// } -// } -// if (addr != 0) -// return addr; -// return DW_INVALID_ADDRESS; -//} -// void -DWARFDebugRanges::Dump(Stream &s, const DataExtractor& debug_ranges_data, uint32_t* offset_ptr, dw_addr_t cu_base_addr) +DWARFDebugRanges::Dump(Stream &s, const DataExtractor& debug_ranges_data, lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr) { uint32_t addr_size = s.GetAddressByteSize(); bool verbose = s.GetVerbose(); @@ -196,7 +145,7 @@ DWARFDebugRanges::Dump(Stream &s, const DataExtractor& debug_ranges_data, uint32 // Extend 4 byte addresses that consits of 32 bits of 1's to be 64 bits // of ones if (begin == 0xFFFFFFFFull && addr_size == 4) - begin = DW_INVALID_ADDRESS; + begin = LLDB_INVALID_ADDRESS; s.Indent(); if (verbose) @@ -210,7 +159,7 @@ DWARFDebugRanges::Dump(Stream &s, const DataExtractor& debug_ranges_data, uint32 s.PutCString(" End"); break; } - else if (begin == DW_INVALID_ADDRESS) + else if (begin == LLDB_INVALID_ADDRESS) { // A base address selection entry base_addr = end; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h index 82a82edfaf3..40899abe9c2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h @@ -26,14 +26,14 @@ public: DWARFDebugRanges(); ~DWARFDebugRanges(); void Extract(SymbolFileDWARF* dwarf2Data); - static void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor& debug_ranges_data, uint32_t* offset_ptr, dw_addr_t cu_base_addr); + static void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor& debug_ranges_data, lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr); bool FindRanges(dw_offset_t debug_ranges_offset, DWARFDebugRanges::RangeList& range_list) const; protected: bool Extract (SymbolFileDWARF* dwarf2Data, - uint32_t* offset_ptr, + lldb::offset_t *offset_ptr, RangeList &range_list); typedef std::map<dw_offset_t, RangeList> range_map; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index 3288404b236..48232656b61 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -114,7 +114,7 @@ DWARFFormValue::DWARFFormValue(dw_form_t form) : } bool -DWARFFormValue::ExtractValue(const DataExtractor& data, uint32_t* offset_ptr, const DWARFCompileUnit* cu) +DWARFFormValue::ExtractValue(const DataExtractor& data, lldb::offset_t* offset_ptr, const DWARFCompileUnit* cu) { bool indirect = false; bool is_block = false; @@ -178,13 +178,13 @@ DWARFFormValue::ExtractValue(const DataExtractor& data, uint32_t* offset_ptr, co } bool -DWARFFormValue::SkipValue(const DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu) const +DWARFFormValue::SkipValue(const DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu) const { return DWARFFormValue::SkipValue(m_form, debug_info_data, offset_ptr, cu); } bool -DWARFFormValue::SkipValue(dw_form_t form, const DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu) +DWARFFormValue::SkipValue(dw_form_t form, const DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu) { switch (form) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h index 5051a5125f2..751653c7925 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h @@ -49,7 +49,9 @@ public: void SetForm(dw_form_t form) { m_form = form; } const ValueType& Value() const { return m_value; } void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor* debug_str_data, const DWARFCompileUnit* cu) const; - bool ExtractValue(const lldb_private::DataExtractor& data, uint32_t* offset_ptr, const DWARFCompileUnit* cu); + bool ExtractValue(const lldb_private::DataExtractor& data, + lldb::offset_t* offset_ptr, + const DWARFCompileUnit* cu); bool IsInlinedCStr() const { return (m_value.data != NULL) && m_value.data == (uint8_t*)m_value.value.cstr; } const uint8_t* BlockData() const; uint64_t Reference(const DWARFCompileUnit* cu) const; @@ -60,9 +62,9 @@ public: int64_t Signed() const { return m_value.value.sval; } void SetSigned(int64_t sval) { m_value.value.sval = sval; } const char* AsCString(const lldb_private::DataExtractor* debug_str_data_ptr) const; - bool SkipValue(const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu) const; - static bool SkipValue(const dw_form_t form, const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu); -// static bool TransferValue(dw_form_t form, const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu, BinaryStreamBuf& out_buff); + bool SkipValue(const lldb_private::DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu) const; + static bool SkipValue(const dw_form_t form, const lldb_private::DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu); +// static bool TransferValue(dw_form_t form, const lldb_private::DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu, BinaryStreamBuf& out_buff); // static bool TransferValue(const DWARFFormValue& formValue, const DWARFCompileUnit* cu, BinaryStreamBuf& out_buff); // static bool PutUnsigned(dw_form_t form, dw_offset_t offset, uint64_t value, BinaryStreamBuf& out_buff, const DWARFCompileUnit* cu, bool fixup_cu_relative_refs); static bool IsBlockForm(const dw_form_t form); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp index 81492a992f2..fdc07836b88 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp @@ -15,7 +15,7 @@ using namespace lldb_private; -static int print_dwarf_exp_op (Stream &s, const DataExtractor& data, uint32_t* offset_ptr, int address_size, int dwarf_ref_size); +static int print_dwarf_exp_op (Stream &s, const DataExtractor& data, lldb::offset_t *offset_ptr, int address_size, int dwarf_ref_size); int print_dwarf_expression (Stream &s, @@ -25,7 +25,7 @@ print_dwarf_expression (Stream &s, bool location_expression) { int op_count = 0; - uint32_t offset = 0; + lldb::offset_t offset = 0; while (data.ValidOffset(offset)) { if (location_expression && op_count > 0) @@ -48,7 +48,7 @@ print_dwarf_expression (Stream &s, static int print_dwarf_exp_op (Stream &s, const DataExtractor& data, - uint32_t* offset_ptr, + lldb::offset_t *offset_ptr, int address_size, int dwarf_ref_size) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp index ff65d08e5fc..dad5691267d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp @@ -18,7 +18,7 @@ using namespace lldb_private; dw_offset_t -DWARFLocationList::Dump(Stream &s, const DWARFCompileUnit* cu, const DataExtractor& debug_loc_data, dw_offset_t offset) +DWARFLocationList::Dump(Stream &s, const DWARFCompileUnit* cu, const DataExtractor& debug_loc_data, lldb::offset_t offset) { uint64_t start_addr, end_addr; uint32_t addr_size = DWARFCompileUnit::GetAddressByteSize(cu); @@ -52,7 +52,7 @@ DWARFLocationList::Dump(Stream &s, const DWARFCompileUnit* cu, const DataExtract } bool -DWARFLocationList::Extract(const DataExtractor& debug_loc_data, dw_offset_t* offset_ptr, DataExtractor& location_list_data) +DWARFLocationList::Extract(const DataExtractor& debug_loc_data, lldb::offset_t* offset_ptr, DataExtractor& location_list_data) { // Initialize with no data just in case we don't find anything location_list_data.Clear(); @@ -69,7 +69,7 @@ DWARFLocationList::Extract(const DataExtractor& debug_loc_data, dw_offset_t* off } size_t -DWARFLocationList::Size(const DataExtractor& debug_loc_data, dw_offset_t offset) +DWARFLocationList::Size(const DataExtractor& debug_loc_data, lldb::offset_t offset) { const dw_offset_t debug_loc_offset = offset; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h index a0163c0c3d3..85e11d90b36 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h @@ -19,16 +19,16 @@ public: Dump (lldb_private::Stream &s, const DWARFCompileUnit* cu, const lldb_private::DataExtractor& debug_loc_data, - dw_offset_t offset); + lldb::offset_t offset); static bool Extract (const lldb_private::DataExtractor& debug_loc_data, - dw_offset_t* offset_ptr, + lldb::offset_t* offset_ptr, lldb_private::DataExtractor& location_list_data); static size_t Size (const lldb_private::DataExtractor& debug_loc_data, - dw_offset_t offset); + lldb::offset_t offset); }; #endif // SymbolFileDWARF_DWARFLocationList_h_ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h index 3aa1c13e289..8ed2e50dcfc 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h @@ -306,8 +306,9 @@ struct DWARFMappedHash // void // Dump (std::ostream* ostrm_ptr); - uint32_t - Read (const lldb_private::DataExtractor &data, uint32_t offset) + lldb::offset_t + Read (const lldb_private::DataExtractor &data, + lldb::offset_t offset) { ClearAtoms (); @@ -379,8 +380,8 @@ struct DWARFMappedHash // virtual void // Dump (std::ostream* ostrm_ptr); // - virtual uint32_t - Read (lldb_private::DataExtractor &data, uint32_t offset) + virtual lldb::offset_t + Read (lldb_private::DataExtractor &data, lldb::offset_t offset) { offset = MappedHash::Header<Prologue>::Read (data, offset); if (offset != UINT32_MAX) @@ -392,7 +393,7 @@ struct DWARFMappedHash bool Read (const lldb_private::DataExtractor &data, - uint32_t *offset_ptr, + lldb::offset_t *offset_ptr, DIEInfo &hash_data) const { const size_t num_atoms = header_data.atoms.size(); @@ -409,14 +410,14 @@ struct DWARFMappedHash switch (header_data.atoms[i].type) { case eAtomTypeDIEOffset: // DIE offset, check form for encoding - hash_data.offset = form_value.Reference (header_data.die_base_offset); + hash_data.offset = (dw_offset_t)form_value.Reference (header_data.die_base_offset); break; case eAtomTypeTag: // DW_TAG value for the DIE - hash_data.tag = form_value.Unsigned (); + hash_data.tag = (dw_tag_t)form_value.Unsigned (); case eAtomTypeTypeFlags: // Flags from enum TypeFlags - hash_data.type_flags = form_value.Unsigned (); + hash_data.type_flags = (uint32_t)form_value.Unsigned (); break; default: return false; @@ -559,7 +560,7 @@ struct DWARFMappedHash virtual Result GetHashDataForName (const char *name, - uint32_t* hash_data_offset_ptr, + lldb::offset_t* hash_data_offset_ptr, Pair &pair) const { pair.key = m_data.GetU32 (hash_data_offset_ptr); @@ -580,7 +581,7 @@ struct DWARFMappedHash } const uint32_t count = m_data.GetU32 (hash_data_offset_ptr); - const uint32_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize(); + const size_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize(); if (count > 0 && m_data.ValidOffsetForDataOfSize (*hash_data_offset_ptr, min_total_hash_data_size)) { // We have at least one HashData entry, and we have enough @@ -637,7 +638,7 @@ struct DWARFMappedHash virtual Result AppendHashDataForRegularExpression (const lldb_private::RegularExpression& regex, - uint32_t* hash_data_offset_ptr, + lldb::offset_t* hash_data_offset_ptr, Pair &pair) const { pair.key = m_data.GetU32 (hash_data_offset_ptr); @@ -653,7 +654,7 @@ struct DWARFMappedHash return eResultError; const uint32_t count = m_data.GetU32 (hash_data_offset_ptr); - const uint32_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize(); + const size_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize(); if (count > 0 && m_data.ValidOffsetForDataOfSize (*hash_data_offset_ptr, min_total_hash_data_size)) { const bool match = regex.Execute(strp_cstr); @@ -712,10 +713,10 @@ struct DWARFMappedHash Pair pair; for (uint32_t offset_idx=0; offset_idx<hash_count; ++offset_idx) { - uint32_t hash_data_offset = GetHashDataOffset (offset_idx); + lldb::offset_t hash_data_offset = GetHashDataOffset (offset_idx); while (hash_data_offset != UINT32_MAX) { - const uint32_t prev_hash_data_offset = hash_data_offset; + const lldb::offset_t prev_hash_data_offset = hash_data_offset; Result hash_result = AppendHashDataForRegularExpression (regex, &hash_data_offset, pair); if (prev_hash_data_offset == hash_data_offset) break; @@ -749,7 +750,7 @@ struct DWARFMappedHash for (uint32_t offset_idx=0; offset_idx<hash_count; ++offset_idx) { bool done = false; - uint32_t hash_data_offset = GetHashDataOffset (offset_idx); + lldb::offset_t hash_data_offset = GetHashDataOffset (offset_idx); while (!done && hash_data_offset != UINT32_MAX) { KeyType key = m_data.GetU32 (&hash_data_offset); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 6858659f426..32a98cc185b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -1206,7 +1206,7 @@ SymbolFileDWARF::ParseCompileUnitLineTable (const SymbolContext &sc) SectionSP(), llvm::OwningPtr<LineSequence>() }; - uint32_t offset = cu_line_offset; + lldb::offset_t offset = cu_line_offset; DWARFDebugLine::ParseStatementTable(get_debug_line_data(), &offset, ParseDWARFLineTableCallback, &info); sc.comp_unit->SetLineTable(line_table_ap.release()); return true; @@ -6858,8 +6858,8 @@ SymbolFileDWARF::ParseVariablesForContext (const SymbolContext& sc) { const DWARFDebugInfoEntry *function_die = dwarf_cu->GetDIEPtr(sc.function->GetID()); - dw_addr_t func_lo_pc = function_die->GetAttributeValueAsUnsigned (this, dwarf_cu, DW_AT_low_pc, DW_INVALID_ADDRESS); - if (func_lo_pc != DW_INVALID_ADDRESS) + dw_addr_t func_lo_pc = function_die->GetAttributeValueAsUnsigned (this, dwarf_cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS); + if (func_lo_pc != LLDB_INVALID_ADDRESS) { const size_t num_variables = ParseVariables(sc, dwarf_cu, func_lo_pc, function_die->GetFirstChild(), true, true); |