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

George Rimar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 9 01:26:05 PDT 2018

grimar added inline comments.

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);
clayborg wrote:
> 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. 
Thanks! I was wondering if I can use some kind of an assert here. Because I noticed that usually lldb just return `false`
when is unable to parse some debug section (like a case of unknown form or attribute) or tries to skip the unknown constructions.
Having an assert definitely can simplify the further support here.


More information about the lldb-commits mailing list