#!/bin/sh UMLUSER=`whoami` UMLMACHINE=vm001 WORKDIR="/usr/src/v2.6.21-rc1.uml/" UMLGDB_WRAPPER="/usr/src/umlgdb_wrapper" UMLGDB_WRAPPER_LOG="/usr/src/umlgdb_wrapper.log" # Automatically clean the enviroment before exit trap 'kill -9 $( pidof linux gdb port-helper ) ; echo "processes linux, gdb, and port-helper killed - enviroment clean." ; exit -1 ; ' EXIT # Run in a new xterm the gdb reading its args from the .gdbinit file located at # $WORDIR ( xterm -e "cd $WORKDIR && $UMLGDB_WRAPPER 2>$UMLGDB_WRAPPER_LOG " ) & #wait kernel finish boot time sleep 17 UMLPID=`cat /home/$UMLUSER/.uml/$UMLMACHINE/pid` kill -INT $UMLPID echo -e "\n *********** umlgdb_dispatcher : ************ \n\n" while : ; do echo " Type to interrupt uml under gdb " echo " Type to kill uml and gdb " read kill -INT $UMLPID done