From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25290 invoked by alias); 7 Mar 2005 20:57:19 -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 25175 invoked from network); 7 Mar 2005 20:57:12 -0000 Received: from unknown (HELO sccrmhc13.comcast.net) (204.127.202.64) by sourceware.org with SMTP; 7 Mar 2005 20:57:12 -0000 Received: from [10.0.1.2] (h000393256f12.ne.client2.attbi.com[24.61.199.96]) by comcast.net (sccrmhc13) with SMTP id <2005030720565501600ijs5ce>; Mon, 7 Mar 2005 20:57:11 +0000 User-Agent: Microsoft-Entourage/11.1.0.040913 Date: Mon, 07 Mar 2005 20:57:00 -0000 Subject: RFC: Print the type of a C value in one more case From: Paul Schlie To: Daniel Jacobowitz CC: Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2005-03/txt/msg00093.txt.bz2 > 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 > ... Nice. Certainly more informative than an the present naked value.