This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

Re: How to cast a pointer to a base class with multiple inheritance


>>>>> "Matthieu" == Matthieu VIAL <matthieu.vial@orange-ftgroup.com> writes:

Matthieu> Sorry Value.cast seems to work but my problem is actually a bit more
Matthieu> complex.

Ok.

Matthieu> I need to compare pointers to the interface with pointers to
Matthieu> the base class. But these classes are not directly related so
Matthieu> Value.cast is useless. The solution is to up cast the base
Matthieu> class pointer to the final class and then down cast to the
Matthieu> interface. But i need run time type information for that. The
Matthieu> typeid operator doesn't seem to be available in archer.

Nope.  The Python API just exposes things that already exist in gdb.
typeid is not implemented yet, there's a bug for it:

http://sourceware.org/bugzilla/show_bug.cgi?id=9065


However, gdb does have "set print object on"... if this prints the right
thing for you, I think we could hook up the internal code to find the
"real object" as a Value method.

Tom


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