public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18273] New: Fail to generate debug info for member function.
@ 2004-11-02 12:41 adam_m_mckee at yahoo dot ca
2004-11-02 14:29 ` [Bug c++/18273] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: adam_m_mckee at yahoo dot ca @ 2004-11-02 12:41 UTC (permalink / raw)
To: gcc-bugs
g++ fails to generate debug info for some methods. Please refer to the
following files, posted here: http://www.adam-mckee.net/files/gccbug
------------------------------------------------------------------------------
TotalCostEvaluator_bug.ii : to reproduce the bug
TotalCostEvaluator_ok.ii : my workaround (debug info is generated properly)
readelf_bug.txt : readELF output shows no debug info generated
for 'tsPerDay', a local within TotalCostEvaluator::cslistCost()
readelf_ok.txt : debug info is properly generated for 'tsPerDay'
as well as all other locals belonging to TotalCostEvaluator::cslistCost().
------------------------------------------------------------------------------
If you compile TotalCostEvaluator_bug.ii, like this:
=== compilation command =====================================================
g++ -g -march=athlon-xp -Wall -Wno-uninitialized -fstrict-aliasing -c
-o TotalCostEvaluator.o TotalCostEvaluator.ii
=============================================================================
then run 'readelf -wi TotalCostEvaluator.o' - you will see that no debug info
has been generated for any local variables belonging to
cse::TotalCostEvaluator::cslistCost().
I did some testing, and found out that debug info would be properly generated
for cslistCost() if I change the way I write a template function
(deleteMapSecond), which is called by cslistCost(). If you compare
TotalCostEvaluator_ok.ii with TotalCostEvaluator_bug.ii you'll see the change I
made, which apparently causes gcc to generate debug info properly in this case.
This is the first time I filed a bug report for gcc. I wasn't sure how to
attach files so I thought it easiest to just make the files available from my
web server.
Here's some other information that you might want:
==== gcc -v ===============================================================
adam@chef:/work/gccbug> gcc -v
Reading specs from /usr/lib/gcc/i486-linux/3.4.2/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --disable-werror i486-linux
Thread model: posix
gcc version 3.4.2 (Debian 3.4.2-3)
=== uname -a ================================================================
Linux chef.clevor.vpn 2.6.9 #14 Mon Oct 25 19:49:12 CST 2004 i686 GNU/Linux
--
Summary: Fail to generate debug info for member function.
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: adam_m_mckee at yahoo dot ca
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18273
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/18273] Fail to generate debug info for member function.
2004-11-02 12:41 [Bug c++/18273] New: Fail to generate debug info for member function adam_m_mckee at yahoo dot ca
@ 2004-11-02 14:29 ` pinskia at gcc dot gnu dot org
2004-11-02 14:31 ` [Bug c++/18273] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-02 14:29 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18273
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/18273] [3.4 Regression] Fail to generate debug info for member function.
2004-11-02 12:41 [Bug c++/18273] New: Fail to generate debug info for member function adam_m_mckee at yahoo dot ca
2004-11-02 14:29 ` [Bug c++/18273] " pinskia at gcc dot gnu dot org
@ 2004-11-02 14:31 ` pinskia at gcc dot gnu dot org
2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-02 14:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-02 14:31 -------
Confirmed but not reduced, it works on the mainline also.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-debug
Known to fail| |3.4.0
Summary|Fail to generate debug info |[3.4 Regression] Fail to
|for member function. |generate debug info for
| |member function.
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18273
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/18273] [3.4 Regression] Fail to generate debug info for member function.
2004-11-02 12:41 [Bug c++/18273] New: Fail to generate debug info for member function adam_m_mckee at yahoo dot ca
2004-11-02 14:29 ` [Bug c++/18273] " pinskia at gcc dot gnu dot org
2004-11-02 14:31 ` [Bug c++/18273] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18273
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-05-19 17:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-02 12:41 [Bug c++/18273] New: Fail to generate debug info for member function adam_m_mckee at yahoo dot ca
2004-11-02 14:29 ` [Bug c++/18273] " pinskia at gcc dot gnu dot org
2004-11-02 14:31 ` [Bug c++/18273] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-05-19 17:22 ` mmitchel 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).