diff options
| author | Tianhao Wang <shrik3@mailbox.org> | 2024-06-04 17:53:37 +0200 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:17:12 +0200 |
| commit | b3b486c868353f8d6f56739529978042ba939e09 (patch) | |
| tree | 398f775b8e0eb759f8b98149c109c1ca95a8cad7 | |
| parent | 4bce609d2a0145e70f44227636a68348e9b23cf9 (diff) | |
debug: add basic setup for qemu/gdb
| -rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -95,6 +95,12 @@ clean: qemu: bootdisk.iso qemu-system-x86_64 -drive file=./bootdisk.iso,format=raw -k en-us +gdb: + gdb -x /tmp/gdbcommands.$(shell id -u) build/kernel + +qemu-gdb: bootdisk.iso + @echo "target remote localhost:$(shell echo $$(( $$(id -u) % (65536 - 1024) + 1024 )))" > /tmp/gdbcommands.$(shell id -u) + @qemu-system-x86_64 -drive file=bootdisk.iso,format=raw -k en-us -S -gdb tcp::$(shell echo $$(( $$(id -u) % (65536 - 1024) + 1024 ))) test: @echo "---BUILD DIR---" |
