From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5069 invoked by alias); 14 Apr 2011 13:45:25 -0000 Received: (qmail 5061 invoked by uid 22791); 14 Apr 2011 13:45:24 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qy0-f176.google.com (HELO mail-qy0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Apr 2011 13:45:20 +0000 Received: by qyk30 with SMTP id 30so1313655qyk.0 for ; Thu, 14 Apr 2011 06:45:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.51.134 with SMTP id d6mr539779qcg.89.1302788718754; Thu, 14 Apr 2011 06:45:18 -0700 (PDT) Received: by 10.229.83.194 with HTTP; Thu, 14 Apr 2011 06:45:18 -0700 (PDT) In-Reply-To: <201104131929.46854.andre.poenitz@nokia.com> References: <201104131726.55718.andre.poenitz@nokia.com> <201104131929.46854.andre.poenitz@nokia.com> Date: Thu, 14 Apr 2011 13:45:00 -0000 Message-ID: Subject: Re: cast in gdb python results in virtual baseclass botch From: Christoph Mathys To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00054.txt.bz2 On Wed, Apr 13, 2011 at 7:29 PM, Andr=C3=A9 P=C3=B6nitz wrote: > On Wednesday 13 April 2011 19:08:17 ext Christoph Mathys wrote: >> On Wed, Apr 13, 2011 at 5:26 PM, Andr=C3=A9 P=C3=B6nitz wrote: >> > I don't think you have to cast. >> > >> > inner =3D item.value["px"].dereference() =C2=A0 has already the correc= t type. >> >> I expressed myself badly: >> > Then > > =C2=A0item.value["px"].dereference().cast(gdb.lookup_type("IXmlNode").poi= nter())["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