From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24620 invoked by alias); 29 Jan 2008 23:49:15 -0000 Received: (qmail 24607 invoked by uid 22791); 29 Jan 2008 23:49:13 -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; Tue, 29 Jan 2008 23:48:47 +0000 Received: from kahikatea.snap.net.nz (116.61.255.123.dynamic.snap.net.nz [123.255.61.116]) by viper.snap.net.nz (Postfix) with ESMTP id A1BF53DA57F; Wed, 30 Jan 2008 12:48:44 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 004018FC6D; Wed, 30 Jan 2008 12:48:42 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18335.47960.519547.477953@kahikatea.snap.net.nz> Date: Tue, 29 Jan 2008 23:49:00 -0000 To: Daniel Jacobowitz Cc: Andreas Schwab , Marc Khouzam , gdb@sources.redhat.com Subject: Re: -var-update using formatted value In-Reply-To: <20080129212632.GB17544@caradoc.them.org> References: <6D19CA8D71C89C43A057926FE0D4ADAA04290E1B@ecamlmw720.eamcs.ericsson.se> <18311.60638.724524.220449@kahikatea.snap.net.nz> <20080111225928.GA26360@caradoc.them.org> <18311.65093.38930.103045@kahikatea.snap.net.nz> <20080111235219.GA29698@caradoc.them.org> <18315.589.840507.551878@kahikatea.snap.net.nz> <20080129212632.GB17544@caradoc.them.org> X-Mailer: VM 7.19 under Emacs 23.0.60.5 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/msg00322.txt.bz2 > > > I was suggesting: > > > > > > (gdb) print 0b1101 > > > $1 = 13 > > > > I guess the change below to c-exp.y does that, at least for C. But AFAIK > > 0b is not a recognised prefix for C. > > > the change below to printcmd.c does this. This seems to be consistent with > > existing usage, e.g. in Modula-2 hexadecimals are input like 0FFH but > > output in a lanuage independent way as 0xff. > > Thanks. This is exactly what I meant. If you have time, could you > post this to gdb-patches along with news/manual/testsuite bits? If > not, I'll do it (but no promises when I'll get to it). Both changes, i.e., printcmd.c and c-exp.y? Presumably if the change to c-exp.y is committed, there should be similar changes to ada-exp.y, f-exp.y etc. Does it not matter that this prefix is not part of the underlying language? Also, I think only the change to printcmd.c is necessary to solve Marcs bug report about -var-update. -- Nick http://www.inet.net.nz/~nickrob