From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24184 invoked by alias); 21 Dec 2006 15:25:39 -0000 Received: (qmail 24154 invoked by uid 22791); 21 Dec 2006 15:25:34 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 21 Dec 2006 15:25:22 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1GxPnJ-00057C-Hm for gdb-patches@sources.redhat.com; Thu, 21 Dec 2006 18:25:18 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1GxPnE-00056s-AN; Thu, 21 Dec 2006 18:25:12 +0300 From: Vladimir Prus Subject: Re: RFC: MI - Detecting change of string contents with variable objects To: Nick Roberts , gdb-patches@sources.redhat.com Date: Thu, 21 Dec 2006 15:25:00 -0000 References: <17797.65268.689590.797944@kahikatea.snap.net.nz> <17799.3497.476593.138858@kahikatea.snap.net.nz> User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-Id: 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: 2006-12/txt/msg00291.txt.bz2 Nick Roberts wrote: > > Should a varobj always report changed if the way GDB > > would display the value has changed, in which case the special casing > > isn't necessary? > > That's a vary good idea. Here's a revised patch that isn't language > dependent. In addition to detecting string contents changes it detects > when the output > format has changed with -var-set-format. I don't see this as a bad thing > and it means that my patch earlier in the year for including the value > in the output of -var-set-format probably isn't needed. > > It also means that value_contents_equal is not needed any longer, although > I guess there's no harm in keeping it. Why do you need the value_get_print_value function? I think that the right semantic of -var-update is that it returns all such variable objects for which the -var-evaluate-expression will return different value before and after -var-update. -var-evaluate-expression is the only way to get a value of varobj, so we should be using that, not some similar but different function. In order words, why can't you just call varobj_get_value instead of introducing and calling a new function? - Volodya