We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2655b40 commit ed5cea0Copy full SHA for ed5cea0
Makefile
@@ -123,10 +123,17 @@ QEMUGDB = $(shell if $(QEMU) -help | grep -q '^-gdb'; \
123
then echo "-gdb tcp::15234"; \
124
else echo "-s -p 15234"; fi)
125
126
-debug: build/kernel .gdbinit $(F)/fs-copy.img
127
- $(QEMU) $(QEMUOPTS) -S $(QEMUGDB) &
128
- sleep 1
129
- $(GDB)
+debug: build/kernel .gdbinit
+ @tmux new-session -d \
+ $(QEMU) $(QEMUOPTS) -S $(QEMUGDB) && \
+ tmux split-window -h "$(GDB) -ex 'target remote localhost:15234'" && \
130
+ tmux -2 attach-session -d
131
+
132
+gdbserver: build/kernel
133
+ $(QEMU) $(QEMUOPTS) -S $(QEMUGDB)
134
135
+gdbclient:
136
+ $(GDB) -ex "target remote localhost:15234"
137
138
CHAPTER ?= $(shell git rev-parse --abbrev-ref HEAD | grep -oP 'ch\K[0-9]')
139
0 commit comments