blob: 2ab36d8647608eadcbe78fb492c5146ade4175c3 [file] [log] [blame]
sewardj3b290482011-05-06 21:02:55 +00001# connect gdb to Valgrind gdbserver:
2target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-mcsignopass
sewardjeefeeb72011-05-10 11:01:07 +00003echo vgdb launched process attached\n
sewardj30b3eca2011-06-28 08:20:39 +00004monitor v.set vgdb-error 999999
sewardj3b290482011-05-06 21:02:55 +00005#
6# instruct gdb to not pass (i.e. ignore) these signals.
7#
8# Trap the below signals, we make them stop and then continue.
9# For SIGSEGV, we make it continue a few times, till we pass it.
10handle SIGSEGV nopass print stop
11handle SIGBUS pass print stop
12handle SIGFPE pass print stop
13#
14continue
15#
16# SIGTRAP : caused by invalid write error detected by memcheck
17continue
18#
19# SIGSEGV can't be ignored, so it is re-signaled. We continue many times
20# to be sure it is this signal which is re-signalled. Then will pass it.
21continue
22continue
23continue
24continue
25continue
26continue
27continue
28continue
29continue
30#
31# Change handling so that we just see the 2nd SIGSEGV
32handle SIGSEGV pass print nostop
33continue
34#
35# SIGBUS will be shown and passed:
36continue
37#
38# then SIGFPE is shown and passed:
39continue
40#
41# program will exit
42quit