]> git.proxmox.com Git - ceph.git/blame - ceph/src/Beast/scripts/run-with-debugger.sh
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / scripts / run-with-debugger.sh
CommitLineData
7c673cae
FG
1#!/usr/bin/env bash
2set -eu
3
4if [[ $(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 $@
14else
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 $@
22fi