This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta->trunk] VTA merge
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jack Howarth <howarth at bromo dot med dot uc dot edu>, Steven Bosscher <stevenb dot gcc at gmail dot com>, Richard Guenther <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 16 Sep 2009 17:47:55 +0200
- Subject: Re: [vta->trunk] VTA merge
- References: <orskfb6zb2.fsf@huru.localdomain> <84fc9c000908300345s473a12f5u1b25ba054ca5f9a1@mail.gmail.com> <m3tyzp483d.fsf@fleche.redhat.com> <20090830155630.GA31476@bromo.med.uc.edu> <571f6b510908300940ncaebad1q43b157a387e01e30@mail.gmail.com> <20090830175027.GA1966@bromo.med.uc.edu> <Pine.LNX.4.64.0908301753480.6056@digraph.polyomino.org.uk> <oreiqq4b7e.fsf@huru.localdomain> <m3my5dme9h.fsf@fleche.redhat.com> <orljkwxzxj.fsf@huru.localdomain>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Sep 03, 2009 at 04:14:32AM -0300, Alexandre Oliva wrote:
> On Sep 2, 2009, Tom Tromey <tromey@redhat.com> wrote:
>
> > FWIW I changed my mind on this topic. I was swayed by your argument
> > about compatibility: the alternative to emitting DW_OP_*_value seems to
> > be to emit nothing. Either way an older debugger is just not going to
> > be able to print the value.
>
> I think the important question is whether older debuggers would be able
> to deal gracefully with these location entries or constant values. I
> understand they're supposed to, and I have no evidence that GDB isn't,
> so I offer this patch to revert the last-minute addition of tests for
> dwarf_version >= 4 in the VTA merge patch.
>
> Should I check it in so that we can get a better idea of what, if
> anything, breaks?
> for gcc/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
>
> * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
> DW_OP_implicit_value even without dwarf_version 4.
Could somebody please review this?
I believe we should emit them by default, if the debugger doesn't understand
them, it will just not be able to find out what value particular variable
has, but without the ops it won't be able to do so either.
Currently, limiting it to dwarf_version >= 4 has 2 problems:
1) it is not used by default, so far fewer people will benefit
2) -gdwarf-4 has other side effects, e.g. changing headers of .debug_info
and other sections, which is IMHO ATM undesirable for dwarf4, because
while DW_OP_{stack,implicit}_value can be considered stable at this
point, the whole standard is still in development and we don't know yet
what all version 4 in .debug_info etc. will imply.
Jakub