From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30851 invoked by alias); 11 Jun 2009 09:51:19 -0000 Received: (qmail 30841 invoked by uid 22791); 11 Jun 2009 09:51:18 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from fmmailgate02.web.de (HELO fmmailgate02.web.de) (217.72.192.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 09:51:12 +0000 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate02.web.de (Postfix) with ESMTP id 1633F102A32C6; Thu, 11 Jun 2009 11:51:09 +0200 (CEST) Received: from [88.64.26.191] (helo=[192.168.1.10]) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1MEgw8-0003tF-00; Thu, 11 Jun 2009 11:51:08 +0200 Message-ID: <4A30D38B.3030603@web.de> Date: Thu, 11 Jun 2009 09:51:00 -0000 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: tromey@redhat.com CC: gdb@sourceware.org Subject: Re: container_of equivalent in gdb-python script References: <4A2FE5AB.4060707@siemens.com> <4A30133F.9000909@web.de> <20090610204201.GA17154@caradoc.them.org> <4A30269D.7070504@web.de> <4A302FEB.1060509@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8EE641565CB3682036CE6F8B" X-Sender: jan.kiszka@web.de 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/msg00108.txt.bz2 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8EE641565CB3682036CE6F8B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 892 Tom Tromey wrote: >>>>>> "Jan" =3D=3D Jan Kiszka writes: >=20 > Jan> Yeah, seen this (in the testsuite). But such objects neither have > Jan> addresses, nor do they help with non-constant objects I'm interested= in. >=20 > Yeah. You can use this for "offsetof" but it sounds like you wanted > more. Yep, essentially instantiate a gdb.Value object of arbitrary type at an arbitrary address. >=20 > Tom> Whoops, this seems to be undocumented. >=20 > Jan> Not the only piece... :) >=20 > Please report anything you think is missing. We try very hard to > document the entirety of the Python API; anything missing is due to an > oversight. I will write doc patches for anything you "don't" find ;) >=20 I have to correct myself: Actually looking at the right documentation, I find all the latest features described (I was probably still starring at 6.8 docs...). Jan --------------enig8EE641565CB3682036CE6F8B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 257 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkow04wACgkQniDOoMHTA+m0KwCfZCxqmpYiqrSpfrjF/Q4pU2Gs nhwAnR7bpSFRpwoBAhcZmOs0w7Z+VRIG =gsKh -----END PGP SIGNATURE----- --------------enig8EE641565CB3682036CE6F8B--