This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cast in gdb python results in virtual baseclass botch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]