From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12220 invoked by alias); 17 Mar 2006 08:31:45 -0000 Received: (qmail 12210 invoked by uid 22791); 17 Mar 2006 08:31:44 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Mar 2006 08:31:42 +0000 Received: from kahikatea.snap.net.nz (p202-124-115-167.snap.net.nz [202.124.115.167]) by viper.snap.net.nz (Postfix) with ESMTP id 599D37472A6; Fri, 17 Mar 2006 21:31:37 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id CBE4188E8; Fri, 17 Mar 2006 21:30:13 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17434.29587.870198.135084@kahikatea.snap.net.nz> Date: Fri, 17 Mar 2006 10:20:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: Remove type prefix for -var-evaluate-expression/functions Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00221.txt.bz2 > Hi, > the following patch removes 'type prefix' from output of > -var-evaluate-expression applied to objects of function type (not pointers > to functions, but functions). > > It causes no regression in the testsuite for me. But I guess a new test would help prevent a regression (in the code) in the future. > Changelog: > > 2006-03-15 Vladimir Prus > > * c-valprint.c > (c_val_print): Don't print type prefix for functions. > (c_value_print): Print type prefix for functions here. > Patch attached. ... > + if (TYPE_CODE (type) == TYPE_CODE_FUNC) This condition must always be true here (case TYPE_CODE_FUNC:). > + { > + /* FIXME, we should consider, at least for ANSI C language, eliminating > + the distinction made between FUNCs and POINTERs to FUNCs. */ > + fprintf_filtered (stream, "{"); > + type_print (type, "", stream, -1); > + fprintf_filtered (stream, "} "); > + } > + > + > if (objectprint && (TYPE_CODE (type) == TYPE_CODE_CLASS)) > { > /* Attempt to determine real type of object */ Where's the patch for c_value_print? -- Nick http://www.inet.net.nz/~nickrob PS As Jason Molenda suggested to me, if you put "diff -p" in your it will add the name of the function at the top of each hunk which makes it easier for others to read.