From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13771 invoked by alias); 6 Dec 2002 16:41:40 -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 13749 invoked from network); 6 Dec 2002 16:41:39 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 6 Dec 2002 16:41:39 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18KNQB-0001M5-00; Fri, 06 Dec 2002 12:41:55 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18KLYM-0007FK-00; Fri, 06 Dec 2002 11:42:14 -0500 Date: Fri, 06 Dec 2002 08:41:00 -0000 From: Daniel Jacobowitz To: Richard Sharpe Cc: gdb@sources.redhat.com Subject: Re: Processing of convenience variables for scripts ... Message-ID: <20021206164214.GA27660@nevyn.them.org> Mail-Followup-To: Richard Sharpe , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00118.txt.bz2 On Fri, Dec 06, 2002 at 08:57:07AM -0800, Richard Sharpe wrote: > Hi, > > In looking at this issue, it seems that much of the existing code that > deals with variables is centered around printing: > > value_print (var->value, gdb_stdout, 0, Val_pretty_default); > > While it seems that I could mess with providing new functions for a stream > structure that I could retrieve strings from, is there a simpler way. > > I envision something like > > var1 = value_to_string (var->value); > > And then construct a new command, and pass it through the standard routine > that processes commands. > > However, it seems that things are not that simple :-) You're looking in the wrong place, I'd say. Look in parse.c for the call to: lookup_internalvar (copy_name (str) + 1) That said, I'm not worried about implementing this as much as I am designing what it "ought" to look like. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer