[RFC][debug] Add -greadable-dwarf

2018-08-15 Thread Tom de Vries
Hi, This patch adds option -greadable-dwarf. In absence of an DW_AT_comment attribute, it sets the DW_AT_name attribute of dies that otherwise do not get that attribute, to make it easier to figure out what the die is describing. The option exports the names of artificial variables: ... DIE

Re: [RFC][debug] Add -greadable-dwarf

2018-08-20 Thread Richard Biener
On Wed, 15 Aug 2018, Tom de Vries wrote: > Hi, > > This patch adds option -greadable-dwarf. In absence of an DW_AT_comment > attribute, What's a DW_AT_comment attribute? I don't see this mentioned in the patch. > it sets the DW_AT_name attribute of dies that otherwise do not get > that attrib

Re: [RFC][debug] Add -greadable-dwarf

2018-08-21 Thread Jason Merrill
How about adding this name to a -dA comment instead of the actual dwarf? On Tue, Aug 21, 2018, 12:59 AM Richard Biener wrote: > On Wed, 15 Aug 2018, Tom de Vries wrote: > > > Hi, > > > > This patch adds option -greadable-dwarf. In absence of an DW_AT_comment > > attribute, > > What's a DW_AT_co

Re: [RFC][debug] Add -greadable-dwarf

2018-08-21 Thread Richard Biener
On Tue, 21 Aug 2018, Jason Merrill wrote: > How about adding this name to a -dA comment instead of the actual dwarf? That would also work but it requires either sticking that name somewhere in die_struct or keep a reference to the decl we created a DIE for in the same struct. Though we already h

Re: [RFC][debug] Add -greadable-dwarf

2018-08-21 Thread Tom de Vries
On 08/20/2018 02:59 PM, Richard Biener wrote: > On Wed, 15 Aug 2018, Tom de Vries wrote: > >> Hi, >> >> This patch adds option -greadable-dwarf. In absence of an DW_AT_comment >> attribute, > > What's a DW_AT_comment attribute? I don't see this mentioned in the > patch. > It's a hypothetical

Re: [RFC][debug] Add -greadable-dwarf

2018-08-21 Thread Tom de Vries
Hi, That solution is limited: it does not show the extra information in the dump from an executable (which is the only way to see how things look like post-linking). Is your concern leaking compiler internals into the dwarf info? Thanks, - Tom On 08/21/2018 06:53 AM, Jason Merrill wrote: > How