This is the mail archive of the 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: Virtual methods table printing [Re: Expressions Status and OustandingTasks]

Jan Kratochvil wrote:
Assuming one should have a simple commend to get some listing:
(gdb) describe-me base1p
func1: {int (derived *)} 0x40065c <derived::func1()>
func2: {int (derived *)} 0x400672 <derived::func2()>

But I am not a C++ programmer, maybe `set print object on' is sufficient?

Yeah, some way to get at RTTI would definitely be helpful for debugging polymorphic designs...

Strictly speaking base1p *is* declared as "base1*". Nonetheless, I would be very hesitant to give access to this information via another command, and I prefer Jan's approach: it's simple.

If either ptype or whatis (others?) is given a pointer, then output actual type information for the object (in addition to its declared type). If given just a type name, do what gdb does today. Modify "print"ing of pointers as Jan suggests in his email.

I am sure there is a whole bunch of improvements to be made w.r.t. debugging this and other OO design paradigms that we have yet to discover. [One obvious one: I'd like to be able to type "list base1p->func1" or somesuch and have gdb list for me the correct method (from derived). Ditto "print" and "break".]


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