Refine qemu gdb stub.

This commit is contained in:
Colin 2025-09-22 03:37:21 +00:00
parent b15fc411b3
commit 9b9d9f5e5f
9 changed files with 7 additions and 8 deletions

Binary file not shown.

View File

@ -31,12 +31,5 @@ clean:
qemu: kernel qemu: kernel
qemu-system-riscv64 -machine virt -smp 1 -bios none -kernel $(TEST_OBJ) -nographic -s -S qemu-system-riscv64 -machine virt -smp 1 -bios none -kernel $(TEST_OBJ) -nographic -s -S
# gdb: kernel
# gdb-multiarch \
# -ex "file $(TEST_OBJ)" \
# -ex "set debug remote 1" \
# -ex "target remote localhost:1234" \
gdb: kernel gdb: kernel
gdb-multiarch $(TEST_OBJ) -ex "target remote localhost:1234" gdb-multiarch -x rv.gdb

6
qemu_gdb/rv.gdb Normal file
View File

@ -0,0 +1,6 @@
file ./build/kernel.elf
set architecture riscv:rv64
target remote localhost:1234
set $pc = 0x80000000