* remote-udi.c (udi_create_inferior): Quote empty execfile argument.
This commit is contained in:
parent
4c0b3e57c1
commit
831a39d7c3
|
@ -1,5 +1,7 @@
|
||||||
Fri Jan 14 21:55:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
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".
|
* 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)
|
Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
|
@ -150,7 +150,19 @@ udi_create_inferior (execfile, args, env)
|
||||||
|
|
||||||
args1 = alloca (strlen(execfile) + strlen(args) + 2);
|
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, " ");
|
||||||
strcat (args1, args);
|
strcat (args1, args);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue