From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17344 invoked by alias); 6 Jul 2010 19:52:10 -0000 Received: (qmail 17327 invoked by uid 48); 6 Jul 2010 19:52:10 -0000 Date: Tue, 06 Jul 2010 19:52:00 -0000 Message-ID: <20100706195210.17326.qmail@sourceware.org> From: "tromey at redhat dot com" To: gdb-prs@sourceware.org In-Reply-To: <20100701072012.11777.andre.poenitz@nokia.com> References: <20100701072012.11777.andre.poenitz@nokia.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug python/11777] Strange behaviour of gdb.Type.fields X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q3/txt/msg00015.txt.bz2 ------- Additional Comments From tromey at redhat dot com 2010-07-06 19:52 ------- (In reply to comment #2) > -ex 'python print gdb.parse_and_eval("x")["p"].dereference().type.fields()' \ I can make this work by adding a call to strip_typedefs: (gdb) python print gdb.parse_and_eval ('x')['p'].dereference().type.fields() [] (gdb) python print gdb.parse_and_eval ('x')['p'].dereference().type.strip_typedefs().fields() [, , , ] Arguably the Python API should be doing this for you. It seems useless to get the fields of a stub type. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=11777 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.