[Lldb-commits] [PATCH] D154505: [lldb][NFC] Remove code duplication in InitOSO

Felipe de Azevedo Piovezan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 5 10:23:15 PDT 2023


fdeazeve added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp:347-348
+      uint32_t sibling_idx = so_symbol->GetSiblingIndex();
+      // The sibling index can't be less that or equal to the current index
+      // "i"
+      if (sibling_idx == UINT32_MAX) {
----------------
bulbazord wrote:
> Besides the typo, is this comment correct? We're not verifying the claim in the comment AFAICT.
I think this is one of those situations where "if this is not true, the linker did not do its job".
That said, we should not crash, so I will change the condition to: `sibling_idx <= i || sibling_idx == UINT32_MAX`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154505



More information about the lldb-commits mailing list