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
|
(hanoi.sh:31):
31: typeset -i max=3
+# Test of frame commands
+# We also try all of the various where/backtrace variants
+# Do we give a valid stack listing initially?
+# Let's start with a couple of stack entries
+continue hanoi
One-time breakpoint 1 set in file hanoi.sh, line 13.
(hanoi.sh:13):
13: hanoi() {
+where 2
->0 in file `hanoi.sh' at line 13
##1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# How about after a frame command?
+frame 0
(hanoi.sh:13):
13: hanoi() {
+bt 2
->0 in file `hanoi.sh' at line 13
##1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# How about after moving?
+u
(hanoi.sh:43):
43: hanoi $max "a" "b" "c"
+where 2
##0 in file `hanoi.sh' at line 13
->1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+down
(hanoi.sh:13):
13: hanoi() {
+where 2
->0 in file `hanoi.sh' at line 13
##1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# Try moving past the end
+down
** Would be beyond bottom-most (most recent) entry.
+where 2
->0 in file `hanoi.sh' at line 13
##1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+up 3
** Would be beyond top-most (least recent) entry.
+bt 2
->0 in file `hanoi.sh' at line 13
##1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# Try some negative numbers
+# should be the same as up
+down -1
(hanoi.sh:43):
43: hanoi $max "a" "b" "c"
+T 2
##0 in file `hanoi.sh' at line 13
->1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# Should go to next-to-least-recent frame
+frame -2
(hanoi.sh:43):
43: hanoi $max "a" "b" "c"
+where 2
##0 in file `hanoi.sh' at line 13
->1 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# Let's add another stack entry
+continue hanoi
One-time breakpoint 2 set in file hanoi.sh, line 13.
(hanoi.sh:13):
13: hanoi() {
+where 3
->0 in file `hanoi.sh' at line 13
##1 hanoi("2", "a", "c", "b") called from file `hanoi.sh' at line 22
##2 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# Again, next-to-least recent stack entry
+frame -2
(hanoi.sh:43):
43: hanoi $max "a" "b" "c"
+where 3
##0 in file `hanoi.sh' at line 13
##1 hanoi("2", "a", "c", "b") called from file `hanoi.sh' at line 22
->2 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+# Most recent stack entry
+frame +0
(hanoi.sh:13):
13: hanoi() {
+backtrace 3
->0 in file `hanoi.sh' at line 13
##1 hanoi("2", "a", "c", "b") called from file `hanoi.sh' at line 22
##2 hanoi("3", "a", "b", "c") called from file `hanoi.sh' at line 43
+up 2
(hanoi.sh:43):
43: hanoi $max "a" "b" "c"
+quit
|