* target-memory.c (blocks_to_erase): Correct off-by-one error.
authorDaniel Jacobowitz <drow@false.org>
Thu, 7 Jun 2007 14:24:15 +0000 (14:24 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 7 Jun 2007 14:24:15 +0000 (14:24 +0000)
gdb/ChangeLog
gdb/target-memory.c

index 5743d9ec099bbc2e05ebe008f91c71f527506dbd..b7bdc7b32a397a3d9fdab250a048e560a6e0c43f 100644 (file)
@@ -1,3 +1,7 @@
+2007-06-07  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * target-memory.c (blocks_to_erase): Correct off-by-one error.
+
 2007-06-06  Vladimir Prus  <vladimir@codesourcery.com>
        
        * remote.c (process_g_packet): Don't check size.
index 056440ace9fbe92d4cee52e5dcbe9b78f6ec0a01..cb6acc593a8e53a49066f91ce78460e1166fcbc2 100644 (file)
@@ -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)