This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] usage of environment variable from the command line
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: denis dot pilat at st dot com, gdb-patches at sourceware dot org
- Date: Sat, 22 Sep 2007 09:16:38 +0200
- Subject: Re: [RFC] usage of environment variable from the command line
- References: <46F13F2A.8010507@st.com> <20070921225527.GA28500@caradoc.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 21 Sep 2007 18:55:27 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sourceware.org
>
> I think that syntax is really ugly :-(
Yes, because it comes from the DOS/Windows shell syntax. I don't
think we should use it, as it makes trouble even in the Windows shell.
> Before we go ahead with this can anyone think of a better one that
> won't conflict with source language expressions?
How about env("FOO") ? Or maybe $env("FOO"), to avoid a possibility
that the debuggee has a real function by the name of `env'?
> Another problem is escaping. Right now, you're supposed to be able to
> give either quoted strings or raw text to most commands (it
> varies, I posted a summary a while back). Front ends won't know how
> to escape the string if you have e.g. %% in your $PWD or want to
> print a string containing %%.
The above suggestion solves this problem as well, I think.