This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/11912] C++ name lookup failes
- From: "marc dot khouzam at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 9 Sep 2010 15:08:43 -0000
- Subject: [Bug symtab/11912] C++ name lookup failes
- References: <20100813144044.11912.andre.poenitz@nokia.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From marc dot khouzam at ericsson dot com 2010-09-09 15:08 -------
I've also seen what seems like the same problem in the following example. Note
that this also fails for GDB 6.8
class bar{};
class foo : public bar {
public:
foo() {} // Comment this line to make things work
void test() { return; }
};
int main(void) {
foo f; f.test();
return 0;
}
//commands to execute in GDB, which will make the last one fail
//b foo::test
//r
//p (*(bar*) this)
The print will cause GDB to report a syntax error.
Removing the constructor of foo fixes the problem.
Adding 'struct' or 'class', as in 'p (*(struct bar*) this)' also fixes the problem.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11912
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.