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
|
(dbg-test1.sh:22):
22: x=22
+# Debugger test of 'command' command
+#
+# Try to set command when there is none.
+command 1
No breakpoint number 1.
+#
+# Now a command for a real breakpoint
+break 23
Breakpoint 1 set in file dbg-test1.sh, line 23.
+command 1
Type commands for when breakpoint 1 hit, one per line.
+#
+##############################
+# Should see value of x below
+# from the command statment
+break 25
Breakpoint 2 set in file dbg-test1.sh, line 25.
+continue
Breakpoint 1 hit (1 times).
+x x
declare -- x="22"
(dbg-test1.sh:23):
23: y=23
+#
+#############################
+# Test of a changing
+# command statement. First
+# The setup.
+##############################
+command 2
Type commands for when breakpoint 1 hit, one per line.
+continue
Breakpoint 2 hit (1 times).
+print x is now $x
x is now 22
(dbg-test1.sh:25):
25: ((x += i))
+####################################
+# Now we'll change the it
+####################################
+command 2
Type commands for when breakpoint 1 hit, one per line.
+continue
Breakpoint 2 hit (2 times).
+print "testing overwriting commands"
testing overwriting commands
(dbg-test1.sh:25):
25: ((x += i))
+####################################
+# Should have seen the testing message
+# above, not x.
+## FIXME: theres a weird bug
+## in evaluating expressions like $i
+# Now let's remove the command
+# altogether
+####################################
+command 2
Type commands for when breakpoint 1 hit, one per line.
+continue
Breakpoint 2 hit (3 times).
(dbg-test1.sh:25):
25: ((x += i))
+quit
|