[llvm-dev] [EXTERNAL] Re: Potential DWARF debug info bug: DW_TAG_label DIE has a DW_AT_prototyped attribute (original) (raw)

Snider, Todd via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 21 10:05:23 PST 2019


Thanks for the quick response. I will update the MachO test (gen-dwarf.s) to exclude the DW_AT_prototyped attribute when I submit the change request for upstreaming.

~ Todd

From: David Blaikie [mailto:dblaikie at gmail.com] Sent: Sunday, January 20, 2019 4:04 PM To: paul.robinson at sony.com Cc: aprantl at apple.com; Snider, Todd; llvm-dev at lists.llvm.org Subject: [EXTERNAL] Re: [llvm-dev] Potential DWARF debug info bug: DW_TAG_label DIE has a DW_AT_prototyped attribute

Looks like it might've been an artifact of assembly label support initially being implemented as DW_TAG_subprograms (in r146262) & then being changed to use DW_TAG_label (in r147860). Yeah, don't much see the benefit in it off-hand at least.

On Fri, Jan 18, 2019 at 2:35 PM via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:

-----Original Message----- From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces at lists.llvm.org>] On Behalf Of Adrian Prantl via llvm-dev Sent: Friday, January 18, 2019 5:20 PM To: Snider, Todd Cc: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Potential DWARF debug info bug: DWTAGlabel DIE has a DWATprototyped attribute

> On Jan 18, 2019, at 1:06 PM, Snider, Todd via llvm-dev <llvm-_ _dev at lists.llvm.org<mailto:dev at lists.llvm.org>> wrote: > > > In llvm/lib/MC/MCDwarf.cpp’s EmitGenDwarfAbbrev(), the DWARF abbreviation declaration for a DWTAGlabel includes a DWATprototyped attribute, but the DWARF 4 specification indicates that the DWATprototyped attribute is not a valid attribute for the DWTAGlabel debug information entry (DIE). In this case, EmitGenDwarfAbbrev() is clearly in violation of the DWARF 4 specification.

DWARF is a "permissive" standard which means it's not illegal to do this, so it might be instructive to look at the change history to see if the commit(s) that introduced it have any explanation.

Offhand, though, I agree it appears to be a complete waste of space and worth taking out. --paulr

> > However, I notice that one of the MachO lit tests is expecting the DWTAGlabel DIE to contain a DWATprototyped attribute whose value is false (llvm/test/MC/MachO/gen-dwarf.s). > > Does the DWATprototyped attribute sever any purpose or provide any value in the context of a DWTAGlabel DIE? > > If not, I propose to remove the call to EmitAbbrev() on behalf of the DWATprototyped attribute for a DWTAGlabel in EmitGenDwarfAbbrev().

I don't think that any Mach-O DWARF consumer depends on the presence of DWTAGprototyped inside of a DWTAGlabel. The only occurrence of DWTAGprototyped inside of LLDB for example is in a switch statement of attributes that are ignored... Feel free to add me (and the "debug-info" group) as a reviewer for the patch in phabricator. thanks, adrian


LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190121/f122aa80/attachment-0001.html>



More information about the llvm-dev mailing list