* remote-udi.c (udi_create_inferior): Quote empty execfile argument.

This commit is contained in:
Jim Kingdon 1994-01-15 04:28:18 +00:00
parent 4c0b3e57c1
commit 831a39d7c3
2 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Fri Jan 14 21:55:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* remote-udi.c (udi_create_inferior): Quote empty execfile argument.
* gdbserver/low-lynx.c: Include <sys/wait.h> not "/usr/include/wait.h".
Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)

View File

@ -150,7 +150,19 @@ udi_create_inferior (execfile, args, env)
args1 = alloca (strlen(execfile) + strlen(args) + 2);
strcpy (args1, execfile);
if (execfile[0] == '\0')
/* It is empty. We need to quote it somehow, or else the target
will think there is no argument being passed here. According
to the UDI spec it is quoted "according to TIP OS rules" which
I guess means quoting it like the Unix shell should work
(sounds pretty bogus to me...). In fact it doesn't work (with
isstip anyway), but passing in two quotes as the argument seems
like a reasonable enough behavior anyway (I guess). */
strcpy (args1, "''");
else
strcpy (args1, execfile);
strcat (args1, " ");
strcat (args1, args);