Hi!

On Wed, Aug 10, 2016 at 12:23:06PM +0200, Richard Biener wrote:
> > Introducing another attribute that does the same thing as existing attribute
> > would be way too ugly.  In theory the reference class could be added to
> > DW_AT_string_length, I can ask on DWARF workgroup (but it might be too late
> > for DWARF 5), but that still doesn't solve the issue of the indirect params.
> >
> > How do you want to handle the debug info without ammending the 
> > early-generated
> > DWARF though?  Just by using it as abstract origins of everything and
> > ammending in copies?
> 
> Yes.

I've filed an enhancement request and got one positive feedback, but it is
going to be multiple months at best.
So, at least for non-LTO I'd strongly prefer to go with what the current
patch does, and for LTO we'd then have to ask GDB to implement the reference
class for DW_AT_string_length and then just use that instead, depending on
flag_lto or similar, or perhaps for dwarf4 and earlier don't emit for LTO
variable string length and keep it only for dwarf5+ (if the change is
approved).  For the indirect parms and LTO, I guess we'd need to create some
artificial VAR_DECL at function scope with DECL_VALUE_EXPR of *parm,
DECL_ARTIFICIAL, DECL_NAMELESS and reference that instead of the parm
itself.
With this, do you object to the current patch?

        Jakub

Reply via email to