[PATCH] D54497: [ELF] --gdb-index: extract entities from .debug_info when .debug_gnu_pubnames is absent

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 16:46:51 PST 2018


dblaikie added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:2439
+    extractSymbol(Child, Idx, Ret);
+    Child = Child.getSibling();
+  }
----------------
echristo wrote:
> From a quick look: what if DW_AT_sibling isn't there? Does this still work?
Yeah, not a problem, this isn't powered by DW_AT_sibling (see https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARF/DWARFUnit.cpp#L695 ). Probably be nice if we changed this sibling based iteration to iterator-based iteration to avoid confusion like this & separate out DIE navigation from DIEs themselves.

Oh, right, we do have such an API & should probably use that here instead:

  for (const DWARFDie &Child : D.children())
    extractSymbol(Child, Idx, Ret); 


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D54497





More information about the llvm-commits mailing list