From: drow Date: Mon, 16 Oct 2006 03:08:36 +0000 (+0000) Subject: PR remote/2158 X-Git-Tag: drop_9x_support_start~1466 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0612c39c46deb70ae8a78c45765fe0169a294433;p=pf3gnuchains%2Fpf3gnuchains4x.git PR remote/2158 * remote.c (remote_write_bytes): Throttle packet alignment for small packets. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d1f0be776e..f16b7b6b26 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2006-10-15 Daniel Jacobowitz + + PR remote/2158 + * remote.c (remote_write_bytes): Throttle packet alignment + for small packets. + 2006-10-16 Jeff Johnston * linux-thread-db.c (thread_db_wait): Don't bother continuing if diff --git a/gdb/remote.c b/gdb/remote.c index 9a9e94d86f..d8d42f6186 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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;