[Lldb-commits] [PATCH] D53140: [LLDB] - Add support for DW_RLE_base_address and DW_RLE_offset_pair entries (.debug_rnglists)

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 11 09:02:06 PDT 2018

clayborg added a comment.

See inlined comments.

Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp:150-151
+    case DW_RLE_base_address: {
+      dw_addr_t base = data.GetMaxU64(offset_ptr, addrSize);
+      rangeList.push_back({DW_RLE_base_address, base, 0});
+      break;
Might be nice to not push a base address entry and store the base address locally and fixup any DW_RLE_offset_pair entries on the fly?

Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h:51-55
+  struct RngListEntry {
+    uint8_t encoding;
+    uint64_t value0;
+    uint64_t value1;
+  };
Do we really need to store all this? Can't we just convert to address ranges on the fly in DWARFDebugRngLists::Extract? With the current DW_RLE_base_address and DW_RLE_offset_pair stuff we can store the base address locally inside the DWARFDebugRngLists::Extract function and skip pushing an entry for it and then convert any DW_RLE_offset_pair stuff into addresses by adding the base address before pushing the range. Or will this be required to support other opcodes?


More information about the lldb-commits mailing list