This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: cast in gdb python results in virtual baseclass botch
- From: Andrà PÃnitz <andre dot poenitz at nokia dot com>
- To: gdb at sourceware dot org
- Date: Wed, 13 Apr 2011 17:26:55 +0200
- Subject: Re: cast in gdb python results in virtual baseclass botch
- References: <BANLkTini00+LMH4JjDmNOWNe+2PMi+b3Lg@mail.gmail.com>
On Wednesday 13 April 2011 16:59:49 ext Christoph Mathys wrote:
> I try to cast a gdb.Value to another type. There are cases where it
> works, and others where it doesn't, and I don't really know why. If it
> doesn't work, I get the following exception when I call cast():
> RuntimeError: virtual baseclass botch
>
> I use gdb 7.2, which apparently does not yet support dynamic_cast().
>
> Both variables are stored inside a boost::shared_ptr, and I try to
> cast to contained interface pointer to a specific implementation
> pointer.
I don't think you have to cast.
inner = item.value["px"].dereference() has already the correct type.
Andre'