This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/11912] C++ name lookup failes


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]