From 1fc01e0339a2ffbae943acefdc99dbf3bda68274 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 7 Jun 2007 14:24:15 +0000 Subject: [PATCH] * target-memory.c (blocks_to_erase): Correct off-by-one error. --- gdb/ChangeLog | 4 ++++ gdb/target-memory.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5743d9ec099..b7bdc7b32a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2007-06-07 Daniel Jacobowitz + + * target-memory.c (blocks_to_erase): Correct off-by-one error. + 2007-06-06 Vladimir Prus * remote.c (process_g_packet): Don't check size. diff --git a/gdb/target-memory.c b/gdb/target-memory.c index 056440ace9f..cb6acc593a8 100644 --- a/gdb/target-memory.c +++ b/gdb/target-memory.c @@ -166,7 +166,7 @@ blocks_to_erase (VEC(memory_write_request_s) *written) CORE_ADDR begin, end; block_boundaries (ptr->begin, &begin, 0); - block_boundaries (ptr->end, 0, &end); + block_boundaries (ptr->end - 1, 0, &end); if (!VEC_empty (memory_write_request_s, result) && VEC_last (memory_write_request_s, result)->end >= begin) -- 2.30.2