summaryrefslogtreecommitdiffstats
path: root/backtrace
blob: 9b49e478db96564be1592e99fbf498e7285df9de (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

if [[ -z $1 ]]; then
 echo "usage: backtrace <executeable> [<arguments> ...]"
 exit 1
fi

prog=$1; shift
args="$*"

exec gdb -batch -ex "run $args" -ex "backtrace" "$prog"