Commit cecb9440942182b2d57924d4b358e59d17c4337b
authorDoug Goldstein <cardoe@cardoe.com>
Mon, 17 Mar 2014 01:46:46 +0000 (20:46 -0500)
committerDoug Goldstein <cardoe@cardoe.com>
Tue, 18 Mar 2014 01:19:01 +0000 (20:19 -0500)
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

index 263b245116e53d8be5b63b1e27aa8fafa47a8d7d..a9d4c84489f3de1e206c445439c1780956a7b14c 100644 (file)
@@ -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 '?':