From b20fcd5709c99524f3ec38483a70cf44eb6e2906 Mon Sep 17 00:00:00 2001 From: Manfred Steiner Date: Sun, 27 Nov 2022 18:51:54 +0100 Subject: [PATCH] bugfix gdb (read of last flash location fails) --- simavr/sim/sim_gdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simavr/sim/sim_gdb.c b/simavr/sim/sim_gdb.c index cd2196e..3989fc6 100644 --- a/simavr/sim/sim_gdb.c +++ b/simavr/sim/sim_gdb.c @@ -659,7 +659,7 @@ gdb_handle_command( uint8_t * src = NULL; /* GDB seems to also use 0x1800000 for sram ?!?! */ addr &= 0xffffff; - if (addr < avr->flashend) { + if (addr <= avr->flashend) { src = avr->flash + addr; } else if (addr >= 0x800000 && (addr - 0x800000) <= avr->ramend) { src = avr->data + addr - 0x800000; -- 2.39.5