This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: automated cast to different data type possible?
Tom Tromey wrote:
> Klaus> Base* ptr1=new A;
> Klaus> Base* ptr2=new B;
>
> Klaus> Now I want to debug ptr1. print returns only the output for base.
> OK
> Klaus> But I want to see, the type is a object of class A.
>
> You want "set print object on".
This only works with classes which includes a vtable, but there is no virtual function inside that hierarchy.
regards
Klaus
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de