diff options
author | Austin Clements <[email protected]> | 2010-08-30 12:22:08 -0400 |
---|---|---|
committer | Austin Clements <[email protected]> | 2010-08-30 12:22:08 -0400 |
commit | fe4623b99c012dc9c9730f59ad701ed279bfd68a (patch) | |
tree | 1a6e16e560f67973062c39edca3606cb6cda73a0 | |
parent | b7a517f2277670e156f150ee2cb7aae6426c6aef (diff) | |
download | xv6-labs-fe4623b99c012dc9c9730f59ad701ed279bfd68a.tar.gz xv6-labs-fe4623b99c012dc9c9730f59ad701ed279bfd68a.tar.bz2 xv6-labs-fe4623b99c012dc9c9730f59ad701ed279bfd68a.zip |
Fix for gdbstub argument change in qemu 0.11. Rename qemu-gdb-nox target to qemu-nox-gdb because you frequently want to add the gdb part, but rarely the nox part.
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -141,6 +141,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 @@ -154,11 +158,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 |