summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2010-08-30 15:30:53 -0400
committerRobert Morris <[email protected]>2010-08-30 15:30:53 -0400
commit81b30b14d6925a0f5c9eb114724457d90869949c (patch)
tree989981e6fce1479281968cf07dc932ec061097a9 /Makefile
parent3c9ff073e09abf15f241aa1812e04d8587c9925d (diff)
parentfe4623b99c012dc9c9730f59ad701ed279bfd68a (diff)
downloadxv6-labs-81b30b14d6925a0f5c9eb114724457d90869949c.tar.gz
xv6-labs-81b30b14d6925a0f5c9eb114724457d90869949c.tar.bz2
xv6-labs-81b30b14d6925a0f5c9eb114724457d90869949c.zip
Merge remote branch 'origin/master' into page
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ef9b66d..3ddc1c1 100644
--- a/Makefile
+++ b/Makefile
@@ -142,6 +142,10 @@ bochs : fs.img xv6.img
# try to generate a unique GDB port
GDBPORT = $(shell expr `id -u` % 5000 + 25000)
+# QEMU's gdb stub command line changed in 0.11
+QEMUGDB = $(shell if qemu -help | grep -q '^-gdb'; \
+ then echo "-gdb tcp::$(GDBPORT)"; \
+ else echo "-s -p $(GDBPORT)"; fi)
QEMUOPTS = -smp 2 -hdb fs.img xv6.img
qemu: fs.img xv6.img
@@ -155,11 +159,11 @@ qemu-nox: fs.img xv6.img
qemu-gdb: fs.img xv6.img .gdbinit
@echo "*** Now run 'gdb'." 1>&2
- qemu -serial mon:stdio $(QEMUOPTS) -s -S -p $(GDBPORT)
+ qemu -serial mon:stdio $(QEMUOPTS) -S $(QEMUGDB)
-qemu-gdb-nox: fs.img xv6.img .gdbinit
+qemu-nox-gdb: fs.img xv6.img .gdbinit
@echo "*** Now run 'gdb'." 1>&2
- qemu -nographic $(QEMUOPTS) -s -S -p $(GDBPORT)
+ qemu -nographic $(QEMUOPTS) -S $(QEMUGDB)
# CUT HERE
# prepare dist for students