NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Ctrl+c in gdb aborts qemu?



Hello all,

   There's something I don't get. Behold:

-------------------------------------------
#!/bin/sh

BASEDIR=~/nbtest
IMGSDIR=${BASEDIR}/diskimages
KERNOBJDIR=${BASEDIR}/obj.i386/home/jan/nbtest/src/sys/arch/i386/compile

LIM=`ulimit -d`
ulimit -d 524288

cd ${BASEDIR}
wterm -geometry 132x64 +sb -fb 6x10 -fg white -bg black \
        -e qemu -m 256 -hda ${IMGSDIR}/wd0.img -hdb ${IMGSDIR}/wd1.img \
        -hdc ${IMGSDIR}/wd2.img -nographic -s -S -serial stdio &
VMPID=$!

gdb -tui ${KERNOBJDIR}/QEMUDBG/netbsd.gdb

kill $VMPID
ulimit -d $LIM
-------------------------------------------

   The script above works fine at first sight. A qemu-session is
started, gdb connects to it. If a breakpoint is encountered, the
debugger stops, etc. But if I press ctrl+c _in gdb_, the qemu session
terminates. Why is this?

   Is there a way to avoid this behavior, yet retaining the basic idea
(running one script and getting both the debugger and debugee running,
as well as terminating the debugee when the debugger is terminated)?

-- 
Kind regards,
Jan Danielsson


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index