[PATCH] D74169: [WIP][LLD][ELF][DebugInfo] Skeleton implementation of removing obsolete debug info.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 23 12:38:24 PST 2020


clayborg added a comment.

In D74169#1887799 <https://reviews.llvm.org/D74169#1887799>, @dblaikie wrote:

> In D74169#1887791 <https://reviews.llvm.org/D74169#1887791>, @clayborg wrote:
>
> > In D74169#1887764 <https://reviews.llvm.org/D74169#1887764>, @dblaikie wrote:
> >
> > > lld already supports gdb_index & there's plans to add debug_names support in the near future (~6 months).
> >
> >
> > Does it support adding the GDB index after the fact on an already linked binary, or just at normal link time? I want to add a GSYM option to LLD at some point too. Can replace -gline-tables-only in many cases.
>
>
> I don't think there's been any effort to add it as a post-processing step, no. I believe it can be built either from parsed DWARF or from debug_gnu_pubnames - in either case, at link time.


is debug_gnu_pubnames a new section that is now complete? The old .debug_pub* sections only contained globally visible things which means all debuggers would ignore this section. If accelerator tables were made from incomplete sources that will mean debuggers will have to question if .debug_names is complete or not.

> I mean, it'd be probably quite practical to extend it to be able to be done as a standalone/post-processing step.

That would be great. As accelerator tables evolve and get updated, it would be nice to have a path to update older accelerator tables to newer more complete versions.

> For the sake of object and linked executable size, I suspect we might end up trying to move the indexing out of the object files/linked executable - perhaps putting the names either in a third file, or in the .dwo files and generating an index from them instead of from the objects. Not sure. Some further experimentation expected there.

That is fine too. We make a dwarf linking tool that can link all of the .dwo files back into a normal DWARF file like with dsymutil and .o files on mac. That allows people to get the benefits of the .dwo performance improvements for the edit/compile /debug cycle and then link it into a minimal and optimized DWARF, using contribution from this patch and others to come that optimize the DWARF, for permanent storage on build servers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74169





More information about the llvm-commits mailing list