diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-25 04:49:34 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-25 04:49:34 +0000 |
commit | 87237c525021b7e15873d2c66ae5e20fa5823776 (patch) | |
tree | 0ad7db5232a060af08885729ef09396bd3422bba /gdb/remote-udi.c | |
parent | 2fd0e26cde9a535451a96e4133d3cab241cdbe92 (diff) | |
download | gdb-87237c525021b7e15873d2c66ae5e20fa5823776.zip gdb-87237c525021b7e15873d2c66ae5e20fa5823776.tar.gz gdb-87237c525021b7e15873d2c66ae5e20fa5823776.tar.bz2 |
* 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'.
Diffstat (limited to 'gdb/remote-udi.c')
-rw-r--r-- | gdb/remote-udi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c index 10cb87c..54a6197 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 |