This is the mail archive of the
mailing list for the Archer project.
Re: How to cast a pointer to a base class with multiple inheritance
>>>>> "Matthieu" == Matthieu VIAL <firstname.lastname@example.org> writes:
Matthieu> Sorry Value.cast seems to work but my problem is actually a bit more
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:
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.