[Bug python/29011] Python Value.dynamic_cast does not work as expected
ssbssa at sourceware dot org
sourceware-bugzilla@sourceware.org
Thu Mar 31 15:38:42 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=29011
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
You also get the same result without Python:
(gdb) p p
$1 = (Derived *) 0x5d20c0
(gdb) p pb
$2 = (Base *) 0x5d20c0
(gdb) p pb2
$3 = (Base2 *) 0x5d20d0
(gdb) p dynamic_cast<Derived*>(p)
$4 = (Derived *) 0x13f4e8800 <vtable for Derived+16>
(gdb) p dynamic_cast<Derived*>(pb)
$5 = (Derived *) 0x13f4e8800 <vtable for Derived+16>
(gdb) p dynamic_cast<Derived*>(pb2)
$6 = (Derived *) 0x13f4e8800 <vtable for Derived+16>
(gdb) p dynamic_cast<Base*>(p)
$7 = (Base *) 0x5d20c0
(gdb) p dynamic_cast<Base*>(pb)
$8 = (Base *) 0x13f4e8800 <vtable for Derived+16>
(gdb) p dynamic_cast<Base*>(pb2)
$9 = (Base *) 0x5d20c0
(gdb) p dynamic_cast<Base2*>(p)
$10 = (Base2 *) 0x5d20d0
(gdb) p dynamic_cast<Base2*>(pb)
$11 = (Base2 *) 0x5d20d0
(gdb) p dynamic_cast<Base2*>(pb2)
$12 = (Base2 *) 0x13f4e8800 <vtable for Derived+16>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list