2000-10-13 Fernando Nasser <fnasser@cygnus.com>
authorFernando Nasser <fnasser@redhat.com>
Fri, 13 Oct 2000 21:41:21 +0000 (21:41 +0000)
committerFernando Nasser <fnasser@redhat.com>
Fri, 13 Oct 2000 21:41:21 +0000 (21:41 +0000)
* remote.c (putpkt_binary): Call read_frame, not getpkt. Log message.
(read_frame): Do not call error() on communication error when
reading checksum, but return failure instead and log message.

gdb/ChangeLog
gdb/remote.c

index 9614491ca09aab68a5ab40459cf6af107add2aba..201c57c5abac0b93cc4dd0fc75d20c4ba1aad824 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-13  Fernando Nasser  <fnasser@cygnus.com>
+
+       * remote.c (putpkt_binary): Call read_frame, not getpkt. Log message.
+       (read_frame): Do not call error() on communication error when
+       reading checksum, but return failure instead and log message.
+
 2000-10-13  Fernando Nasser  <fnasser@totem.to.cygnus.com>
 
        * varobj.c (type_changeable): Arrays are not changeable.
index b58911ce58acc635af721338f84f14dd8582e1f5..de993640b49096ef801e445217118da9a35bb51c 100644 (file)
@@ -3796,9 +3796,11 @@ putpkt_binary (char *buf, int cnt)
              break;            /* Retransmit buffer */
            case '$':
              {
+               if (remote_debug)
+                 fprintf_unfiltered (gdb_stdlog, "Packet instead of Ack, ignoring it\n");
                /* It's probably an old response, and we're out of sync.
                   Just gobble up the packet and ignore it.  */
-               getpkt (junkbuf, sizeof_junkbuf, 0);
+               read_frame (junkbuf, sizeof_junkbuf);
                continue;       /* Now, go look for + */
              }
            default:
@@ -3887,7 +3889,11 @@ read_frame (char *buf,
                return -1;
              }
            else if (check_0 < 0 || check_1 < 0)
-             error ("Communication error in checksum");
+             {
+               if (remote_debug)
+                 fputs_filtered ("Communication error in checksum\n", gdb_stdlog);
+               return -1;
+             }
 
            pktcsum = (fromhex (check_0) << 4) | fromhex (check_1);
            if (csum == pktcsum)
This page took 0.032223 seconds and 4 git commands to generate.