sewardj | b2572b5 | 2011-06-26 09:36:38 +0000 | [diff] [blame] | 1 | # connect gdb to Valgrind gdbserver: |
| 2 | target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlpasssigalrm |
| 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 |
philippe | a3d8c67 | 2012-03-30 20:25:26 +0000 | [diff] [blame] | 5 | # break on breakme++: |
philippe | 13bf8ef | 2012-05-29 17:04:13 +0000 | [diff] [blame^] | 6 | break passsigalrm.c:53 |
philippe | a3d8c67 | 2012-03-30 20:25:26 +0000 | [diff] [blame] | 7 | # break on the next line: |
philippe | 13bf8ef | 2012-05-29 17:04:13 +0000 | [diff] [blame^] | 8 | break passsigalrm.c:55 |
sewardj | b2572b5 | 2011-06-26 09:36:38 +0000 | [diff] [blame] | 9 | # |
| 10 | # |
| 11 | # ensure SIGALRM can be passed directly to the process, without |
| 12 | # going through gdb: |
| 13 | handle SIGALRM stop print pass |
| 14 | # |
| 15 | continue |
| 16 | # |
| 17 | # Here, gdb should have been informed of the 1st SIGALRM |
| 18 | # Tell the 2nd can be given directly |
| 19 | handle SIGALRM nostop noprint pass |
| 20 | continue |
philippe | a3d8c67 | 2012-03-30 20:25:26 +0000 | [diff] [blame] | 21 | # Here, we expect to have stop on the breakme++ |
philippe | 886fde3 | 2012-03-29 21:56:47 +0000 | [diff] [blame] | 22 | p breakme |
| 23 | continue |
| 24 | p breakme |
philippe | a3d8c67 | 2012-03-30 20:25:26 +0000 | [diff] [blame] | 25 | # now continue till the signal SIGRTMIN is encountered |
| 26 | continue |
| 27 | # and continue to deliver it |
philippe | 886fde3 | 2012-03-29 21:56:47 +0000 | [diff] [blame] | 28 | continue |
sewardj | b2572b5 | 2011-06-26 09:36:38 +0000 | [diff] [blame] | 29 | quit |