From d81b26e726dde262fb7854d1a58e4efe60037422 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Tue, 24 May 2005 20:02:50 +0000 Subject: [PATCH] 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. --- devel/avr-gdb/Makefile | 1 + devel/avr-gdb/files/patch-gdb::remote.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 devel/avr-gdb/files/patch-gdb::remote.c diff --git a/devel/avr-gdb/Makefile b/devel/avr-gdb/Makefile index 0b4e7ee4f732..acb51222493d 100644 --- a/devel/avr-gdb/Makefile +++ b/devel/avr-gdb/Makefile @@ -7,6 +7,7 @@ PORTNAME= gdb PORTVERSION= 6.3 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEWARE} MASTER_SITE_SUBDIR= gdb/releases 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