public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read
@ 2003-08-26 14:30 mec at shout dot net
  2003-08-26 14:32 ` [Bug debug/12066] " mec at shout dot net
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: mec at shout dot net @ 2003-08-26 14:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066

           Summary: g++ generates stabs for "char *" that gdb cannot read
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mec at shout dot net
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

(See README.txt in the attachment for full info)

  g++ generates stabs for "char *" that gdb cannot read.

  The bad stabs are:
    .stabs  "__builtin_va_list:t(0,10)=*(0,11)=r(0,11);0;127;",128,0,0,0
    .stabs  "_Z17dm_type_char_starPc:F(0,13)=*(0,11)",36,0,2,_Z17dm_type_char_starPc

  The previous good stabs were:
    .stabs  "char:t(0,2)=r(0,2);0;127;",128,0,0,0
    .stabs  "__builtin_va_list:t(0,20)=*(0,2)",128,0,0,0
    .stabs  "_Z17dm_type_char_starPc:F(0,24)=*(0,2)",36,0,2,_Z17dm_type_char_starPc

  This happens because g++ no longer generates an explicit stabs
  record for "char", so the "char" gets defined with no name
  in the middle of its first use in __builtin_va_list.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
@ 2003-08-26 14:32 ` mec at shout dot net
  2003-08-26 15:34 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mec at shout dot net @ 2003-08-26 14:32 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066



------- Additional Comments From mec at shout dot net  2003-08-26 14:32 -------
Created an attachment (id=4654)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4654&action=view)
Description of bug, analysis, reference to the patch which produced it, sample
files


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
  2003-08-26 14:32 ` [Bug debug/12066] " mec at shout dot net
@ 2003-08-26 15:34 ` mmitchel at gcc dot gnu dot org
  2003-09-14 21:11 ` drow at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-08-26 15:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-08-26 15:34 -------
I assigned this to myself because I think I know that one of my recent patches
broke this.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
  2003-08-26 14:32 ` [Bug debug/12066] " mec at shout dot net
  2003-08-26 15:34 ` mmitchel at gcc dot gnu dot org
@ 2003-09-14 21:11 ` drow at gcc dot gnu dot org
  2003-09-15  0:35 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: drow at gcc dot gnu dot org @ 2003-09-14 21:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066


drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drow at gcc dot gnu dot org


------- Additional Comments From drow at gcc dot gnu dot org  2003-09-14 20:53 -------
I agree with Mark, it looks like this was caused by the change which removed
the call to pushdecl from record_builtin_type.  Mark, do you have any ideas
on how this should be fixed?  Probably not just by re-adding the pushdecl.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
                   ` (2 preceding siblings ...)
  2003-09-14 21:11 ` drow at gcc dot gnu dot org
@ 2003-09-15  0:35 ` mmitchel at gcc dot gnu dot org
  2003-09-17 16:20 ` cgf at redhat dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-09-15  0:35 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066



------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-09-15 00:13 -------
No, we certainly do not want to add back pushdecl.

Instead, the stabs backend should generate stabs for the builtin types
automatically, either as needed or always, at the start of the translation unit.

I haven't had a chance to look at how to do that yet, but if it's getting in the
way for the GDB folks, I will bump this up on my internal priority list.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
                   ` (3 preceding siblings ...)
  2003-09-15  0:35 ` mmitchel at gcc dot gnu dot org
@ 2003-09-17 16:20 ` cgf at redhat dot com
  2003-09-17 21:05 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cgf at redhat dot com @ 2003-09-17 16:20 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066



------- Additional Comments From cgf at redhat dot com  2003-09-17 15:44 -------
Subject: Re:  g++ generates stabs for "char *" that gdb cannot read

On Mon, Sep 15, 2003 at 12:13:18AM -0000, mmitchel at gcc dot gnu dot org wrote:
>PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066
>
>------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-09-15 00:13 -------
>No, we certainly do not want to add back pushdecl.
>
>Instead, the stabs backend should generate stabs for the builtin types
>automatically, either as needed or always, at the start of the translation unit.
>
>I haven't had a chance to look at how to do that yet, but if it's getting in the
>way for the GDB folks, I will bump this up on my internal priority list.

This is definitely impacting my ability to use the gcc trunk with
cygwin.  Code generation seems to be ok but I can't debug anything due
to this problem.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
                   ` (4 preceding siblings ...)
  2003-09-17 16:20 ` cgf at redhat dot com
@ 2003-09-17 21:05 ` cvs-commit at gcc dot gnu dot org
  2003-09-17 21:06 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-17 21:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-09-17 20:52 -------
Subject: Bug 12066

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2003-09-17 20:52:46

Modified files:
	gcc            : ChangeLog dbxout.c langhooks-def.h langhooks.c 
	                 langhooks.h 
	gcc/cp         : ChangeLog cp-lang.c cp-tree.h decl.c 

Log message:
	PR debug/12066
	* dbxout.c (dbxout_init): Use a langhook to find builtin types.
	* langhooks-def.h (lhd_return_null_tree_v): New function.
	(LANG_HOOKS_BUILTIN_TYPE_DECLS): New macro.
	(LANG_HOOKS_DECLS): Add it to the intializer.
	* langhooks.c (lhd_return_null_tree_v): New function.
	* langhooks.h (lang_hooks_for_decls): Add builtin_type_decls.
	
	PR debug/12066
	* cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
	* cp-tree.h (cxx_builtin_type_decls): Declare.
	* decl.c (builtin_type_decls): New variables.
	(cxx_builtin_type_decls): New function.
	(record_builtin_type): Add to builtin_type_decls.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1079&r2=2.1080
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dbxout.c.diff?cvsroot=gcc&r1=1.157&r2=1.158
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&r1=1.67&r2=1.68
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&r1=1.53&r2=1.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&r1=1.74&r2=1.75
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3683&r2=1.3684
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-lang.c.diff?cvsroot=gcc&r1=1.66&r2=1.67
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.916&r2=1.917
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1126&r2=1.1127


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
                   ` (5 preceding siblings ...)
  2003-09-17 21:05 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-17 21:06 ` mmitchel at gcc dot gnu dot org
  2003-09-17 23:41 ` mec at shout dot net
  2003-10-17 17:51 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-09-17 21:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-09-17 20:56 -------
Fixed in GCC 3.4.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
                   ` (6 preceding siblings ...)
  2003-09-17 21:06 ` mmitchel at gcc dot gnu dot org
@ 2003-09-17 23:41 ` mec at shout dot net
  2003-10-17 17:51 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mec at shout dot net @ 2003-09-17 23:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066



------- Additional Comments From mec at shout dot net  2003-09-17 22:58 -------
Subject: Re:  g++ generates stabs for "char *" that gdb cannot read

It works for me.  It fixes my specific test case, and it fixes
many bad results in the gdb test suite.   Thanks!

Michael C


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/12066] g++ generates stabs for "char *" that gdb cannot read
  2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
                   ` (7 preceding siblings ...)
  2003-09-17 23:41 ` mec at shout dot net
@ 2003-10-17 17:51 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-17 17:51 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12066


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-10-17 17:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-26 14:30 [Bug debug/12066] New: g++ generates stabs for "char *" that gdb cannot read mec at shout dot net
2003-08-26 14:32 ` [Bug debug/12066] " mec at shout dot net
2003-08-26 15:34 ` mmitchel at gcc dot gnu dot org
2003-09-14 21:11 ` drow at gcc dot gnu dot org
2003-09-15  0:35 ` mmitchel at gcc dot gnu dot org
2003-09-17 16:20 ` cgf at redhat dot com
2003-09-17 21:05 ` cvs-commit at gcc dot gnu dot org
2003-09-17 21:06 ` mmitchel at gcc dot gnu dot org
2003-09-17 23:41 ` mec at shout dot net
2003-10-17 17:51 ` pinskia at gcc dot gnu dot org

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).