Skip to content

Commit c590f49

Browse files
committed
Fix lldb
1 parent 7532925 commit c590f49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void DWARFDebugAranges::extract(const DWARFDataExtractor &debug_aranges_data) {
4141
}
4242
const uint64_t cu_offset = set.getCompileUnitDIEOffset();
4343
for (const auto &desc : set.descriptors()) {
44-
if (desc.Length != 0)
44+
if (desc.Length != 0 && desc.Address > 0)
4545
m_aranges.Append(
4646
RangeToDIE::Entry(desc.Address, desc.Length, cu_offset));
4747
}
@@ -63,7 +63,7 @@ void DWARFDebugAranges::Dump(Log *log) const {
6363

6464
void DWARFDebugAranges::AppendRange(dw_offset_t offset, dw_addr_t low_pc,
6565
dw_addr_t high_pc) {
66-
if (high_pc > low_pc)
66+
if (high_pc > low_pc && low_pc > 0)
6767
m_aranges.Append(RangeToDIE::Entry(low_pc, high_pc - low_pc, offset));
6868
}
6969

0 commit comments

Comments
 (0)