cast in gdb python results in virtual baseclass botch

Christoph Mathys eraserix@gmail.com
Thu Apr 14 13:45:00 GMT 2011


On Wed, Apr 13, 2011 at 7:29 PM, André Pönitz <andre.poenitz@nokia.com> wrote:
> On Wednesday 13 April 2011 19:08:17 ext Christoph Mathys wrote:
>> On Wed, Apr 13, 2011 at 5:26 PM, André Pönitz <andre.poenitz@nokia.com> wrote:
>> > I don't think you have to cast.
>> >
>> > inner = item.value["px"].dereference()   has already the correct type.
>>
>> I expressed myself badly:
>>
> Then
>
>  item.value["px"].dereference().cast(gdb.lookup_type("IXmlNode").pointer())["m_pNode"]
>
> or something similar might do the trick.

Thanks for the input. That's what I do really, except that I cast to
XmlNode pointer and not the interface. The cast works for most of the
instance variables, except for some, and I don't know why. But well,
it is good enough for now...

Christoph



More information about the Gdb mailing list