From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24242 invoked by alias); 3 Jan 2007 22:46:16 -0000 Received: (qmail 24233 invoked by uid 22791); 3 Jan 2007 22:46:15 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 03 Jan 2007 22:46:10 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H2Es1-00079F-Ow; Wed, 03 Jan 2007 17:46:05 -0500 Date: Wed, 03 Jan 2007 22:46:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: RFC: MI - Detecting change of string contents with variable objects Message-ID: <20070103224605.GO17935@nevyn.them.org> Mail-Followup-To: Nick Roberts , Vladimir Prus , gdb-patches@sources.redhat.com References: <17797.65268.689590.797944@kahikatea.snap.net.nz> <17798.19683.251190.740216@kahikatea.snap.net.nz> <200612181136.02429.ghost@cs.msu.su> <20061218133827.GA24800@nevyn.them.org> <17799.3497.476593.138858@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17799.3497.476593.138858@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-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: 2007-01/txt/msg00090.txt.bz2 On Tue, Dec 19, 2006 at 10:52:41AM +1300, Nick Roberts wrote: > 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. Sounds good. I generally agree with Vladimir about reusing c_value_of_variable, however. I believe it is as simple as: - Passing a struct value *. - Always returning NULL if there is no value, instead of doing the struct and array special cases first. - Using value_type to get the type code and the number of children. - Probably calling value_fetch_lazy first when passing it the new value, to avoid the assertions. Let me know if you want me to try that myself. -- Daniel Jacobowitz CodeSourcery