From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16297 invoked by alias); 22 Jan 2008 03:53:48 -0000 Received: (qmail 16289 invoked by uid 22791); 22 Jan 2008 03:53:48 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Jan 2008 03:53:28 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D015198375; Tue, 22 Jan 2008 03:53:26 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id A430098022; Tue, 22 Jan 2008 03:53:26 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JHACT-0007Yn-5R; Mon, 21 Jan 2008 22:53:25 -0500 Date: Tue, 22 Jan 2008 03:53:00 -0000 From: Daniel Jacobowitz To: Marc Khouzam Cc: gdb-patches@sources.redhat.com Subject: Re: [Patch] Fix for -var-update to use natural format to compare Message-ID: <20080122035325.GA28748@caradoc.them.org> Mail-Followup-To: Marc Khouzam , gdb-patches@sources.redhat.com References: <6D19CA8D71C89C43A057926FE0D4ADAA2DE0A5@ecamlmw720.eamcs.ericsson.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA2DE0A5@ecamlmw720.eamcs.ericsson.se> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00518.txt.bz2 On Mon, Jan 21, 2008 at 10:24:40PM -0500, Marc Khouzam wrote: > This patch addresses a discussion titled "-var-update using formatted value" from > the GDB mailing list. > It modifies the variable object code to always uses the natural format to compare > old and new values for the -var-update command (one line change). > It also renames the member print_value of varobj to natural_value. I don't think this is an appropriate change. -var-update is supposed to tell when the displayed value has changed. If the value in the current format hasn't changed, there's no need to refetch. It's not about the underlying memory bytes, which is why we changed to a string comparison. There are various other ways to change the underlying variable without updating the representation (e.g. changes in padding bits). I think you've explained this already - probably to me - but could you do it once more, please: why do you want to keep track of the value in all formats? And if you're actually displaying them all simultaneously to the user, why shouldn't they be independent varobjs? -- Daniel Jacobowitz CodeSourcery