1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
(dbg-test1.sh:22):
22: x=22
+# Test of watchpoint handling
+#
+### Should fail since xyxxy is not defined...
+watch xyxxy
Can't set watch: no such variable xyxxy.
+info break
No breakpoints have been set.
No watch expressions have been set.
+### Test a simple breakpoint...
+eval xx=1
+watch xx
0: ($xx)==1 arith: 0
+info break
No breakpoints have been set.
Num Type Enb Expression
0 watchpoint y $xx
+#
+# Now try enable and disable
+#
+### Try testing enable/disable...
+en 0w
Watchpoint entry 0 already enabled so nothing done.
+L
No breakpoints have been set.
Num Type Enb Expression
0 watchpoint y $xx
No actions have been set.
+dis 0W
Watchpoint entry 0 disabled.
+L
No breakpoints have been set.
Num Type Enb Expression
0 watchpoint n $xx
No actions have been set.
+### Try deleting nonexistent watchpoint...
+delete 10w
Watchpoint entry 10 doesn't exist so nothing done.
+#
+### Test display of watchpoints...
+watche y > 25
1: (y > 25)==0 arith: 1
+info break
No breakpoints have been set.
Num Type Enb Expression
0 watchpoint n $xx
1 watchpoint y y > 25
+delete 0w
+info break
No breakpoints have been set.
Num Type Enb Expression
1 watchpoint y y > 25
+delete 1w
+info break
No breakpoints have been set.
No watch expressions have been set.
+step
(dbg-test1.sh:23):
23: y=23
+watch x
2: ($x)==22 arith: 0
+restart -B -q -L .. -x restart2.cmd dbg-test1.sh
Restarting with: -B -q -L .. -x restart2.cmd dbg-test1.sh
Watchpoint : $x changed:
old value: '22'
new value: ''
(bashdb:263):
263: if (( $_Dbg_opt_linetrace )) ; then
+# 2nd part of Restart test
+l
263:==>if (( $_Dbg_opt_linetrace )) ; then
264: # No stepping.
265: _Dbg_write_journal_eval "_Dbg_steps=-1"
266: BASHDB_QUIT_ON_QUIT=1
267: else
268: # Set to skip over the next 4 statements
269: _Dbg_write_journal_eval "_Dbg_steps=5"
270: fi
271: set -o functrace
272: if [[ -z $_Dbg_cmd ]] ; then
+info break
No breakpoints have been set.
Num Type Enb Expression
2 watchpoint y $x
+cont
(dbg-test1.sh:22):
22: x=22
+quit
|