From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29246 invoked by alias); 20 Jan 2008 20:28:12 -0000 Received: (qmail 29236 invoked by uid 22791); 20 Jan 2008 20:28:12 -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; Sun, 20 Jan 2008 20:27:44 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1JGglT-0002Xe-Vr for gdb@sources.redhat.com; Sun, 20 Jan 2008 23:27:41 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1JGglJ-0002XQ-VZ; Sun, 20 Jan 2008 23:27:26 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: -var-update using formatted value Date: Sun, 20 Jan 2008 20:28:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb@sources.redhat.com References: <200801201303.29804.ghost@cs.msu.su> <18323.43998.22471.788933@kahikatea.snap.net.nz> In-Reply-To: <18323.43998.22471.788933@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801202327.30376.ghost@cs.msu.su> 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/msg00200.txt.bz2 On Sunday 20 January 2008 23:15:26 Nick Roberts wrote: > > > > I cannot imagine any usecase where the frontend would: > > > > > > > > 1. Change format > > > > 2. Step program > > > > 3. Issue -var-update > > > > > > I'm not sure what point you're making here. Debugging GDB, has variables > > > which contain addresses which are not pointers (so the natural format is > > > decimal), e.g., stack_addr, code_addr components of frames. It makes > > > sense here to: > > > > > > 1. Change format to hexadecimal > > > 2. Step GDB > > > 3. Issue -var-update to see if these values have changed. > > > > What UI-level command does this? And why, after you change format, > > you don't read/display the value in new format? > > Creating a watch expression (in the speedbar, in the case of Emacs) for a frame > related structure would do this. Yes, currently you would need to do > -var-update after 1.. > > Anyway, I withdraw my objection to your patch, if the patch (or similar) in the > thread I mentioned (http://sourceware.org/ml/gdb-patches/2006-05/msg00008.html) > is also approved. So there appears to be some consensus here. FWIW, I agree that the patch in http://sourceware.org/ml/gdb-patches/2006-05/msg00008.html is good, as it removes the need to do -var-evaluate-expression or -var-update after setting variable's format. - Volodya