Message ID | BANLkTi==QDuvBzsqMkWpeafSrds=QZ1xBA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, May 11, 2011 at 12:28:18PM -0700, H.J. Lu wrote: > This patch restores the old behavior for Pmode. OK for trunk if there > are no regressions? That is IMHO wrong, ignoring subregs is a very bad idea. While you can workaround generation of the DW_OP_GNU_convert that way (why do you want that?, just install newer gdb that has typed dwarf stack support, coming hopefully soon), you'd get incorrect debug info for long long to int casts. Jakub
On Thu, May 12, 2011 at 7:56 AM, Jakub Jelinek <jakub@redhat.com> wrote: > On Wed, May 11, 2011 at 12:28:18PM -0700, H.J. Lu wrote: >> This patch restores the old behavior for Pmode. OK for trunk if there >> are no regressions? > > That is IMHO wrong, ignoring subregs is a very bad idea. > While you can workaround generation of the DW_OP_GNU_convert that way > (why do you want that?, just install newer gdb that has typed dwarf stack > support, coming hopefully soon), you'd get incorrect debug info for > long long to int casts. > I will wait for the new gdb. Thanks.
>>>>> "H.J." == H J Lu <hjl.tools@gmail.com> writes: H.J.> On Thu, May 12, 2011 at 7:56 AM, Jakub Jelinek <jakub@redhat.com> wrote: >> On Wed, May 11, 2011 at 12:28:18PM -0700, H.J. Lu wrote: >>> This patch restores the old behavior for Pmode. OK for trunk if there >>> are no regressions? >> >> That is IMHO wrong, ignoring subregs is a very bad idea. >> While you can workaround generation of the DW_OP_GNU_convert that way >> (why do you want that?, just install newer gdb that has typed dwarf stack >> support, coming hopefully soon), you'd get incorrect debug info for >> long long to int casts. >> H.J.> I will wait for the new gdb. I'm going to commit the changes today. Tom
2011-05-11 H.J. Lu <hongjiu.lu@intel.com> PR debug/48853 * dwarf2out.c (loc_descriptor) <case SUBREG>: If POINTERS_EXTEND_UNSIGNED is defined, don't give up if mode of SUBREG is Pmode. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b85a55e..03d12de 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -15024,7 +15024,12 @@ loc_descriptor (rtx rtl, enum machine_mode mode, up an entire register. For now, just assume that it is legitimate to make the Dwarf info refer to the whole register which contains the given subreg. */ - if (REG_P (SUBREG_REG (rtl)) && subreg_lowpart_p (rtl)) + if ((REG_P (SUBREG_REG (rtl)) +#ifdef POINTERS_EXTEND_UNSIGNED + || GET_MODE (SUBREG_REG (rtl)) == Pmode +#endif + ) + && subreg_lowpart_p (rtl)) loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized); else goto do_default;