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-mcinfcallRU |
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 | # |
sewardj | 7629180 | 2011-05-31 07:09:06 +0000 | [diff] [blame] | 6 | # We will interrupt in a few seconds (be sure the main task is ready). |
| 7 | # Once it is ready, we still have to wait to be sure it is running. |
| 8 | shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-mcinfcallRU 1 grep main mcinfcallRU.stderr.out |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 9 | # |
| 10 | continue |
| 11 | info threads |
| 12 | thread apply all bt full |
| 13 | # Would like to call this for all threads with 'thread apply all', but due to unfair scheduling, |
| 14 | # the below can either take a long time and/or have threads finished |
| 15 | # before they have a chance to execute the whoami |
| 16 | # thread apply all |
| 17 | print whoami("inferior call pushed from gdb in mcinfcallRU.stdinB.gdb") |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame^] | 18 | monitor v.kill |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 19 | quit |