From: Jim Kingdon Date: Sun, 25 Apr 1993 04:49:34 +0000 (+0000) Subject: * Changes from (or inspired by) AMD: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87237c525021b7e15873d2c66ae5e20fa5823776;p=binutils-gdb.git * Changes from (or inspired by) AMD: * remote-udi.c (udi_attach): Assignments to Space and Offset were switched, fix it. (udi_wait): Make error message (UDIGetStdout) match error. (udi_wait): Handle UDIStdinNeeded. * command.c [CANT_FORK]: Use system(). * utils.c (prompt_for_continue): Allow quit with 'q'. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8c96318995a..7d4318cb3c7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ Sat Apr 24 19:59:54 1993 Jim Kingdon (kingdon@cygnus.com) + * Changes from (or inspired by) AMD: + * remote-udi.c (udi_attach): Assignments to Space and Offset were + switched, fix it. + (udi_wait): Make error message (UDIGetStdout) match error. + (udi_wait): Handle UDIStdinNeeded. + * command.c [CANT_FORK]: Use system(). + * utils.c (prompt_for_continue): Allow quit with 'q'. + * solib.c (solib_add): Don't call special_symbol_handling if there were errors in symbol_add_stub. Also set so->from_tty before calling symbol_add_stub. diff --git a/gdb/command.c b/gdb/command.c index 4eac4a666f0..dc5a92f5712 100644 --- a/gdb/command.c +++ b/gdb/command.c @@ -1163,13 +1163,17 @@ cmd_show_list (list, from_tty, prefix) } } -#ifndef CANT_FORK /* ARGSUSED */ static void shell_escape (arg, from_tty) char *arg; int from_tty; { +#ifdef CANT_FORK + /* FIXME: what about errors (I don't know how GO32 system() handles + them)? */ + system (arg); +#else /* Can fork. */ int rc, status, pid; char *p, *user_shell; @@ -1198,10 +1202,9 @@ shell_escape (arg, from_tty) ; else error ("Fork failed"); +#endif /* Can fork. */ } -#endif -#ifndef CANT_FORK static void make_command (arg, from_tty) char *arg; @@ -1220,7 +1223,6 @@ make_command (arg, from_tty) shell_escape (p, from_tty); } -#endif static void show_user_1 (c, stream) @@ -1273,15 +1275,11 @@ show_user (args, from_tty) void _initialize_command () { -#ifndef CANT_FORK add_com ("shell", class_support, shell_escape, "Execute the rest of the line as a shell command. \n\ With no arguments, run an inferior shell."); -#endif -#ifndef CANT_FORK add_com ("make", class_support, make_command, "Run the ``make'' program using the rest of the line as arguments."); -#endif add_cmd ("user", no_class, show_user, "Show definitions of user defined commands.\n\ Argument is the name of the user defined command.\n\ diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c index 10cb87c671e..54a61972a0a 100644 --- a/gdb/remote-udi.c +++ b/gdb/remote-udi.c @@ -405,8 +405,8 @@ udi_attach (args, from_tty) printf ("Attaching to remote program %s...\n", prog_name); UDIStop(); - From.Space = 11; - From.Offset = UDI29KSpecialRegs; + From.Space = UDI29KSpecialRegs; + From.Offset = 11; if (err = UDIRead(From, &PC_adds, Count, Size, &CountDone, HostEndian)) error ("UDIRead failed in udi_attach"); printf ("Remote process is now halted, pc1 = 0x%x.\n", PC_adds); @@ -494,7 +494,7 @@ udi_wait (status) { case UDIStdoutReady: if (UDIGetStdout (sbuf, (UDISizeT)SBUF_MAX, &CountDone)) - error ("UDIGetStdin() failed in udi_wait"); + error ("UDIGetStdout() failed in udi_wait"); fwrite (sbuf, 1, CountDone, stdout); fflush(stdout); continue; @@ -504,8 +504,9 @@ udi_wait (status) fflush(stderr); continue; case UDIStdinNeeded: - printf("DEBUG: stdin requested ... continue\n"); - /* UDIPutStdin(sbuf, (UDISizeT)i, &CountDone); */ + scanf ("%s", sbuf); + i = strlen (sbuf); + UDIPutStdin (sbuf, (UDISizeT)i, &CountDone); continue; case UDIRunning: /* In spite of the fact that we told UDIWait to wait forever, it will