This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Quotes after --args
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Sat, 09 Jun 2012 17:58:36 +0300
- Subject: Re: Quotes after --args
- References: <1339164112.4081.ezmlm@sourceware.org> <20120608142102.302310@gmx.net> <833965voww.fsf@gnu.org> <83bokstv04.fsf@gnu.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sat, 09 Jun 2012 17:33:47 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: bhr2@gmx.de
>
> Any objections to the patch below, which fixes this problem? (I tried
> to minimize uglifying the original sources; if someone sees a better
> way, please tell.)
>
>
> 2012-06-09 Eli Zaretskii <eliz@gnu.org>
>
> * infcmd.c (construct_inferior_arguments) [__MINGW32__]: Quote
> special characters correctly for the Windows shells. See
> http://sourceware.org/ml/gdb/2012-06/msg00047.html for the bug
> report.
>
> --- infcmd.c~0 2012-02-23 10:18:38.000000000 +0200
> +++ infcmd.c 2012-06-09 17:20:57.750500000 +0300
> @@ -275,10 +275,18 @@ construct_inferior_arguments (int argc,
>
> if (STARTUP_WITH_SHELL)
> {
> +#ifdef __MINGW32__
> + /* This holds all the characters considered special to the
> + Windows shells. */
> + char *special = "\"!&*|[]{}<>?`~^=;, \t\n";
> + const char quote = '"';
> +#else
> /* This holds all the characters considered special to the
> typical Unix shells. We include `^' because the SunOS
> /bin/sh treats it as a synonym for `|'. */
> char *special = "\"!#$&*()\\|[]{}<>?'\"`~^; \t\n";
> + const char quote = '\'';
> +#endif
Btw, any idea why the Unix special characters mention the quote "
twice (see above)?