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: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 16 Aug 2010 20:45:36 -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 tromey at redhat dot com 2010-08-16 20:45 -------
The bug here is that the parser treats "Object" as the
constructor's name. If you dump the intermediate expression you'll see
this->Object
Then later, lookup_struct_elt_type fails because it considers fields
but not (I think) methods.
At the very least we should be printing the type of the constructor,
not failing.
The root of the problem here is that "ptype" accepts either types or expressions,
but we don't have a good way to always differentiate between the two.
As a workaround you can use "ptype class Object" to tell the parser that
you are asking about a type. (I learned this today while looking at the
docs :-)
say
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2010-08-16 20:45:36
date| |
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.