[PATCH] D82975: [DebugInfo] Allow GNU macro extension to be emitted
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 14:48:01 PDT 2020
probinson added a comment.
In D82975#2134132 <https://reviews.llvm.org/D82975#2134132>, @dblaikie wrote:
> In D82975#2128353 <https://reviews.llvm.org/D82975#2128353>, @dstenb wrote:
>
> > In D82975#2127201 <https://reviews.llvm.org/D82975#2127201>, @SouraVX wrote:
> >
> > > I think if it's about compatibility(analogous behavior with GCC), existing infra is Okay/Fine(Since same encodings are used). We just need to emit the `.debug_macro` section with `version` 4 and teach the `llvm-dwarfdump` to parse it correctly.
> >
> >
> > One difference though is that the GNU extension does not have anything like the strx entries that LLVM currently emits: https://github.com/gcc-mirror/gcc/blob/master/include/dwarf2.h#L425, so I assume we still need code to emit the strp entries when targeting DWARF 4?
>
>
> Likely - but might want to check what GCC does - maybe it uses some kind of strx encoding that's not documented, etc.
My recollection is that .debug_macro was invented independently of the strx forms so the prototype probably wouldn't have used them. Easy enough to check whether GCC's `-fdebug-macro` with v4 is emitting a .debug_str_offsets section.
LLVM wouldn't be using strx forms from .debug_info for v4, and would have no other reason to emit .debug_str_offsets, so I wouldn't want LLVM to use them in a v4 compatibility mode .debug_macro section either.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82975/new/
https://reviews.llvm.org/D82975
More information about the llvm-commits
mailing list