From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89709 invoked by alias); 30 Nov 2015 08:52:56 -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 89689 invoked by uid 89); 30 Nov 2015 08:52:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1on0071.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (157.56.110.71) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Mon, 30 Nov 2015 08:52:54 +0000 Received: from CY1PR0501MB1178.namprd05.prod.outlook.com (10.160.145.14) by CY1PR0501MB1179.namprd05.prod.outlook.com (10.160.145.140) with Microsoft SMTP Server (TLS) id 15.1.331.20; Mon, 30 Nov 2015 08:52:51 +0000 Received: from CY1PR0501MB1178.namprd05.prod.outlook.com ([10.160.145.14]) by CY1PR0501MB1178.namprd05.prod.outlook.com ([10.160.145.14]) with mapi id 15.01.0331.023; Mon, 30 Nov 2015 08:52:51 +0000 From: Paul Marquess To: "gdb@sourceware.org" Subject: identify static fields with the python api Date: Mon, 30 Nov 2015 08:52:00 -0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Paul.Marquess@owmobility.com; x-microsoft-exchange-diagnostics: 1;CY1PR0501MB1179;5:3BoNeB9Di99xuSvYet/Z08DLOvKgbRtoklF9+qllu3q7GEabbHNfX9euDKFa339LrLjOJbppKhNeloQeG0L8A9OTEvZ/eWXrG9oBvJIiEeZHB7h7wV2MaIlGLrX5nMC6nbmLmGKr/6rJbdLD71hSQA==;24:5kLyupEz6MYzhqlJQfuGCS8yfHfoHRWL+62g7cqbKlUGQ45Hc0ixwSVk1OS47qVZ2o3/wlFAS0PURq51YPTLp3FwmGQxLI++eOavtLy3u5Y= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0501MB1179; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001);SRVR:CY1PR0501MB1179;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0501MB1179; x-forefront-prvs: 0776C39A48 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(189002)(66066001)(106356001)(76576001)(122556002)(450100001)(2501003)(11100500001)(3846002)(40100003)(6116002)(87936001)(99286002)(54356999)(101416001)(105586002)(586003)(102836003)(77096005)(86362001)(33656002)(50986999)(5008740100001)(10400500002)(92566002)(97736004)(2900100001)(107886002)(1220700001)(110136002)(189998001)(1096002)(81156007)(5001960100002)(5003600100002)(19580395003)(5002640100001)(229853001)(2351001)(5004730100002)(74316001)(299355004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0501MB1179;H:CY1PR0501MB1178.namprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: owmobility.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: owmobility.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2015 08:52:51.8066 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 042bf9d6-5c89-4240-a963-35f806e16660 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0501MB1179 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00044.txt.bz2 I trying to identify the static fields in a struct/class using the Python A= =3D PI, but I don't see anything in the API that will flag them. Can get everything else I need from the field as shown below for field in sometype.fields(): n =3D3D field.name t =3D3D field.type s =3D3D t.sizeof To work around the issue I've captured the output from "ptype" with a gdb.e= =3D xecute and checked for the static fields there. Messy (and surprisingly= slo=3D w for bigish classes) but it does seem to work. Is there any other way to do this? Paul