blob: 53a8d68c4bde2fa662ae79c69de112b3d6782809 [file] [log] [blame]
sewardj3b290482011-05-06 21:02:55 +00001# connect gdb to Valgrind gdbserver:
2target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlcontrolc
3monitor vg.set vgdb-error 999999
4#
5#
6# simulate control-c in a few seconds
7shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 10
8#
9continue
10#
11# Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
12info threads
13# We will unblock them by changing their timeout argument
14# To avoid going into the frame where the timeval arg is,
15# it has been defined as global variables, as the nr
16# of calls on the stack differs between 32bits and 64bits,
17# and/or between OS.
18# ensure select finishes in a few milliseconds max:
19p t[0].tv_sec = 0
20p t[1].tv_sec = 0
21p t[2].tv_sec = 0
22p t[3].tv_sec = 0
23#
24# We will change the burning parameters in a few seconds
25shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 10
26#
27continue
28#
29# Threads are burning cpu now
30# We would like to test info threads here, but which thread are Runnable or Yielding
31# is unpredictable.
32# info threads
33p burn = 0
34p loops = 0
35p report_finished = 0
36continue
37# and the process should stop very quickly now
38quit