[PATCH] D44760: Make the debug info in some tests more realistic

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 10:11:29 PDT 2018


espindola added a comment.

In https://reviews.llvm.org/D44760#1045735, @probinson wrote:

> In https://reviews.llvm.org/D44760#1045386, @grimar wrote:
>
> > This LGTM. I always wondered if we do really need to support the case when there is
> >  no .debug_info section and how much this is real.
>
>
> Well, technically you could have a .o file that has had all debug info except .debug_line stripped from it.  This is a minimalist use-case that still supports source-location based breakpoints, and identifying functions according to their ELF symbols.  It differs from a line-tables-only scenario because the latter still has a minimal .debug_info section to provide information about inlined functions.
>
> I don't know whether it's common to strip the .o files before linking, or more common to strip the final executables after linking.


For what it is worth, ld.bfd doesn't print source names in these testcases without this patch, so it is probably common to have at least a minimal .debug_info.


https://reviews.llvm.org/D44760





More information about the llvm-commits mailing list