This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't split executable paths with spaces in into multiple arguments


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]