Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@codesourcery.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	denis.pilat@st.com, 	gdb-patches@sourceware.org
Subject: Re: [RFC] usage of environment variable from the command line
Date: Sun, 30 Sep 2007 01:30:00 -0000	[thread overview]
Message-ID: <20070930012955.GA29254@caradoc.them.org> (raw)
In-Reply-To: <m3odfst3n9.fsf@codesourcery.com>

On Mon, Sep 24, 2007 at 09:43:54AM -0700, Jim Blandy wrote:
> I think we want it in both places.  In general, the syntax for
> substituting such variables into source-language expressions would
> need to be language-specific to avoid changing the meaning of any
> normal expression.  So that would need to be done on a
> language-by-language basis.
> 
> For the other cases, this is bikesheddy of me, but why not simply
> ${HOME}, braces required?

I don't want to use something as generic as ${} for Unix environment
variables, because we might want a more general expansion.

Why not define ${...}, or something similar, to do textual expansion
before the language parsers get to it?  Then I also have a patch I
can submit to let us define string variables more usefully; we can
substitute them in without quotes in this context, and so use them
for filenames.

If we pick the syntax cleverly we can use it to call scripting
language functions too.  Although sometimes I'd want those to produce
GDB "struct value" rather than a text string, so we'd still need
both...

Yes, there's lots of quoting issues doing it this way.  I'd want a
more formal specification of when this expansion happened and what it
produced before we did it.  It should probably be specific to the CLI
interpreter and not happen to MI input (excluding interpreter-exec of
course).

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2007-09-30  1:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 15:24 Denis PILAT
2007-09-21 22:55 ` Daniel Jacobowitz
2007-09-22  7:16   ` Eli Zaretskii
2007-09-22 13:58     ` Daniel Jacobowitz
2007-09-24 15:05       ` Denis PILAT
2007-09-24 16:44       ` Jim Blandy
2007-09-24 21:41         ` Eli Zaretskii
2007-09-25 17:11           ` Jim Blandy
2007-09-25 21:38             ` Eli Zaretskii
2007-09-30  1:30         ` Daniel Jacobowitz [this message]
2007-09-30  7:17           ` Eli Zaretskii
2007-10-11 17:51             ` Daniel Jacobowitz
2007-12-21 15:31             ` Denis PILAT
2007-12-22 19:27               ` Eli Zaretskii

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=20070930012955.GA29254@caradoc.them.org \
    --to=drow@false.org \
    --cc=denis.pilat@st.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jimb@codesourcery.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