This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19769] [4.0/4.1 Regression] GCC produces wrong dwarf2 output that breaks gdb
- From: "wilson at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2005 03:11:12 -0000
- Subject: [Bug c++/19769] [4.0/4.1 Regression] GCC produces wrong dwarf2 output that breaks gdb
- References: <20050202233416.19769.dberlin@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wilson at gcc dot gnu dot org 2005-03-13 03:11 -------
Dan's example doesn't work because 'int' is a predefined type. Use a unique
structure type put the function call back in the inline function, and I get a
nice little example (22 lines) that can reproduce the problem. If I compile it with
./xgcc -B./ -O -g tmp.cc
and then run gdb on the a.out file, I get a gdb internal error.
Looking at the debug info, I now have 4 DIEs for the variable i. There are the
same 3 as Dan's example, plus a fourth one, with global scope, that has the
abstract origin pointing back at the declaration inside the inline function. It
is this fourth one that confuses gdb.
This is using mainline, last updated Thursday March 10, on an x86-64 linux machine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19769