about summary refs log blame commit diff stats
path: root/subx/drun
blob: 87092a9d2369c455718e679ac462d7eb29d5816e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                    
                                                    


         
                                              
       
#!/usr/bin/env zsh
# Run commonly-used SubX programs using the SubX VM in 'debug mode'.

if [ $# -eq 0 ]
then
  echo "drun <binary> <args>"
  exit 1
fi

if [[ $1 == 'ex'* ]]
then
  CFLAGS=-g ./subx --map --trace run examples/$* 2>x
  exit $?
fi

CFLAGS=-g ./subx --map --trace run apps/$* 2>x
exit $?