blob: bd2a5685f2602c2ee9c32db0d08d3e88ed68b403 [file] [log] [blame]
sewardj3b290482011-05-06 21:02:55 +00001# connect gdb to Valgrind gdbserver:
2target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-mcclean_after_fork
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# put a break in main, and then a watch
7# also put breaks in code that only the child will execute.
8# These breaks should not be encountered.
9break clean_after_fork.c:9
sewardj3b290482011-05-06 21:02:55 +000010break clean_after_fork.c:20
sewardj45fa4172011-06-26 09:13:27 +000011break clean_after_fork.c:22
sewardj3b290482011-05-06 21:02:55 +000012#
13continue
14# first break encountered.
15# put a read watchpoint on mem
16# we expect that the read watchpoint is not triggered in the child
17# (as we expect it will be cleared at fork).
18rwatch mem
19#
20continue
21#
22# we should now have encountered the read watchpoint in the parent.
23# let's kill the parent:
sewardj30b3eca2011-06-28 08:20:39 +000024monitor v.kill
sewardj3b290482011-05-06 21:02:55 +000025quit