mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Squashed 'src/nudb/' content from commit 00adc6a
git-subtree-dir: src/nudb git-subtree-split: 00adc6a4f16679a376f40c967f77dfa544c179c1
This commit is contained in:
22
scripts/run-with-debugger.sh
Executable file
22
scripts/run-with-debugger.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
# -o runs after loading the binary
|
||||
# -k runs after any crash
|
||||
# We use a ghetto appromixation of --return-child-result, exiting with
|
||||
# 1 on a crash
|
||||
lldb --batch \
|
||||
-o 'run' \
|
||||
-k 'thread backtrace all' \
|
||||
-k 'script import os; os._exit(1)' \
|
||||
$@
|
||||
else
|
||||
gdb --silent \
|
||||
--batch \
|
||||
--return-child-result \
|
||||
-ex="set print thread-events off" \
|
||||
-ex=run \
|
||||
-ex="thread apply all bt full" \
|
||||
--args $@
|
||||
fi
|
||||
Reference in New Issue
Block a user