print_stack() {
    for file_line in $funcsourcetrace[@]; do 
	print $file_line
    done
    print '===='
}
set -o DEBUG_BEFORE_CMD
trap 'print_stack' DEBUG
foo() {
  echo calling bar 10
  bar 10
}
bar() {
  x=20
}
foo arg1 $1
x=5
