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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 20:14:14 PST 2018


ruiu added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:2426
+// `breakpoint` and `print` commands on these symbols slow. Another quirk is
+// that gdb.lookup_global_symbol(symbol) will always return None even if the
+// symtab is loaded.
----------------
MaskRay wrote:
> ruiu wrote:
> > What is the consequence of the function always returning None?
> Our internal script may break weirdly. I may not sure if this information is useful and I am happy to remove it.
I'm not sure if this is a good thing to create a half-baked .gdb-index section for an incomplete input. Silently creating a .gdb-index that is not complete could be very confusing. I feel like if we do this, we should do this perfectly. Or we should report an warning and should refuse to create a .gdb-index section.

Can gold create a complete .gdb-index section from object files that don't have .debug_gnu_pubnames sections? What if both .debug_gnu_pubnames and .debug_gnu_pubtypes are absent? (I believe -ggnu-pubnames creates both sections, so it is hard to imagine that an object file contains only one of them though.)

If gold can still create .gdb-index sections from object files compiled without -ggnu-pubnames, then, what is the point of -ggnu-pubnames option?


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D54497





More information about the llvm-commits mailing list