This is the mail archive of the
mailing list for the GDB project.
Re: Invoking methods on gdb.Value objects and other ideas
- From: Siva Chandra <sivachandra at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 17 Dec 2013 14:08:46 -0800
- Subject: Re: Invoking methods on gdb.Value objects and other ideas
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gxs7NCTSdMvBMxTthvVb1zQD-uYfU2OmLpVUcDEhwNYOA at mail dot gmail dot com> <87bo0gpg4f dot fsf at fleche dot redhat dot com> <CAGyQ6gyGWCN6y46CtwrvyDpQEX-g2pSvXBiP=j3mOwP9efG31g at mail dot gmail dot com>
Tom> The above seem to be found methods, but it seems that to be complete
Tom> you'd also want a way to create a C++ pointer-to-member. I guess this
Tom> is more cleanly done via the Type API, or perhaps a method on your
Tom> proposed TypeMethod object.
Siva> About C++ pointer-to-member values, I think they are in a way methods
Siva> already, and hence could just be invoked by '(...)' method invocation?
I think I misread Tom here.
I agree with Tom that a method on gdb.TypeMethod objects could return
a gdb.TypeMethodPtr object.
[With my little experience with GDB, I always use an example to
understand what TYPE_CODE_METHOD and TYPE_CODE_METHODPTR are supposed
to mean and how they differ. Added to this, if type_obj is a gdb.Type
object of type TYPE_CODE_METHOD, type_obj.pointer() does not give a