From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15820 invoked by alias); 19 Jan 2008 22:02:22 -0000 Received: (qmail 15809 invoked by uid 22791); 19 Jan 2008 22:02:21 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 19 Jan 2008 22:01:51 +0000 Received: from kahikatea.snap.net.nz (134.60.255.123.dynamic.snap.net.nz [123.255.60.134]) by viper.snap.net.nz (Postfix) with ESMTP id 241FD3DA37F; Sun, 20 Jan 2008 11:01:44 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 14CDD8FC6D; Sun, 20 Jan 2008 11:01:30 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18322.29497.433089.736851@kahikatea.snap.net.nz> Date: Sat, 19 Jan 2008 22:02:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: -var-update using formatted value In-Reply-To: <200801191405.20336.ghost@cs.msu.su> References: <18319.57428.969644.640540@kahikatea.snap.net.nz> <200801191405.20336.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 23.0.50.33 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/msg00193.txt.bz2 > > 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. -- Nick http://www.inet.net.nz/~nickrob