This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [vta->trunk] VTA merge


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]