This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta->trunk] VTA merge
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: "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: Thu, 03 Sep 2009 04:14:32 -0300
- 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>
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.
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c.orig 2009-09-03 04:09:03.000000000 -0300
+++ gcc/dwarf2out.c 2009-09-03 04:09:21.000000000 -0300
@@ -11744,7 +11744,7 @@ loc_descriptor (rtx rtl, enum machine_mo
break;
case CONST_INT:
- if (mode != VOIDmode && mode != BLKmode && dwarf_version >= 4)
+ if (mode != VOIDmode && mode != BLKmode)
{
HOST_WIDE_INT i = INTVAL (rtl);
int litsize;
@@ -11798,7 +11798,7 @@ loc_descriptor (rtx rtl, enum machine_mo
break;
case CONST_DOUBLE:
- if (mode != VOIDmode && dwarf_version >= 4)
+ if (mode != VOIDmode)
{
/* Note that a CONST_DOUBLE rtx could represent either an integer
or a floating-point constant. A CONST_DOUBLE is used whenever
@@ -11829,7 +11829,7 @@ loc_descriptor (rtx rtl, enum machine_mo
break;
case CONST_VECTOR:
- if (mode != VOIDmode && dwarf_version >= 4)
+ if (mode != VOIDmode)
{
unsigned int elt_size = GET_MODE_UNIT_SIZE (GET_MODE (rtl));
unsigned int length = CONST_VECTOR_NUNITS (rtl);
@@ -11917,8 +11917,7 @@ loc_descriptor (rtx rtl, enum machine_mo
&& SYMBOL_REF_TLS_MODEL (rtl) != TLS_MODEL_NONE)
break;
case LABEL_REF:
- if (mode != VOIDmode && GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE
- && dwarf_version >= 4)
+ if (mode != VOIDmode && GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE)
{
loc_result = new_loc_descr (DW_OP_implicit_value,
DWARF2_ADDR_SIZE, 0);
@@ -11930,8 +11929,7 @@ loc_descriptor (rtx rtl, enum machine_mo
default:
if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode
- && GET_MODE_SIZE (GET_MODE (rtl)) <= DWARF2_ADDR_SIZE
- && dwarf_version >= 4)
+ && GET_MODE_SIZE (GET_MODE (rtl)) <= DWARF2_ADDR_SIZE)
{
/* Value expression. */
loc_result = mem_loc_descriptor (rtl, VOIDmode, initialized);
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer