sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame^] | 1 | # connect gdb to Valgrind gdbserver: |
| 2 | target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlcontrolc |
| 3 | monitor vg.set vgdb-error 999999 |
| 4 | # |
| 5 | # |
| 6 | # simulate control-c in a few seconds |
| 7 | shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 10 |
| 8 | # |
| 9 | continue |
| 10 | # |
| 11 | # Here, all tasks should be blocked in a loooonnnng select, all in WaitSys |
| 12 | info 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: |
| 19 | p t[0].tv_sec = 0 |
| 20 | p t[1].tv_sec = 0 |
| 21 | p t[2].tv_sec = 0 |
| 22 | p t[3].tv_sec = 0 |
| 23 | # |
| 24 | # We will change the burning parameters in a few seconds |
| 25 | shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 10 |
| 26 | # |
| 27 | continue |
| 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 |
| 33 | p burn = 0 |
| 34 | p loops = 0 |
| 35 | p report_finished = 0 |
| 36 | continue |
| 37 | # and the process should stop very quickly now |
| 38 | quit |