From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23597 invoked by alias); 6 Dec 2002 01:10:22 -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 23590 invoked from network); 6 Dec 2002 01:10:21 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 6 Dec 2002 01:10:21 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18K8t3-0002nL-00; Thu, 05 Dec 2002 21:10:45 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18K713-0007WN-00; Thu, 05 Dec 2002 20:10:53 -0500 Date: Thu, 05 Dec 2002 17:10:00 -0000 From: Daniel Jacobowitz To: Fernando Nasser Cc: Mark Santcroos , gdb@sources.redhat.com Subject: Re: add-symbol-file parsing Message-ID: <20021206011053.GA28778@nevyn.them.org> Mail-Followup-To: Fernando Nasser , Mark Santcroos , gdb@sources.redhat.com References: <20021129105448.GF598@laptop.6bone.nl> <20021203052939.GA22983@nevyn.them.org> <20021203064442.GB598@laptop.6bone.nl> <3DEFF716.2070803@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DEFF716.2070803@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00106.txt.bz2 Mostly as a workaround for this... Which would you prefer - changing add-symbol-file or a more general eval command? What would you think natural to evaluate - just convenience variables? Parsing expressions out of such a thing is hard in the general case. Hmm... we could allow (EXPR), i.e. require the parentheses. Honestly, rather than adding an eval command, I'd prefer to see $var and (EXPR) accepted _everywhere_ the CLI looks for an integer. Some unified functions to parse command lines is all it would take. On Thu, Dec 05, 2002 at 08:02:14PM -0500, Fernando Nasser wrote: > We have been talking of an eval command in another thread that would also > solve this problem. > > eval add-symbol-file /dir/symbol.file $text_addr > > would cause > > add-symbol-file /dir/symbol.file 0xdeadc0de > > to be executed. > > > Fernando > > -- > Fernando Nasser > Red Hat - Toronto E-Mail: > > Mark Santcroos wrote:> Hi Daniel, > > > >On Tue, Dec 03, 2002 at 12:29:39AM -0500, Daniel Jacobowitz wrote: > > > >>The problem is, add-symbol-file takes more than a $text_addr. It also > >>takes a series of -s SECNAME $sec_addr. We could: > >> > >>- split the command line at -s options and parse anything before the > >> next -s option as an expression, assuming people will not foolishly > >> use -s in their expression; > >>- allow only convenience variables > >> > >>Option 2 may be the way to go... What do others think about allowing > >>integer-or-convenience-variable there? > > > > > >Option 2 would at least enable us to do everything. In the worst case you > >would have to add another line to your macro that does the > >expression-to-convinience-variable-translation. > > > >Please let me know if you don't have time and would prefer me to tackle > >this. > > > >Thanks > > > >Mark > > > > > @redhat.com > 2323 Yonge Street, Suite #300 > Toronto, Ontario M4P 2C9 > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer