summaryrefslogtreecommitdiff
path: root/devel/avr-gdb/files/patch-gdb::remote.c
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2005-05-24 20:02:50 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2005-05-24 20:02:50 +0000
commitd81b26e726dde262fb7854d1a58e4efe60037422 (patch)
tree37bbb00720a5a4356816e1158ca13bbbb408a897 /devel/avr-gdb/files/patch-gdb::remote.c
parentMake sure that bsd.port.pre.mk is included regardless of (diff)
Fix for GDB bug #1948. Internally, this fixes a bad check in
remote_xfer_partial(), notably for AVR-GDB this makes the command "info io_registers" work again.
Notes
Notes: svn path=/head/; revision=136056
Diffstat (limited to 'devel/avr-gdb/files/patch-gdb::remote.c')
-rw-r--r--devel/avr-gdb/files/patch-gdb::remote.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/devel/avr-gdb/files/patch-gdb::remote.c b/devel/avr-gdb/files/patch-gdb::remote.c
new file mode 100644
index 000000000000..b801011ebbde
--- /dev/null
+++ b/devel/avr-gdb/files/patch-gdb::remote.c
@@ -0,0 +1,15 @@
+--- remote.c.orig Sat Nov 6 00:38:25 2004
++++ 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