static int
remote_start_remote (PTR dummy)
{
- immediate_quit = 1; /* Allow user to interrupt it */
+ immediate_quit++; /* Allow user to interrupt it */
/* Ack any packet which the remote side has already sent. */
SERIAL_WRITE (remote_desc, "+", 1);
get_offsets (); /* Get text, data & bss offsets */
putpkt ("?"); /* initiate a query from remote machine */
- immediate_quit = 0;
+ immediate_quit--;
return remote_start_remote_dummy (dummy);
}
unpush_target (target);
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ if (!remote_dcache)
+ remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ else
+ dcache_invd (remote_dcache);
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)
else
set_thread (pid, 0); /* run this thread */
- dcache_flush (remote_dcache);
+ dcache_invd (remote_dcache);
last_sent_signal = siggnal;
last_sent_step = step;
else
set_thread (pid, 0); /* run this thread */
- dcache_flush (remote_dcache);
+ dcache_invd (remote_dcache);
last_sent_signal = siggnal;
last_sent_step = step;
case '#':
{
unsigned char pktcsum;
+ int check_0 = 0;
+ int check_1 = 0;
buf[bc] = '\0';
- pktcsum = fromhex (readchar (remote_timeout)) << 4;
- pktcsum |= fromhex (readchar (remote_timeout));
+ check_0 = readchar (remote_timeout);
+ if (check_0 >= 0)
+ check_1 = readchar (remote_timeout);
+
+ if (check_0 == SERIAL_TIMEOUT || check_1 == SERIAL_TIMEOUT)
+ {
+ if (remote_debug)
+ fputs_filtered ("Timeout in checksum, retrying\n", gdb_stdlog);
+ return -1;
+ }
+ else if (check_0 < 0 || check_1 < 0)
+ error ("Communication error in checksum");
+ pktcsum = (fromhex (check_0) << 4) | fromhex (check_1);
if (csum == pktcsum)
return bc;
unpush_target (&remote_cisco_ops);
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ if (!remote_dcache)
+ remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ else
+ dcache_invd (remote_dcache);
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)