cast in gdb python results in virtual baseclass botch

Christoph Mathys eraserix@gmail.com
Wed Apr 13 17:08:00 GMT 2011


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:

class XmlNodeInterface
{ };
class XmlNode : public XmlNodeInterface
{
 xmlNode* m_pNode;
};

I've got a reference to a "shared_ptr<IXmlNode>", and I want m_pNode.
So after I extracted px, I think I have to downcast from IXmlNode to
XmlNode.

Christoph



More information about the Gdb mailing list