From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10424 invoked by alias); 27 Feb 2003 14:40:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10413 invoked from network); 27 Feb 2003 14:40:24 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 27 Feb 2003 14:40:24 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18oR6C-0003my-00; Thu, 27 Feb 2003 10:41:33 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18oPCw-0000yD-00; Thu, 27 Feb 2003 09:40:22 -0500 Date: Thu, 27 Feb 2003 14:40:00 -0000 From: Daniel Jacobowitz To: "Fyles, Matthew" Cc: gdb@sources.redhat.com Subject: Re: String handling in GDB command language variables Message-ID: <20030227144022.GA3707@nevyn.them.org> Mail-Followup-To: "Fyles, Matthew" , gdb@sources.redhat.com References: <9FF3133289A7A84E81E2ED8F5E56B379537DB7@sh-uk-ex01.uk.w2k.superh.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9FF3133289A7A84E81E2ED8F5E56B379537DB7@sh-uk-ex01.uk.w2k.superh.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00581.txt.bz2 On Thu, Feb 27, 2003 at 02:35:38PM -0000, Fyles, Matthew wrote: > When not connected to any target is it possible to store a string value > in a convenience variable. > > i.e > > sh-superh-elf-gdb -nw > GNU gdb 5.2.1 > Copyright 2002 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "--host=i686-pc-linux-gnu > --target=sh-superh-elf". > (gdb) set $test=1 > (gdb) print $test > $1 = 1 > (gdb) set $test="hello" > evaluation of this expression requires the target program to be active > (gdb) > > can a convenience variable be made to be a string type within the > command language? The command language always mimics the current source language being debugged, defaulting to C; C doesn't have a string type. That's the historical justification anyway. If there's a consensus that a string type would be useful, it could probably be done. I think it might be a good idea; we could use strings for arguments to gdb commands, etc. However I'm not sure of the syntax. Anyone else out there have an opinion? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer