]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/env bash |
2 | set -eu | |
3 | ||
4 | if [[ $(uname) == "Darwin" ]]; then | |
5 | # -o runs after loading the binary | |
6 | # -k runs after any crash | |
7 | # We use a ghetto appromixation of --return-child-result, exiting with | |
8 | # 1 on a crash | |
9 | lldb --batch \ | |
10 | -o 'run' \ | |
11 | -k 'thread backtrace all' \ | |
12 | -k 'script import os; os._exit(1)' \ | |
13 | $@ | |
14 | else | |
15 | gdb --silent \ | |
16 | --batch \ | |
17 | --return-child-result \ | |
18 | -ex="set print thread-events off" \ | |
19 | -ex=run \ | |
20 | -ex="thread apply all bt full" \ | |
21 | --args $@ | |
22 | fi |