File: watch1.right

package info (click to toggle)
bashdb 4.0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,820 kB
  • ctags: 942
  • sloc: sh: 10,581; lisp: 885; makefile: 449; ansic: 325
file content (86 lines) | stat: -rw-r--r-- 1,989 bytes parent folder | download
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
(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 -L ../.. -q -x ../data/restart2.cmd ../example/dbg-test1.sh
Restarting with: /src/external-cvs/bashdb-3.1/bashdb -B -L ../.. -q -x ../data/restart2.cmd ../example/dbg-test1.sh
Watchpoint 2: $x changed:
  old value: '22'
  new value: ''
(bashdb:156):
156:	set -o functrace
+# 2nd part of Restart test
+l 
156:==>set -o functrace
157:   . "$_Dbg_script_file"
158:   
159:   # end of bashdb
+info break
No breakpoints have been set.
Num Type       Enb  Expression
2   watchpoint y    $x
+cont 
Watchpoint 2: $x changed:
  old value: ''
  new value: '22'
(dbg-test1.sh:23):
23:	y=23
+quit