From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50557 invoked by alias); 30 Oct 2015 07:20:20 -0000 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 Received: (qmail 50544 invoked by uid 89); 30 Oct 2015 07:20:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout09.t-online.de Received: from mailout09.t-online.de (HELO mailout09.t-online.de) (194.25.134.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 30 Oct 2015 07:20:17 +0000 Received: from fwd12.aul.t-online.de (fwd12.aul.t-online.de [172.20.26.241]) by mailout09.t-online.de (Postfix) with SMTP id 4E5DA406B9D; Fri, 30 Oct 2015 08:20:14 +0100 (CET) Received: from localhost (SmFeGZZdoh3n3lTWgaQgj6cemAnR3X5O2U626XKfic5Q3lN88O4WCZLbmgd8vG+ZcE@[93.220.171.160]) by fwd12.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1Zs3ys-3QPBDs0; Fri, 30 Oct 2015 08:20:10 +0100 Date: Fri, 30 Oct 2015 07:20:00 -0000 From: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= To: Paul Marquess Cc: "gdb@sourceware.org" Subject: Re: getting subclass type from base class pointer Message-ID: <20151030072010.GA12621@klara.mpi.htwm.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00113.txt.bz2 On Thu, Oct 29, 2015 at 11:38:27PM +0000, Paul Marquess wrote: > > gdb) python x = gdb.parse_and_eval("pTest") > > (gdb) python print x.type > > SuperClass * (gdb) python print(x.type) SuperClass * (gdb) python print(x.dynamic_type) SubClass * Andre'