#!/bin/bash if [[ -z $1 ]]; then echo "usage: backtrace [ ...]" exit 1 fi exec gdb -batch -ex run -ex "backtrace" --args "$@"