summaryrefslogtreecommitdiff
path: root/devel/avr-gdb/files/patch-gdb::remote.c
blob: 9c94e5b952d64f07c6b0a382ee08c0bac99a74c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- gdb/remote.c.orig	Sat Nov  6 00:38:25 2004
+++ gdb/remote.c	Tue May 24 21:34:59 2005
@@ -4895,8 +4895,10 @@
 	return -1;
     }
 
-  /* Only handle reads.  */
-  if (writebuf != NULL || readbuf == NULL)
+  /* Only handle reads.  Zero OFFSET and LENGTH is just a size
+   * query only, so allow it anyway.  */
+  if ((writebuf != NULL || readbuf == NULL) &&
+      !(offset == 0 && len == 0))
     return -1;
 
   /* Map pre-existing objects onto letters.  DO NOT do this for new