aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-10-16 03:08:37 +0000
committerDaniel Jacobowitz <drow@false.org>2006-10-16 03:08:37 +0000
commit9b7194bcb482ef2f8e6e94af3cec282b0a4599d2 (patch)
tree6a895c1741502a1abf80dda9e6f96958cccc34be /gdb/remote.c
parentc88c804ea497754174762aaf47f15e0fac231d05 (diff)
downloadgdb-9b7194bcb482ef2f8e6e94af3cec282b0a4599d2.zip
gdb-9b7194bcb482ef2f8e6e94af3cec282b0a4599d2.tar.gz
gdb-9b7194bcb482ef2f8e6e94af3cec282b0a4599d2.tar.bz2
PR remote/2158
* remote.c (remote_write_bytes): Throttle packet alignment for small packets.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 9a9e94d..d8d42f6 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;