public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types
@ 2004-04-06  2:07 mec dot gnu at mindspring dot com
  2004-04-06  2:08 ` [Bug debug/14860] " mec dot gnu at mindspring dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-04-06  2:07 UTC (permalink / raw)
  To: gcc-bugs

Here is a test program:

  char * pc;

  int main ()
  {
    return 0;
  }

Compile with gcc -gstabs+ -S.

Here are the stabs with gcc 2004-03-23 23:40:00 UTC

        .stabs  "char:t(0,2)=r(0,2);0;127;",128,0,0,0
        .stabs  "pc:G(0,16)=*(0,2)",32,0,1,0

Here are the stabs with gcc 2004-03-24 00:00:00 UTC

        .stabs  "pc:G(0,2)=*(0,3)=r(0,3);0;127;",32,0,1,0

The problem with the new stabs is that type (0,3) has no name.
So gdb cannot print this type:

  # gdb 6.0
  (gdb) ptype pc
  type = <invalid type code 7> *

I narrowed the regression down to this patch:

  2004-03-23  Zack Weinberg  <zack@codesourcery.com>

        PR 12267, 12391, 12560, 13129, 14114, 14133

This problem does not happen with -gdwarf-2.

This problem happens with gcc HEAD and gcc tree-ssa-20020619-branch.  It does
not happen with gcc gcc-3_4-branch or gcc gcc-3_3-branch.

I suspect that the problem is related to the removal of first_builtin_decl and
last_builtin_decl.  When I compile an empty program with the old compiler, there
are stab lines for about 20 builtin types (int, char, float, double, etc).  When
I compile an empty program with the new compiler, there are no such stab lines.

-- 
           Summary: [regression] gcc -gstabs+ fails to emit stabs for
                    fundamental types
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: debug
        AssignedTo: zack at codesourcery dot com
        ReportedBy: mec dot gnu at mindspring dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug debug/14860] [regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
@ 2004-04-06  2:08 ` mec dot gnu at mindspring dot com
  2004-04-06  2:10 ` mec dot gnu at mindspring dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-04-06  2:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-04-06 02:08 -------
Created an attachment (id=6039)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6039&action=view)
C Source file which exhibits the problem


-- 


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


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

* [Bug debug/14860] [regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
  2004-04-06  2:08 ` [Bug debug/14860] " mec dot gnu at mindspring dot com
@ 2004-04-06  2:10 ` mec dot gnu at mindspring dot com
  2004-04-06  2:13 ` mec dot gnu at mindspring dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-04-06  2:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-04-06 02:10 -------
Created an attachment (id=6040)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6040&action=view)
Good assembly output, gcc 2004-03-23 23:40:00 UTC

Compile builtin.c with gcc -gstabs+ -S


-- 


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


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

* [Bug debug/14860] [regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
  2004-04-06  2:08 ` [Bug debug/14860] " mec dot gnu at mindspring dot com
  2004-04-06  2:10 ` mec dot gnu at mindspring dot com
@ 2004-04-06  2:13 ` mec dot gnu at mindspring dot com
  2004-04-06  4:50 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-04-06  2:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-04-06 02:13 -------
Created an attachment (id=6041)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6041&action=view)
bad assembly output, gcc HEAD 2004-03-24 00:00:00 UTC

Compile builtin.c with gcc -gstabs+ -S.

The problem is the lack of name for "char" type, so gdb prints "pointer to
char" as something like "pointer to <unknown integral type>".


-- 


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


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

* [Bug debug/14860] [regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (2 preceding siblings ...)
  2004-04-06  2:13 ` mec dot gnu at mindspring dot com
@ 2004-04-06  4:50 ` pinskia at gcc dot gnu dot org
  2004-04-06 16:45 ` zack at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-06  4:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-06 04:50 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-debug
      Known to fail|                            |3.5.0
      Known to work|                            |3.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-06 04:50:43
               date|                            |
   Target Milestone|---                         |3.5.0


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


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

* [Bug debug/14860] [regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (3 preceding siblings ...)
  2004-04-06  4:50 ` pinskia at gcc dot gnu dot org
@ 2004-04-06 16:45 ` zack at gcc dot gnu dot org
  2004-06-23 23:38 ` [Bug debug/14860] [3.5 regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-04-06 16:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-04-06 16:44 -------
mine.  not critical, though.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-04-06 04:50:43         |2004-04-06 16:45:01
               date|                            |


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


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

* [Bug debug/14860] [3.5 regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (4 preceding siblings ...)
  2004-04-06 16:45 ` zack at gcc dot gnu dot org
@ 2004-06-23 23:38 ` pinskia at gcc dot gnu dot org
  2004-07-02 21:01 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-23 23:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-23 22:52 -------
This is very important to Darwin and other targets which use stabs still by default.

-- 


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


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

* [Bug debug/14860] [3.5 regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (5 preceding siblings ...)
  2004-06-23 23:38 ` [Bug debug/14860] [3.5 regression] " pinskia at gcc dot gnu dot org
@ 2004-07-02 21:01 ` pinskia at gcc dot gnu dot org
  2004-08-04  1:05 ` zack at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-02 21:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-02 21:01 -------
As I said this effects darwin and some other targets like AIX too.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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


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

* [Bug debug/14860] [3.5 regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (6 preceding siblings ...)
  2004-07-02 21:01 ` pinskia at gcc dot gnu dot org
@ 2004-08-04  1:05 ` zack at gcc dot gnu dot org
  2004-08-04  7:01 ` zack at gcc dot gnu dot org
  2004-08-05 16:32 ` mec dot gnu at mindspring dot com
  9 siblings, 0 replies; 11+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-08-04  1:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-08-04 01:05 -------
(From update of attachment 6875)
arrr, this be a patch, matey


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #6875 is|0                           |1
              patch|                            |


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


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

* [Bug debug/14860] [3.5 regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (7 preceding siblings ...)
  2004-08-04  1:05 ` zack at gcc dot gnu dot org
@ 2004-08-04  7:01 ` zack at gcc dot gnu dot org
  2004-08-05 16:32 ` mec dot gnu at mindspring dot com
  9 siblings, 0 replies; 11+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-08-04  7:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-08-04 07:01 -------
dunno where the commit message went, but the patch is checked in now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|3.5.0                       |
      Known to work|3.4.0                       |3.4.0 3.5.0
         Resolution|                            |FIXED


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


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

* [Bug debug/14860] [3.5 regression] gcc -gstabs+ fails to emit stabs for fundamental types
  2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
                   ` (8 preceding siblings ...)
  2004-08-04  7:01 ` zack at gcc dot gnu dot org
@ 2004-08-05 16:32 ` mec dot gnu at mindspring dot com
  9 siblings, 0 replies; 11+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-08-05 16:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-08-05 16:32 -------
Works great for me on native i686-pc-linux-gnu.

All my sample programs behave now.

I ran the gdb test suite with the usual battery:

  gdb 6.1.1, gdb HEAD
  gdb test suite HEAD with local modifications
  gcc 3.4.1, gcc HEAD 200407031, gcc HEAD 20040804
  dwarf-2 and stabs+

About 800 FAILs went away with -gstabs+ (out of 10_000 tests), and now gdb is
usable again.

Nothing regressed.  Color me happy.  Another cheer for Zack.


-- 


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


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

end of thread, other threads:[~2004-08-05 16:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-06  2:07 [Bug debug/14860] New: [regression] gcc -gstabs+ fails to emit stabs for fundamental types mec dot gnu at mindspring dot com
2004-04-06  2:08 ` [Bug debug/14860] " mec dot gnu at mindspring dot com
2004-04-06  2:10 ` mec dot gnu at mindspring dot com
2004-04-06  2:13 ` mec dot gnu at mindspring dot com
2004-04-06  4:50 ` pinskia at gcc dot gnu dot org
2004-04-06 16:45 ` zack at gcc dot gnu dot org
2004-06-23 23:38 ` [Bug debug/14860] [3.5 regression] " pinskia at gcc dot gnu dot org
2004-07-02 21:01 ` pinskia at gcc dot gnu dot org
2004-08-04  1:05 ` zack at gcc dot gnu dot org
2004-08-04  7:01 ` zack at gcc dot gnu dot org
2004-08-05 16:32 ` mec dot gnu at mindspring dot com

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