This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Allow '!' in program paths
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Klee Dienes <kdienes at apple dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 09 Mar 2002 22:12:07 -0500
- Subject: Re: [RFC] Allow '!' in program paths
- References: <F7C3F3F9-1B5B-11D6-8F8D-0030653FA4C6@apple.com>
Dig dig. Yes, thanks (sorry for the delay).
Andrew
> 2002-02-06 Klee Dienes <klee@apple.com>
>
> * fork-inferior.c (fork_inferior): Add '!' to the list of
> characters that need to be quoted when building a string for the
> shell. Quote '!' specifically with a backslash, since CSH chokes
> when trying to evaluate "str!str".
>
> Index: fork-child.c
> ===================================================================
> RCS file: /cvs/Darwin/Commands/GNU/cygnus/src/gdb/fork-child.c,v
> retrieving revision 1.9
> diff -u -r1.9 fork-child.c
> --- fork-child.c 2001/11/29 00:18:44 1.9
> +++ fork-child.c 2002/02/06 22:53:11
> @@ -204,6 +204,7 @@
> switch (*p)
> {
> case '\'':
> + case '!':
> case '"':
> case '(':
> case ')':
> @@ -235,6 +236,8 @@
> {
> if (*p == '\'')
> strcat (shell_command, "'\\''");
> + else if (*p == '!')
> + strcat (shell_command, "\\!");
> else
> strncat (shell_command, p, 1);
> }
>