Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/gdbserver_tests/simulate_control_c b/gdbserver_tests/simulate_control_c
new file mode 100755
index 0000000..cea1e59
--- /dev/null
+++ b/gdbserver_tests/simulate_control_c
@@ -0,0 +1,11 @@
+#! /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) &
+