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);
return;
/* We should never get here if there isn't something valid in
- udi_session_id. */
+ udi_session_id. */
if (UDIDisconnect (udi_session_id, UDITerminateSession))
- error ("UDIDisconnect() failed in udi_close");
+ {
+ if (quitting)
+ warning ("UDIDisconnect() failed in udi_close");
+ else
+ error ("UDIDisconnect() failed in udi_close");
+ }
/* Do not try to close udi_session_id again, later in the program. */
udi_session_id = -1;
if (UDIDisconnect (udi_session_id, UDIContinueSession))
error ("UDIDisconnect() failed in udi_detach");
- pop_target(); /* calls udi_close to do the real work */
+ /* calls udi_close to do the real work (which looks like it calls
+ UDIDisconnect with UDITerminateSession, FIXME). */
+ pop_target();
+ /* FIXME, message too similar to what udi_close prints. */
if (from_tty)
printf_unfiltered ("Ending remote debugging\n");
}
#endif /* 0 */
/* Keep the target around, e.g. so "run" can do the right thing when
- we are already debugging something. */
+ we are already debugging something. FIXME-maybe: should we kill the
+ TIP with UDIDisconnect using UDITerminateSession, and then restart
+ it on the next "run"? */
inferior_pid = 0;
}