From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22302 invoked by alias); 11 Jan 2008 17:40:26 -0000 Received: (qmail 22258 invoked by uid 22791); 11 Jan 2008 17:40:25 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jan 2008 17:40:05 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JDNrO-0004Pp-6L for gdb@sources.redhat.com; Fri, 11 Jan 2008 17:40:02 +0000 Received: from 77.246.241.246 ([77.246.241.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jan 2008 17:40:02 +0000 Received: from ghost by 77.246.241.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jan 2008 17:40:02 +0000 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: -var-update using formatted value Date: Fri, 11 Jan 2008 17:40:00 -0000 Message-ID: References: <6D19CA8D71C89C43A057926FE0D4ADAA04290E13@ecamlmw720.eamcs.ericsson.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.5 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: 2008-01/txt/msg00070.txt.bz2 Marc Khouzam wrote: > Hello, > > I've been using varObject for a three or four months now and I noticed > something weird with -var-update. -var-update is supposed to show > variables that have changed since the last -var-udpate, correct? It does > not seem to work in this case: ... > As you might guess, the reason for this is that the binary value of var1 > (11 in binary) when doing -var-udpate is the same as the natural value of > var1 (11 in decimal) of the previous -var-udpate (var-create in this > case.) > > I believe this behaviour was introduced in version 1.75 of varobj.c in > install_new_value(), where instead of comparing value contents, it now > compares printed values. I'm sure there was a good reason to compare > printed values, but was this side-effect known? I don't think this side-effect is known, at least it was not discussed. I think this is actually a bug -- we should update stored value when changing format. Nick, what do you think? > Another issue with comparing printed values in -var-update is that if a > front-end wants to know if a variable object memory -really- changed, it > should perform the -var-udpate using the same format every time, or else > var-update will show a change although it is just the format that changed. > But maybe that is what was meant for -var-update to do? Why do you need "is it really changed" query? - Volodya