aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-01-15 04:28:18 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-01-15 04:28:18 +0000
commit831a39d7c397a80b21428a5f0319592d6c9169cc (patch)
tree925dc2b92feea7fe5b8ea1a0dc5c293c0deba4b1 /gdb
parent4c0b3e57c182966e1b33290b97eb284cbdf56aad (diff)
downloadgdb-831a39d7c397a80b21428a5f0319592d6c9169cc.zip
gdb-831a39d7c397a80b21428a5f0319592d6c9169cc.tar.gz
gdb-831a39d7c397a80b21428a5f0319592d6c9169cc.tar.bz2
* remote-udi.c (udi_create_inferior): Quote empty execfile argument.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/remote-udi.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 89bece4..8cdbbe3 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 <sys/wait.h> 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 c51c875..0f667b3 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);