From 831a39d7c397a80b21428a5f0319592d6c9169cc Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Sat, 15 Jan 1994 04:28:18 +0000 Subject: [PATCH] * remote-udi.c (udi_create_inferior): Quote empty execfile argument. --- gdb/ChangeLog | 2 ++ gdb/remote-udi.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 89bece44fda..8cdbbe32db2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 not "/usr/include/wait.h". Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com) diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c index c51c8750526..0f667b3aab3 100644 --- a/gdb/remote-udi.c +++ b/gdb/remote-udi.c @@ -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); -- 2.30.2