This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't split executable paths with spaces in into multiple arguments
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jon Beniston <jon at beniston dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 4 Nov 2009 08:17:27 -0800
- Subject: Re: [PATCH] Don't split executable paths with spaces in into multiple arguments
- References: <003c01ca5d52$1715da50$45418ef0$@com>
> gdb/
> 2009-11-04 Jon Beniston <jon@beniston.com>
>
> * remote-sim.c(gdbsim_create_inferior) Quote executable path in case
> it
> contains spaces.
OK. This is not handling the case where the filename contains a double
quote, but it is not making things worse, and double-quotes in filenames
are probably extremely rare.
Just a tiny formatting request: Please add a space before
"(gdbsim_create_inferior)" and make sure that each line does not
exceed 80 character.
> - len = strlen (exec_file) + 1 + strlen (args) + 1 + /*slop */ 10;
> + len = 2 + strlen (exec_file) + 1 + strlen (args) + 1 + /*slop */ 10;
This is not your doing, but the remote-sim code is full of "slop" and
"slack", etc, and I wonder how hard it would be to make it crash due
to not enough "slack" :-(.
--
Joel