ftmemsim-valgrind/gdbserver_tests/simulate_control_c
Julian Seward 2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00

12 lines
295 B
Bash
Executable File

#! /bin/sh
# simulate control_c by sending SIGUSR1 to the vgdb using prefix $1 in $2 seconds
VGDBPID=`./vgdb -D $1 2>&1 | awk '/vgdb pid/ {print $3}'`
if [ "$VGDBPID" = "" ]
then
echo "simulate_control_c could not determine the vgdb pid with " $1
exit 1
fi
(sleep $2; kill -10 $VGDBPID) &