This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/12385] Full debug info not emitted for C++ classes with external virtual functions
- From: "drow at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Oct 2003 14:18:05 -0000
- Subject: [Bug debug/12385] Full debug info not emitted for C++ classes with external virtual functions
- References: <20030924064323.12385.sgjohnston@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12385
drow at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-10-10 14:18:00
date| |
------- Additional Comments From drow at gcc dot gnu dot org 2003-10-10 14:17 -------
Right now debug information would be emitted in file1.cc for your last
testcase. I think it's tied to the vtable; the vtable is emitted with the
class's "key function" which is fn1 in this case.
On the other hand I don't think tying debug output to vtable emission makes
a whole lot of sense. Consider:
library.h:
class f1
{
public: virtual int bar();
};
library.cc:
#include "library.h"
int f1::bar() { return 2; }
app.cc:
#include "lib.h"
int main()
{
f1 bat;
return 2 + bat.bar();
}
Try it. Build lib.cc with -shared and app.cc with -g. No debug info for
the class is emitted even though we ought to be able to see the local variable:
(gdb) ptype bat
type = struct C {
<incomplete type>
}
This shows up debugging libstdc++ all the time.