From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21338 invoked by alias); 11 Mar 2010 23:39:42 -0000 Received: (qmail 21329 invoked by uid 22791); 11 Mar 2010 23:39:41 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from outbound.icp-qv1-irony-out6.iinet.net.au (HELO outbound.icp-qv1-irony-out6.iinet.net.au) (203.59.1.109) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Mar 2010 23:39:37 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAOINmUvLzoJq/2dsb2JhbACaZHO8SoR7BA Received: from unknown (HELO corb.contemporary.net.au) ([203.206.130.106]) by outbound.icp-qv1-irony-out6.iinet.net.au with ESMTP; 12 Mar 2010 07:39:27 +0800 Received: from [10.10.10.192] (utzon.contemporary.net.au [10.10.10.192]) by corb.contemporary.net.au (8.13.8/8.13.8) with ESMTP id o2BNdOHO012180 for ; Fri, 12 Mar 2010 10:39:25 +1100 Message-ID: <4B997F28.4050602@contemporary.net.au> Date: Thu, 11 Mar 2010 23:39:00 -0000 From: Chris Johns User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Python Pretty printing a struct Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00078.txt.bz2 Hello, I have progressed so I can take a "unsigned long" value which is bit encoded and display it using the display hint 'struct' and a pretty print iterator. For example: (gdb) p the_semaphore->Object.id $36 = to_string = { id = 436273170, node = 1, api = classic, class = semaphores, index = 18 } How do I remove the extra "to_string =" ? I have also noticed this: (gdb) p /x the_semaphore->Object.id $37 = 0x1a010012 Is it expected the actual value is shown in hex rather than the numeric fields returned by the pretty print iterator ? Chris