#!/bin/sh bindir=$(pwd) cd @USERFILE_WORKING_DIRECTORY@ @USERFILE_ENV_COMMANDS@ if test "x$1" = "x--debugger"; then shift cmd="$1" shift echo "r $@" > $bindir/gdbscript echo "bt" >> $bindir/gdbscript gdb $cmd -command=$bindir/gdbscript -batch --return-child-result else $@ fi