[PATCH] D82975: [DebugInfo] Allow GNU macro extension to be emitted

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 11:35:26 PDT 2020


dstenb added a comment.

In D82975#2139704 <https://reviews.llvm.org/D82975#2139704>, @dblaikie wrote:

> > (Sorry, I don't have a GCC trunk build readily available, so I used GCC 9.3.0 here.)
> > 
> > When using those flags, GCC seems to emit DW_MACRO_define_strp (DW_MACRO_GNU_define_indirect) entries, but with indexed strings as operands. Neither binutils nor GDB does consider that such entries may hold indexed strings, and just treats those operands as indirect strings, which is why they are not properly handled. "Overloading" those indirect operands with indexed strings seems very weird to me. Perhaps that is just a bug in GCC, rather than a limitation in the consumers?
>
> Perhaps - though there was some thought put into supporting GNU debug_macro in v4/pre-standard Fission, given the DWP format had columns for both debug_macro and debug_macinfo ( https://gcc.gnu.org/wiki/DebugFissionDWP ). Don't think it's a big deal either way - if someone comes along wanting to add debug_macro support for pre-standard Fission, we can discuss what that format looks like at that point - happy enough for it to be unimplemented (& as I said before, have "-ggdb -gdwarf-4 -fdebug-macro -> debug_macro" and "-ggdb -gdwarf-4 -fdebug-macro -gsplit-dwarf -> debug_macinfo.dwo").


I'll leave the DWO parts out of this patch then, and later if we get to that, emitting macinfo in the `ggdb -gdwarf-4 -fdebug-macro -gsplit-dwarf` case seems reasonable to me.


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

https://reviews.llvm.org/D82975





More information about the llvm-commits mailing list