[Lldb-commits] [PATCH] D106466: [llvm+lldb] 2/2: Fix#2 of DW_AT_ranges DW_FORM_sec_offset not using DW_AT_rnglists_base (used by GCC)

Igor Kudrin via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 3 08:26:35 PDT 2021


ikudrin added a comment.

As far as I understand it, you need a specially constructed `llvm::DWARFDebugRnglistTable` object so that `DWARFUnit::FindRnglistFromOffset()` can call its `findList()` method and get a list of records located at a specific offset. It looks like a newly created `llvm::DWARFDebugRnglistTable` object has its `Header.Length` set to `0`, so it already works as required for the usage, and there is no need to fill its fields with artificial values that do not represent real content of the section. Am I right?



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp:54
+
+  Data.setAddressSize(HeaderData.AddrSize);
+  return Error::success();
----------------
The line looks suspicious because `Data` is a local variable that is destroyed right after the statement.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106466/new/

https://reviews.llvm.org/D106466



More information about the lldb-commits mailing list