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

--- Comment #3 from Paul Koning <paul_koning at dell dot com> 2012-09-13 
18:52:51 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.

This code is sufficiently hard to understand that I'm not likely to get much
further.

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.

Reply via email to