PR remote/2158
authorDaniel Jacobowitz <drow@false.org>
Mon, 16 Oct 2006 03:08:37 +0000 (03:08 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 16 Oct 2006 03:08:37 +0000 (03:08 +0000)
* remote.c (remote_write_bytes): Throttle packet alignment
for small packets.

gdb/ChangeLog
gdb/remote.c

index d1f0be776e002225018f7c9a515384ed75d5147f..f16b7b6b261005bb44f27e9f0723e62f3827ebca 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       PR remote/2158
+       * remote.c (remote_write_bytes): Throttle packet alignment
+       for small packets.
+
 2006-10-16  Jeff Johnston  <jjohnstn@redhat.com>
  
        * linux-thread-db.c (thread_db_wait): Don't bother continuing if
index 9a9e94d86f084e2e5394858b0d34bda2296c4687..d8d42f61865cc6606d335019bab284a3c246203e 100644 (file)
@@ -4013,8 +4013,9 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
                                             payload_size);
 
       /* If not all TODO bytes fit, then we'll need another packet.  Make
-        a second try to keep the end of the packet aligned.  */
-      if (nr_bytes < todo)
+        a second try to keep the end of the packet aligned.  Don't do
+        this if the packet is tiny.  */
+      if (nr_bytes < todo && nr_bytes > 2 * REMOTE_ALIGN_WRITES)
        {
          int new_nr_bytes;