From cecb9440942182b2d57924d4b358e59d17c4337b Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Sun, 16 Mar 2014 20:46:46 -0500 Subject: [PATCH] gdb: support qOffsets command GDB will ask what offsets should be applied to the the text and data sections. Since AVR is Harvard architecture so we need to apply an offset for one of the regions universally, Atmel documents and uses 0x800000 for RAM so this makes that happen. --- simavr/sim/sim_gdb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simavr/sim/sim_gdb.c b/simavr/sim/sim_gdb.c index 263b245..a9d4c84 100644 --- a/simavr/sim/sim_gdb.c +++ b/simavr/sim/sim_gdb.c @@ -294,7 +294,9 @@ gdb_handle_command( */ gdb_send_reply(g, "1"); break; - } + } else if (strncmp(cmd, "Offsets", 7) == 0) { + gdb_send_reply(g, "Text=0;Data=800000;Bss=800000"); + break; gdb_send_reply(g, ""); break; case '?': -- 2.39.5