]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/gdbserver_tests/mcbreak.stdinB.gdb
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / gdbserver_tests / mcbreak.stdinB.gdb
1 # connect gdb to Valgrind gdbserver:
2 target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-mcbreak
3 echo vgdb launched process attached\n
4 monitor vg.set vgdb-error 999999
5 #
6 define checkstep
7   set $old_pc=$pc
8   step
9   if $old_pc == $pc
10     echo Bizarre the oldpc has not changed after step\n
11     print $oldpc
12     print $pc
13   else
14     echo old_pc has changed after step\n
15   end
16 end
17 #
18 # break1 and break2
19 break t.c:112
20 break t.c:117
21 #
22 continue
23 # first break encountered.
24 checkstep
25 checkstep
26 checkstep
27 #
28 monitor vg.set vgdb-error 0
29 #
30 next
31 print whoami("first")
32 print undefined
33 print i
34 checkstep
35 checkstep
36 next
37 print whoami("second")
38 print undefined
39 print i
40 next
41 print whoami("third")
42 print undefined
43 print i
44 next
45 print whoami("fourth")
46 print undefined
47 print i
48 # modify sleeps so as to have a shorter test:
49 print sleeps=1
50 #
51 print whoami("after next: inferior call pushed from mcbreak.stdinB.gdb")
52 continue
53 #
54 # encountered second break
55 step
56 finish
57 # delete all breaks
58 delete
59 continue
60 monitor vg.info n_errs_found 
61 # inferior call "in the middle" of an instruction is not working at least
62 # on all platforms, so comment the below.
63 # print whoami("after error: inferior call pushed from mcbreak.stdinB.gdb")
64 checkstep
65 monitor vg.set vgdb-error 0
66 continue
67 # stop the process a.o. to avoid non deterministic output
68 monitor vg.kill
69 quit