From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23767 invoked by alias); 10 Mar 2005 22:14:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23670 invoked from network); 10 Mar 2005 22:14:53 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 10 Mar 2005 22:14:53 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j2AMEmcJ020267 for ; Thu, 10 Mar 2005 17:14:53 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j2AMEmn04930; Thu, 10 Mar 2005 17:14:48 -0500 Received: from localhost.localdomain (vpn50-40.rdu.redhat.com [172.16.50.40]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j2AMElST021750; Thu, 10 Mar 2005 17:14:48 -0500 Received: from ironwood.lan (ironwood.lan [192.168.64.8]) by localhost.localdomain (8.12.11/8.12.10) with ESMTP id j2AMEgwY000527; Thu, 10 Mar 2005 15:14:42 -0700 Date: Thu, 10 Mar 2005 22:14:00 -0000 From: Kevin Buettner To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: Print the type of a C value in one more case Message-ID: <20050310151441.7b47875e@ironwood.lan> In-Reply-To: <20050306174529.GA20867@nevyn.them.org> References: <20050306174529.GA20867@nevyn.them.org> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00177.txt.bz2 On Sun, 6 Mar 2005 12:45:29 -0500 Daniel Jacobowitz wrote: > This is something that constantly bugs me when debugging GCC. GCC has > typedefs for "tree" and "rtx" which are both pointers to structs. When > you print either, you just get "$1 = 0xbf000100" without any indication of > the type of the variable; but normally GDB prints types for pointers. > This comes from a missing check_typedef in c_value_print. > > There were a couple of ways to fix it; I chose to print the typedef rather > than what the typedef pointed to. The only difference in the testsuite is > in one objc test, which perfectly illustrates the desired change: > > -$1 = 0x0 > +$1 = (id) 0x0 > > Any comments? I think printing the typedef is fine. FWIW, this has annoyed me in the past too, so I'm all in favor of your change. Kevin