[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 --- Comment #7 from Jason Merrill jason at gcc dot gnu.org 2013-01-31 18:29:24 UTC --- Author: jason Date: Thu Jan 31 18:29:15 2013 New Revision: 195622 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195622 Log: PR debug/55059 PR debug/54508 * dwarf2out.c (prune_unused_types_mark): Mark all of parent's children if parent is a class. (prune_unused_types_prune): Don't add DW_AT_declaration. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C trunk/gcc/testsuite/g++.dg/debug/dwarf2/localclass2.C trunk/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 --- Comment #8 from Jason Merrill jason at gcc dot gnu.org 2013-01-31 18:30:32 UTC --- I backed out Paul's later patch in favor of the earlier one from http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00450.html
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added CC||jason at gcc dot gnu.org Blocks||55059 --- Comment #6 from Jason Merrill jason at gcc dot gnu.org 2013-01-29 17:50:20 UTC --- This patch caused bug 55059; I think we need a different solution.
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 --- Comment #4 from pkoning at gcc dot gnu.org 2012-10-23 18:44:33 UTC --- Author: pkoning Date: Tue Oct 23 18:44:27 2012 New Revision: 192739 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192739 Log: PR debug/54508 * dwarf2out.c (prune_unused_types_prune): If pruning a class and not all its children were marked, add DW_AT_declaration flag. * g++.dg/debug/dwarf2/pr54508.C: New. Added: trunk/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 Paul Koning paul_koning at dell dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED --- Comment #5 from Paul Koning paul_koning at dell dot com 2012-10-23 18:53:28 UTC --- Fixed in trunk.
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 --- Comment #3 from Paul Koning paul_koning at dell dot com 2012-09-24 19:32:21 UTC --- Created attachment 28260 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28260 Fix and testcase for this, as submitted to the gcc-bugs list I'm not sure if the main submission should be here or to gcc-bugs -- I posted a fix there a week ago. Attached is what I submitted (including a small adjustment to the regexp used in the testcase file).
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 --- Comment #2 from Paul Koning paul_koning at dell dot com 2012-09-17 21:31:29 UTC --- I just submitted a proposed fix to the gcc-patches list.
[Bug debug/54508] Wrong debug information emitted if data members not referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508 --- Comment #1 from Paul Koning paul_koning at dell dot com 2012-09-13 21:21:58 UTC --- I spent some time trying to figure this out. The offending code seems to be the prune_unused_types machinery. If there is a reference to a static method, but no other references to parts of the class, then the class is treated as unused. However, the static method does cause the class name to be emitted in the dwarf output. But because of the fact that it is treated as unused, nothing else about the class is emitted. This messes up code that consumes the debug data, because it now looks like the class IS defined there, but most of its substance is missing. Meanwhile, I noticed a documentation bug: the documentation for -feliminate-unused-debug-types says that this switch is off by default. That is no longer true, it is on by default. If I turn it off, the prune_unused_types machinery is suppressed and I get valid debug output. Unfortunately, it is also so much larger that my builds run very slowly and some binaries grow by as much as a factor of 5.