static void expect (FILE *fp) { int fromlog; int fromgdb; if ((fromlog = logchar (fp)) != ' ') { sync_error (fp, "Sync error during gdb read of leading blank", ' ', fromlog); } do { fromlog = logchar (fp); if (fromlog == EOL) break; fromgdb = gdbchar (remote_desc); if (fromgdb < 0) remote_error ("Error during read from gdb"); } while (fromlog == fromgdb); if (fromlog != EOL) { sync_error (fp, "Sync error during read of gdb packet from log", fromlog, fromgdb); } }
static void expect (FILE *fp) { int fromlog; unsigned char fromgdb; if ((fromlog = logchar (fp)) != ' ') { sync_error (fp, "Sync error during gdb read of leading blank", ' ', fromlog); } do { fromlog = logchar (fp); if (fromlog == EOL) { break; } read (remote_desc, &fromgdb, 1); } while (fromlog == fromgdb); if (fromlog != EOL) { sync_error (fp, "Sync error during read of gdb packet", fromlog, fromgdb); } }
static void play (FILE *fp) { int fromlog; char ch; if ((fromlog = logchar (fp)) != ' ') { sync_error (fp, "Sync error skipping blank during write to gdb", ' ', fromlog); } while ((fromlog = logchar (fp)) != EOL) { ch = fromlog; write (remote_desc, &ch, 1); } }