[Lldb-commits] [PATCH] D52981: [LLDB] - Add basic support for .debug_rnglists section (DWARF5)

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 8 09:30:45 PDT 2018

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Just add a switch statement when handling the encodings and a lldbassert as mentioned in inlined comments and this will be good to go.

Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp:134-144
+    uint8_t encoding = data.GetU8(offset_ptr);
+    if (encoding == DW_RLE_end_of_list)
+      return true;
+    if (encoding == DW_RLE_start_length) {
+      dw_addr_t begin = data.GetMaxU64(offset_ptr, addrSize);
Use a switch statement here? We also want to use a lldbassert for any non supported encodings (in the default case of the switch statement) so we know if/when a compiler starts emitting an encoding we don't yet support when running the test suite with assertions enabled. That will let us know why things are failing. 


More information about the lldb-commits mailing list