summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Yedidia <zyedidia@gmail.com>2022-05-03 15:56:41 -0700
committerZachary Yedidia <zyedidia@gmail.com>2022-05-03 15:56:41 -0700
commit4413faf9fbb97aa20b5cddf25aee83dabcea6612 (patch)
tree1a3c252a1191a3403b27f77bb3cb687315b17385
parentc987e428d62e95bf39685dfa6c1633d9c9291f38 (diff)
Add qemu-gdb target
-rw-r--r--defs.mk1
-rw-r--r--prog/hello/Makefile4
2 files changed, 5 insertions, 0 deletions
diff --git a/defs.mk b/defs.mk
index 9890561..3af93bd 100644
--- a/defs.mk
+++ b/defs.mk
@@ -9,6 +9,7 @@ OBJDUMP = $(PREFIX)-objdump
QEMU = qemu-system-arm
BOARD = raspi1ap
+GDB = gdb-multiarch
LIBGCC = $(shell $(CC) --print-file-name=libgcc.a)
diff --git a/prog/hello/Makefile b/prog/hello/Makefile
index 72c9b00..0a45280 100644
--- a/prog/hello/Makefile
+++ b/prog/hello/Makefile
@@ -29,4 +29,8 @@ format:
qemu: $(PROG).elf
$(QEMU) -M $(BOARD) -nographic -kernel $< -serial null -serial mon:stdio -no-reboot
+qemu-gdb: $(PROG).elf
+ $(QEMU) -s -S -M $(BOARD) -nographic -kernel $< -serial null -serial mon:stdio -no-reboot &
+ $(GDB) -x start.gdb
+
.PHONY: format clean all install qemu
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback