DSP_FD_CUR=3 DSP_FD_NEW=800 function usage() { echo usage: $0 pid ... echo "Note: This program assumes that the program's FD $DSP_FD_CUR is the sound" echo " device FD, and that the program does not use memory-mapped writes." echo " Also it is assumed that $DSP_FD_NEW is unused." exit 1 } if [ x`which gdb` = x ]; then echo gdb not found in PATH. Please apt-get install gdb exit fi if [ x$1 = x ]; then usage; fi for PID in $@; do MYPID=$$ EXE="`readlink /proc/$PID/exe`" if [ x$EXE = x ]; then echo $0: $PID: no such pid exit fi BATCHFILE="`mktemp /tmp/gdb.XXXXXXXXXXXX`" cat >$BATCHFILE </dev/null 2>&1