automated cast to different data type possible?
Klaus Rudolph
lts-rudolph@gmx.de
Thu May 12 06:17:00 GMT 2011
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
More information about the Gdb
mailing list