With gcc 4.0 checked out at Tue Dec 21 23:14:35 UTC 2004, I got

[EMAIL PROTECTED] thread]$ gdb gdb
GNU gdb 6.3.0.90_2004-12-14-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

Setting up the environment for debugging gdb.
Breakpoint 1 at 0x8084ce3: file /net/gnu/export/gnu/src/gdb-6.3/gdb/gdb/utils.c,
line 849.
Breakpoint 2 at 0x80af162: file
/net/gnu/export/gnu/src/gdb-6.3/gdb/gdb/cli/cli-cmds.c, line 193.
(top-gdb) r /export/build/gnu/gcc/build-i686-linux/gcc/cc1
Starting program: /usr/local/bin/gdb 
/export/build/gnu/gcc/build-i686-linux/gcc/cc1
GNU gdb 6.3.0.90_2004-12-14-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

Setting up the environment for debugging gdb.
Breakpoint 1 at 0x812d410: file
/net/gnu/export/gnu/src/gcc/gcc/gcc/diagnostic.c, line 496.
Function "info_command" not defined.
(top-gdb) b  tls_symbolic_operand
Breakpoint 2 at 0x826c1d0: file insn-preds.c, line 471.
(top-gdb) r -fpreprocessed foo.i -quiet -dumpbase foo.i -mtune=pentiumpro
-auxbase foo -O -version -o foo.s
Starting program: /export/build/gnu/gcc/build-i686-linux/gcc/cc1 -fpreprocessed
foo.i -quiet -dumpbase foo.i -mtune=pentiumpro -auxbase foo -O -version -o
foo.sDetaching after fork from child process 6975.
Detaching after fork from child process 6976.
GNU C version 4.0.0 20041221 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.0.0 20041221 (experimental).
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127207


Program received signal SIGSEGV, Segmentation fault.
dwarf_expr_frame_base (baton=0xbfffecf0, start=0xbfffec90, length=0xbfffec94)
    at /net/gnu/export/gnu/src/gdb-6.3/gdb/gdb/dwarf2loc.c:171
171           *length = symbaton->size;
(top-gdb) p symbaton
$1 = (struct dwarf2_locexpr_baton *) 0x0

[EMAIL PROTECTED] gcc]$ readelf -w insn-preds.o > /dev/null
readelf: Error: Not enough comp units for .debug_loc section
[EMAIL PROTECTED] gcc]$ readelf -w stage1/insn-preds.o > /dev/null

It seems that gcc 4.0 generates incorrect .debug_loc section.

-- 
           Summary: [4.0 regression]  gcc generates incorrect dwarf2 debug
                    info
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org
                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=19124

Reply via email to