From: Doug Goldstein Date: Mon, 17 Mar 2014 01:46:46 +0000 (-0500) Subject: gdb: support qOffsets command X-Git-Tag: v1.2~8^2~1 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=cecb9440942182b2d57924d4b358e59d17c4337b;p=sx%2Fsimavr.git 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. --- 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 '?':