summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordzwdz2022-10-02 18:47:51 +0200
committerdzwdz2022-10-02 18:47:51 +0200
commit503d9ff758f8b83295830bdfc8c2ea56837d25e5 (patch)
tree7f8217797adfaad0aedeeaa5374d35284408922b
parenta835fa4792fa2afd84d7e27bd242add06763db72 (diff)
fix gdb support
-rw-r--r--.gdbinit4
-rw-r--r--Makefile9
2 files changed, 4 insertions, 9 deletions
diff --git a/.gdbinit b/.gdbinit
index 4340f45..f510efd 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -1,2 +1,2 @@
-file out/fs/boot/kernel.bin
-target remote localhost:1234
+file out/fs/boot/kernel
+target remote localhost:12366
diff --git a/Makefile b/Makefile
index 7428842..a7e096b 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ USER_CFLAGS = $(CFLAGS) -Isrc/user/lib/include/
SPARSEFLAGS = -Wno-non-pointer-null
LFLAGS = -ffreestanding -O2 -nostdlib -lgcc -Wl,-zmax-page-size=4096 -Wl,--no-warn-mismatch
# TODO optimize memory use
-QFLAGS = -no-reboot -m 1g
+QFLAGS = -no-reboot -m 1g -gdb tcp::12366
ifdef NET_DIRECT
QFLAGS += -nic socket,model=rtl8139,connect=:1234,mac=52:54:00:ca:77:1a,id=n1
else
@@ -38,7 +38,7 @@ define from_sources
endef
-.PHONY: all portdeps boot debug lint check clean
+.PHONY: all portdeps boot lint check clean
all: portdeps out/boot.iso check
portdeps: out/libc.a out/libm.a src/user/lib/include/__errno.h
@@ -57,11 +57,6 @@ test: all
@echo
@cat out/qemu.out
-debug: all
- qemu-system-x86_64 -cdrom out/boot.iso $(QFLAGS) -serial stdio -s -S &
- @sleep 1
- gdb
-
check: $(shell find src/kernel/ -type f -name *.c)
@echo $^ | xargs -n 1 sparse $(CFLAGS) $(SPARSEFLAGS)
@tools/linter/main.rb