[Lldb-commits] [lldb] [lldb/DWARF] s/DWARFRangeList/llvm::DWARFAddressRangeVector (PR #116620)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 19 22:49:55 PST 2024


================
@@ -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


More information about the lldb-commits mailing list