From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 522 invoked by alias); 15 Mar 2010 16:39:08 -0000 Received: (qmail 510 invoked by uid 22791); 15 Mar 2010 16:39:06 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Mar 2010 16:39:02 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2FGcpBs011286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Mar 2010 12:38:52 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2FGcoCY029276; Mon, 15 Mar 2010 12:38:51 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2FGcnpU000382; Mon, 15 Mar 2010 12:38:50 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 6FE66378261; Mon, 15 Mar 2010 10:38:49 -0600 (MDT) From: Tom Tromey To: Chris Johns Cc: gdb@sourceware.org Subject: Re: Python Pretty printing a struct References: <4B997F28.4050602@contemporary.net.au> <4B9D73C2.9090307@contemporary.net.au> Reply-To: Tom Tromey Date: Mon, 15 Mar 2010 16:39:00 -0000 In-Reply-To: <4B9D73C2.9090307@contemporary.net.au> (Chris Johns's message of "Mon, 15 Mar 2010 10:39:46 +1100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (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: 2010-03/txt/msg00091.txt.bz2 >>>>> "Chris" == Chris Johns writes: Chris> def to_string(self): Chris> return 'to_string' This seems like a strange definition for this method. Try removing it. Chris> I have also noticed this: Chris> (gdb) p /x the_semaphore->Object.id Chris> $37 = 0x1a010012 Chris> Is it expected the actual value is shown in hex rather than the Chris> numeric fields returned by the pretty print iterator ? Tom> It might be a bug, I am not sure. Chris> Should I raise a bug report ? Sure. Chris> I have also found: Chris> (gdb) p (Object_Id) 0x1a010012 Chris> does not invoke the Object_Id pretty printer. In this RTEMS target Chris> Object_Id is a typedef to uint32_t which is a typedef to "unsigned Chris> long" so GDB looks for a the "unsigned long" pretty printer rather Chris> that an Object_Id one. This is probably due to http://sourceware.org/bugzilla/show_bug.cgi?id=10660 Tom