================ @@ -259,22 +256,19 @@ bool DWARFDebugInfoEntry::GetDIENamesAndRanges( } } - if (ranges.IsEmpty()) { - if (lo_pc != LLDB_INVALID_ADDRESS) { - if (hi_pc != LLDB_INVALID_ADDRESS && hi_pc > lo_pc) - ranges.Append(DWARFRangeList::Entry(lo_pc, hi_pc - lo_pc)); - else - ranges.Append(DWARFRangeList::Entry(lo_pc, 0)); - } + if (ranges.empty() && lo_pc != LLDB_INVALID_ADDRESS) { + ranges.emplace_back( + lo_pc, (hi_pc != LLDB_INVALID_ADDRESS && hi_pc > lo_pc) ? hi_pc : 0); ---------------- labath wrote:
Good catch. The new format is now (low pc, high pc), so the second case should be low_pc instead of zero. I don't remember ever seeing a lone low_pc attribute, so this might not matter in practice. https://github.com/llvm/llvm-project/pull/116620 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits