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 |
sewardj | eefeeb7 | 2011-05-10 11:01:07 +0000 | [diff] [blame] | 3 | echo vgdb launched process attached\n |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 4 | monitor v.set vgdb-error 999999 |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 5 | # |
| 6 | # |
| 7 | # simulate control-c in a few seconds |
sewardj | 7629180 | 2011-05-31 07:09:06 +0000 | [diff] [blame] | 8 | shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep main nlcontrolc.stderr.out |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 9 | # |
| 10 | continue |
| 11 | # |
| 12 | # Here, all tasks should be blocked in a loooonnnng select, all in WaitSys |
| 13 | info threads |
| 14 | # We will unblock them by changing their timeout argument |
| 15 | # To avoid going into the frame where the timeval arg is, |
| 16 | # it has been defined as global variables, as the nr |
| 17 | # of calls on the stack differs between 32bits and 64bits, |
| 18 | # and/or between OS. |
| 19 | # ensure select finishes in a few milliseconds max: |
| 20 | p t[0].tv_sec = 0 |
| 21 | p t[1].tv_sec = 0 |
| 22 | p t[2].tv_sec = 0 |
| 23 | p t[3].tv_sec = 0 |
| 24 | # |
| 25 | # We will change the burning parameters in a few seconds |
sewardj | 7629180 | 2011-05-31 07:09:06 +0000 | [diff] [blame] | 26 | shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep changed nlcontrolc.stdoutB.out |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 27 | # |
sewardj | 7629180 | 2011-05-31 07:09:06 +0000 | [diff] [blame] | 28 | echo changed burning parameters\n |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 29 | continue |
| 30 | # |
| 31 | # Threads are burning cpu now |
| 32 | # We would like to test info threads here, but which thread are Runnable or Yielding |
| 33 | # is unpredictable. |
| 34 | # info threads |
| 35 | p burn = 0 |
| 36 | p loops = 0 |
| 37 | p report_finished = 0 |
| 38 | continue |
| 39 | # and the process should stop very quickly now |
| 40 | quit |