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
|
set trace-commands on
# Debugger test of:
# stack trace
# parameter display
# return command
# evaluation of dollar variables $1, $2
#
### Try a simple stack command...
where
step 2
where
### Try printing a dollar variable...
p $1
### Same thing using eval...
eval echo $1
### Setting an action to print $1
a 4 echo "\\$1 at line 4 has value $1"
c fn2
# cont
### First parameter should have embedded blanks...
where
p "dollar 1: $1"
### Same thing using eval...
e echo "\\$1 is $1"
### Should have embedded blanks...
p $2
e echo "\\$2 is $2"
continue fn3
### Test return. Should go back to fn2 and then fn1...
return
return
### Should not have done above-listed x=\"fn2\" assignment
p $x
where
return
where
return
where
return
return
where
### * Testing that exit status preserved on eval and print...
c 29
e echo "eval says exit was $?"
p "print says exit was $?"
info files
### * quitting...
quit
|