From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1880 invoked by alias); 17 Jun 2009 16:21:51 -0000 Received: (qmail 1866 invoked by uid 22791); 17 Jun 2009 16:21:49 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 16:21:40 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5HGLbkA028160; Wed, 17 Jun 2009 12:21:37 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5HGLacW011130; Wed, 17 Jun 2009 12:21:36 -0400 Received: from opsy.redhat.com (vpn-12-224.rdu.redhat.com [10.11.12.224]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5HGLZNb018969; Wed, 17 Jun 2009 12:21:35 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id C6400378264; Wed, 17 Jun 2009 10:21:34 -0600 (MDT) To: Niko Sams Cc: gdb Subject: Re: Modify address of a gdb.Value References: <629542d40906142322h733ad7ffr3d6daeb7b306ff7a@mail.gmail.com> <629542d40906162251v4a4723f3l9423eec5998d0ee6@mail.gmail.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Wed, 17 Jun 2009 16:21:00 -0000 In-Reply-To: <629542d40906162251v4a4723f3l9423eec5998d0ee6@mail.gmail.com> (Niko Sams's message of "Wed\, 17 Jun 2009 07\:51\:28 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00180.txt.bz2 >>>>> "Niko" == Niko Sams writes: Niko> I tried to implement this payload method in python [...] Niko> the obvious solution would be gdb.lookup_type('QMapPayloadNode<%s, Niko> %s>' % (self.ktype, self.vtype)).sizeof Niko> but that doesn't work, i get this error: Niko> RuntimeError: No type named QMapPayloadNode Niko> This is because that QMapPayloadNode is not instanciated, it's only Niko> used for this sizeof. Niko> So any idea how i can compute the payload? There's no easy way. gdb only knows what the compiler tells it, and in this case, the information is omitted. You could try recreating the ABI struct layout rules in Python. This is a pain but not insanely hard. Tom