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
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