1# connect gdb to Valgrind gdbserver:
2target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-mcinfcallWSRU
3echo vgdb launched process attached\n
4monitor v.set vgdb-error 999999
5#
6# ensure all threads are known
7break sleeper_or_burner
8continue
9continue
10continue
11continue
12#
13# Here the 4 threads have been started.
14# We will interrupt in a few seconds (be sure all tasks are in Runnable/Yielding state
15# or in WaitSys state.
16shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-mcinfcallWSRU 1 grep main mcinfcallWSRU.stderr.out
17#
18continue
19#
20thread 1
21print whoami("thread 1 inferior call pushed from gdb in mcinfcallWSRU.stdinB.gdb")
22thread 2
23print whoami("thread 2 inferior call pushed from gdb in mcinfcallWSRU.stdinB.gdb")
24thread 3
25print whoami("thread 3 inferior call pushed from gdb in mcinfcallWSRU.stdinB.gdb")
26thread 4
27print whoami("thread 4 inferior call pushed from gdb in mcinfcallWSRU.stdinB.gdb")
28monitor v.kill
29quit
30