[Lldb-commits] [PATCH] D99401: Fix .debug_aranges parsing issues introduced with llvm error handling in LLDB

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 26 11:04:45 PDT 2021


clayborg added a comment.

In D99401#2653285 <https://reviews.llvm.org/D99401#2653285>, @dblaikie wrote:

> (generally makes sense to me - but I'll leave it to some more lldb-focussed reviewers to do more review/approval)
>
> Usual caveat/question: Does this take us closer or further away from unifying this code with LLVM's libDebugInfoDWARF? (or neutral)

It is neutral right now, maintains the current separation.



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp:56
+  if (m_header.length > 0)
+    m_next_offset = m_offset + *offset_ptr - m_offset + m_header.length;
+  else
----------------
dblaikie wrote:
> This maths seems strange - the `m_offset ... - m_offset` cancel each other out, right?
Math is good. We are adding the number of bytes that were used to encode the length (4 or 12) by saying:
```
m_offset + <length of length encoding> + m_header.length
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99401



More information about the lldb-commits mailing list