public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: debug/2813: Type of variable is wrong in dwarf2 debugging info
@ 2001-05-14 14:46 Mark Kettenis
0 siblings, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2001-05-14 14:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR debug/2813; it has been noted by GNATS.
From: Mark Kettenis <kettenis@science.uva.nl>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: debug/2813: Type of variable is wrong in dwarf2 debugging info
Date: Mon, 14 May 2001 23:19:33 +0200
>Description:
Compiling the attached test with -gdwarf-2 -dA, we find DW_AT_type
of variable lave points at the DW_TAG_const_type die constructed
for the argument cc, instead of pointing directly to the
DW_TAG_base_type that represents type char.
This is a regression from GCC 2.95.2.
This patch is the culprit:
2001-04-11 Mark Mitchell <mark@codesourcery.com>
* dwarf2out.c (modified_type_die): Don't create new types here.
* tree.h (get_qualified_type): New function.
(build_qualified_type): Adjust comment.
* tree.c (get_qualified_type): New function.
(build_qualified_type): Use it.
Basically, what's happening is that when creating a DIE for a
qualified type, the code attaches the newly created DIE to the
origional unqualified type:
equate_type_number_to_die (type, mod_type_die);
Thereafter the DIE for the qualified type will be used whenever an
unqualified type is seen.
I'm not sure how to solve this elegantly. Adding
if (qualified_type)
type = qualified_type
at the end of the
if (code != ERROR_MARK)
{
block should do the trick, but perhaps a more experienced GCC hacker
can come up with a better idea.
Hope this helps,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: debug/2813: Type of variable is wrong in dwarf2 debugging info
@ 2001-05-17 15:46 Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2001-05-17 15:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR debug/2813; it has been noted by GNATS.
From: Alexandre Oliva <aoliva@redhat.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: kettenis@wins.uva.nl, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
gcc-patches@gcc.gnu.org
Subject: Re: debug/2813: Type of variable is wrong in dwarf2 debugging info
Date: 17 May 2001 19:43:58 -0300
On May 16, 2001, Mark Mitchell <mark@codesourcery.com> wrote:
> Needs a comment. Other than that, it's fine.
Is /* We want to equate the qualified type to the die below. */ enough?
That's what I've just checked in.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: debug/2813: Type of variable is wrong in dwarf2 debugging info
@ 2001-05-15 23:56 Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2001-05-15 23:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR debug/2813; it has been noted by GNATS.
From: Alexandre Oliva <aoliva@redhat.com>
To: Mark Kettenis <kettenis@wins.uva.nl>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, mark@codesourcery.com
Subject: Re: debug/2813: Type of variable is wrong in dwarf2 debugging info
Date: 16 May 2001 03:49:42 -0300
--=-=-=
Mark Mitchell agreed this seemed like the right fix go, so I went
ahead and prepared this patch (that I took the liberty to attribute to
you; I hope you don't mind :-), that I'm bootstrapping as I write
this. It does indeed fix this particular bug report.
Ok to install in branch and mainline if bootstrap succeeds?
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=dwarf2out-qualtype.patch
Index: gcc/ChangeLog
from Mark Kettenis <kettenis@wins.uva.nl>
* dwarf2out.c (modified_type_die): Equate qualified type to die.
Index: gcc/dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.266
diff -u -p -r1.266 dwarf2out.c
--- gcc/dwarf2out.c 2001/05/12 06:03:19 1.266
+++ gcc/dwarf2out.c 2001/05/16 06:41:26
@@ -6922,6 +6922,9 @@ modified_type_die (type, is_const_type,
if (mod_type_die == NULL)
abort ();
}
+
+ if (qualified_type)
+ type = qualified_type;
}
equate_type_number_to_die (type, mod_type_die);
--=-=-=
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
--=-=-=--
^ permalink raw reply [flat|nested] 4+ messages in thread
* debug/2813: Type of variable is wrong in dwarf2 debugging info
@ 2001-05-13 23:26 aoliva
0 siblings, 0 replies; 4+ messages in thread
From: aoliva @ 2001-05-13 23:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 2813
>Category: debug
>Synopsis: Type of variable is wrong in dwarf2 debugging info
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 13 23:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: aoliva@redhat.com
>Release: GCC 3.0 20010507 and 3.1 20010513
>Organization:
>Environment:
alpha-unknown-linux-gnu and i686-pc-linux-gnu, native and x-mn10300-elf
>Description:
Compiling the attached test with -gdwarf-2 -dA, we find DW_AT_type of variable lave points at the DW_TAG_const_type die constructed for the argument cc, instead of pointing directly to the DW_TAG_base_type that represents type char.
This is a regression from GCC 2.95.2.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.c"
aW50CnF1eDEgKGNvbnN0IGNoYXIgY2MpCnsKICBjaGFyIGxhdmUgPSAnQic7Cn0K
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-05-17 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-14 14:46 debug/2813: Type of variable is wrong in dwarf2 debugging info Mark Kettenis
-- strict thread matches above, loose matches on Subject: below --
2001-05-17 15:46 Alexandre Oliva
2001-05-15 23:56 Alexandre Oliva
2001-05-13 23:26 aoliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).