From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29408 invoked by alias); 1 Jul 2010 07:20:16 -0000 Received: (qmail 29388 invoked by uid 48); 1 Jul 2010 07:20:13 -0000 Date: Thu, 01 Jul 2010 07:20:00 -0000 From: "andre dot poenitz at nokia dot com" To: gdb-prs@sourceware.org Message-ID: <20100701072012.11777.andre.poenitz@nokia.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug python/11777] New: 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/msg00002.txt.bz2 I sometimes cannot get a proper list of members from structures that do have members: This accesses a "real" QRegionPrivate object in a 'QRegion region;': python print gdb.parse_and_eval(\"region\")[\"d\"].dereference()[\"qt_rgn\"].dereference().type -> struct myns::QRegionPrivate python print gdb.parse_and_eval(\"region\")[\"d\"].dereference()[\"qt_rgn\"].dereference().type.fields() -> [] If I "create" the type manually I get: python print gdb.parse_and_eval(\"('myns::QRegionPrivate'*)0\").dereference().type -> myns::QRegionPrivate python print gdb.parse_and_eval(\"('myns::QRegionPrivate'*)0 \").dereference().type.fields() -> [, , , , ] Note the extra "struct " in the 'type' output in the first case. The problem also disappears when I use type = gdb.lookup_type(str(type)) before accessing fields(). -- Summary: Strange behaviour of gdb.Type.fields Product: gdb Version: 7.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: python AssignedTo: unassigned at sourceware dot org ReportedBy: andre dot poenitz at nokia dot com CC: gdb-prs at sourceware dot org GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu 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.