Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Richard Sharpe <rsharpe@ns.aus.com>
Cc: Andrew Cagney <ac131313@redhat.com>, gdb@sources.redhat.com
Subject: Re: Processing of convenience variables for scripts ...
Date: Wed, 20 Nov 2002 10:36:00 -0000	[thread overview]
Message-ID: <20021120183613.GA24089@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.33.0211210421480.3936-100000@ns.aus.com>

On Thu, Nov 21, 2002 at 04:22:53AM +1030, Richard Sharpe wrote:
> On Wed, 20 Nov 2002, Daniel Jacobowitz wrote:
> 
> > On Wed, Nov 20, 2002 at 11:32:24AM -0500, Andrew Cagney wrote:
> > > >The loop works, but add-symbol-file seems to be called without the 
> > > >>convenience variables being expanded.
> > > >>
> > > >>Have it got that right?
> > > >>
> > > >>If so, what would be the first step to get them expanded?
> > > >
> > > >
> > > >add-symbol-file takes constants, not expressions - so variables are not
> > > >expanded.  This should probably change but it's not clear how, given
> > > >the parser...
> > > 
> > > A quick/dirty hack would be:
> > > 
> > > 	eval .....
> > > 
> > > similar to the SH equivalent.  I suspect an eval will be needed anyway.
> > 
> > Honestly, I'd rather define the CLI grammar I've been talking about
> > than add any more quick hacks.  That's a good 6.0 thing to do, clean up
> > our CLI a little...
> 
> I have a short-term need and a long-term need. 
>  
> I am willing to expend effort on both. Where is the description of this 
> grammar?

In that case, in the short term, it would be worthwhile to implement
eval.  A simple version would just find any individual word that
started with a $ and substitute variables, and end up with something
like "eval add-symbol-file $name $addr".

The long-term grammar is still entirely in my imagination, alas.  It
requires:
  - Examining and recording the syntax of all our existing CLI commands
    (ouch!).  The manual is good but not complete enough IMVHO; people
    add quirks to functions without documenting them.

  - Determining which syntax structures we need to preserve and which
    should go.

  - Parsing CLI lines before calling the assigned functions, according
    to some data registered with the handler function.  This will
    involve changing syntax for at least some commands, I expect.  I
    think it's worthwhile but we need to see how invasive it would be.
    This can be done a bit at a time.

I want to get decode_line_1 tamed a bit first... David has made
astonishing progress cleaning it up, next will be to characterize its
behavior a little better.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-11-20 18:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-20  0:48 Richard Sharpe
2002-11-20  6:13 ` Daniel Jacobowitz
2002-11-20  8:32   ` Andrew Cagney
2002-11-20  8:36     ` Daniel Jacobowitz
2002-11-20  9:28       ` Richard Sharpe
2002-11-20 10:36         ` Daniel Jacobowitz [this message]
2002-11-20 21:40           ` Eli Zaretskii
2002-12-05 16:52           ` Fernando Nasser
2002-12-08 11:36           ` Doug Evans
2002-12-08 12:30             ` Daniel Jacobowitz
2002-12-08 12:52               ` Doug Evans
2002-12-08 11:16   ` Doug Evans
2002-12-08 11:31     ` Richard Sharpe
2002-12-08 12:08       ` eval [was Re: Processing of convenience variables for scripts ...] Doug Evans
2002-12-06  8:30 Processing of convenience variables for scripts Richard Sharpe
2002-12-06  8:41 ` Daniel Jacobowitz
2002-12-06  8:54   ` Fernando Nasser
2002-12-06 11:57     ` Richard Sharpe
2002-12-06 14:53       ` Fernando Nasser
2002-12-06 17:17         ` Daniel Jacobowitz
2002-12-07  8:50   ` Richard Sharpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021120183613.GA24089@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=rsharpe@ns.aus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox