From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10268 invoked by alias); 20 Jan 2008 10:04:12 -0000 Received: (qmail 10259 invoked by uid 22791); 20 Jan 2008 10:04:11 -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 10:03:44 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1JGX1b-00014w-Tb for gdb@sources.redhat.com; Sun, 20 Jan 2008 13:03: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 1JGX1T-00014j-1T; Sun, 20 Jan 2008 13:03:27 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: -var-update using formatted value Date: Sun, 20 Jan 2008 10:04:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb@sources.redhat.com References: <200801191405.20336.ghost@cs.msu.su> <18322.29497.433089.736851@kahikatea.snap.net.nz> In-Reply-To: <18322.29497.433089.736851@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: <200801201303.29804.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/msg00197.txt.bz2 On Sunday 20 January 2008 01:01:29 Nick Roberts wrote: > > > I don't like this change. If I change the format to hexadecimal, 11 -> 0xb > > > say, the display should change, so I would like GDB to report it through > > > -var-update. > > > > Why? It seems to me that if user does "change format" in UI, then UI should: > > > > 1. Change format > > 2. Display the value shown according to the new format > > In this case, GDB needs to print the value of the new format. I did submit a > patch to do this in the thread: > > http://sourceware.org/ml/gdb-patches/2006-05/msg00008.html > > but it never got approved. I've now configured Emacs (but can revert) for > current behaviour. > > > > 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? - Volodya