blob: d1919346b7649190b8b9b9fdd6ed3cc190225420 [file] [log] [blame]
philippe6654de82014-04-15 22:35:23 +00001# connect gdb to Valgrind gdbserver:
2target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlvgdbsigqueue
3echo vgdb launched process attached\n
4monitor v.set vgdb-error 999999
5#
6#
7# simulate control-c in a 1 second
8shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlvgdbsigqueue 1 grep main nlvgdbsigqueue.stderr.out
9#
10# send SIGUSR1/SIGUSR1 in a few seconds, when vgdb is attached
philippe90afa782014-04-26 19:55:33 +000011shell ./send_signal USR1 --vgdb-prefix=./vgdb-prefix-nlvgdbsigqueue 4
12shell ./send_signal USR1 --vgdb-prefix=./vgdb-prefix-nlvgdbsigqueue 4
philippe6654de82014-04-15 22:35:23 +000013#
14echo continuing to have vgdb interrupted by simulate_control_c\n
15continue
16#
17# Now vgdb should have received the interrupt, and so has
18# attached to the sleeping process.
19# wait for the USR sig to be sent, that will be queued by vgdb.
philippe90afa782014-04-26 19:55:33 +000020shell sleep 8
philippe6654de82014-04-15 22:35:23 +000021# continue, so as to have vgdb sending queued signals when PTRACE_DETACHing
22echo continuing to receive first SIGUSR1\n
23continue
24# simulate a control c to afterwards stop the execution
25shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlvgdbsigqueue 1
26echo continuing to receive second SIGUSR1\n
27continue
28kill
29quit