+Mon Sep 13 16:06:43 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
+
+ * remote.c: Define remote_debug to 0 and #if 0 baud_rate. Temporary
+ hack so this file compiles again.
+
+ * remote-utils.c (gr_multi_scan): Cast return value from alloca.
+ (gr_multi_scan): #if 0 never-reached return(-1).
+
+ * remote-udi.c (udi_wait): Return inferior_pid not 0.
+
Mon Sep 13 14:14:35 1993 K. Richard Pixley (rich@sendai.cygnus.com)
Collect some remote things into remote-utils.
int icache;
#endif
+/* FIXME: This is a hack which lets this file compile. It should be getting
+ this setting from remote-utils.c. */
+#define remote_debug (0)
+
/* Descriptor for I/O to remote machine. Initialize it to NULL so that
remote_open knows that we don't have a file open when the program
starts. */
if (!remote_desc)
perror_with_name (name);
+#if 0
+ /* FIXME: This should be using remote-utils.c. */
if (baud_rate)
{
int rate;
perror_with_name (name);
}
}
+#endif
SERIAL_RAW (remote_desc);
return 0;
}
+/* Number of bytes of registers this stub implements. */
+static int register_bytes_found;
+
/* Read the remote registers into the block REGS. */
/* Currently we just read all the registers, so we don't use regno. */
/* ARGSUSED */
sprintf (buf, "g");
remote_send (buf);
+ /* Unimplemented registers read as all bits zero. */
+ memset (regs, 0, REGISTER_BYTES);
+
/* Reply describes registers byte by byte, each byte encoded as two
hex characters. Suck them all up, then supply them to the
register cacheing/storage mechanism. */
p = buf;
for (i = 0; i < REGISTER_BYTES; i++)
{
- if (p[0] == 0 || p[1] == 0)
- error ("Remote reply is too short: %s", buf);
+ if (p[0] == 0)
+ break;
+ if (p[1] == 0)
+ {
+ warning ("Remote reply is of odd length: %s", buf);
+ /* Don't change register_bytes_found in this case, and don't
+ print a second warning. */
+ goto supply_them;
+ }
regs[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
p += 2;
}
+
+ if (i != register_bytes_found)
+ {
+ register_bytes_found = i;
+#ifdef REGISTER_BYTES_OK
+ if (!REGISTER_BYTES_OK (i))
+ warning ("Remote reply is too short: %s", buf);
+#endif
+ }
+
+ supply_them:
for (i = 0; i < NUM_REGS; i++)
supply_register (i, ®s[REGISTER_BYTE(i)]);
}
each byte encoded as two hex characters. */
p = buf + 1;
- for (i = 0; i < REGISTER_BYTES; i++)
+ /* remote_prepare_to_store insures that register_bytes_found gets set. */
+ for (i = 0; i < register_bytes_found; i++)
{
*p++ = tohex ((registers[i] >> 4) & 0xf);
*p++ = tohex (registers[i] & 0xf);