1 # bashdb.pre - Bourne-Again Shell Debugger preamble file
2 # prepended to script being ddebugged
4 # $1 = name of original guineapig script
5 # $2 = dir where temp files are stored
6 # $3 = dir where bashdb.pre and bashdb.fns are stored
8 # separate history file for bashdb
9 HISTFILE=~/.bashdb_history
13 # prompt for trace line
20 shift 3 #move user's args into place
22 . $_libdir/bashdb.fns #read in the debugger functions
26 let _trace=1 #init execution trace flag to on
28 #read guineapig file into _lines array
31 trap _cleanup EXIT #erase files before exiting
33 let _steps=1 #no. of statements to run after setting trap
34 #set LINENO, gets incremented to 1
36 trap '_steptrap $LINENO' DEBUG