--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 8 Feb 2018, derodat at adacore dot com wrote:

> Pierre-Marie de Rodat <derodat at adacore dot com> changed:
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |derodat at adacore dot com
> --- Comment #7 from Pierre-Marie de Rodat <derodat at adacore dot com> ---
> Hello,
> (In reply to Richard Biener from comment #6)
> > I'm quite sure the rev. is responsible for similar Ada -flto -g failures. 
> > We simply may _not_ add location attributes early.
> I did not have a deep look at this, so I’m asking: is it possible to add it
> late, then?
> > So I think we need to revert this patch and instead make sure those
> > Ada variables do not get removed?  Like by marking them with
> > 
> > Trying that (figuring where those decls are created).  Pierre-Marie,
> > maybe you can help here as well.
> IIRC, what my r248792 is about is not to preserve the DW_TAG_varible itself 
> (it
> was already present in the DWARF output before), but to make sure we have a
> location for it: if we have a DW_TAG_variable entry without a DW_AT_location
> attribute, GDB will consider that the variable does not exist and thus we’ll
> loose debuggability in Ada.

Yeah, setting DECL_PRESERVE_P would make it possible to add the
location late since we'd not remove the decl.  Currently it's simply
gone and the early dwarf2out_"late"_global_decl is the last thing
we see from it...

Currently struggling in getting a debuggable gnat1 built .. it looks
like ./configure --enable-languages=c++,ada --disable-bootstrap
no longer works with a host compiler that doesn't understand some
C++ specs that appear to be used (GCC 4.8).

Reply via email to