ardupilot/Tools/scripts/dumpstack.sh
Thomas Watson b876809242 Tools: remove absolute path reference to rm command
On some systems (e.g. NixOS) it's not there.
2025-11-03 09:53:37 -06:00

16 lines
260 B
Bash
Executable File

#!/bin/sh
# we want everything on stderr, so the program is not disturbed
exec 1>&2
PID=$1
TMPFILE=/tmp/gdb.$$
cat << EOF > $TMPFILE
set height 0
bt full
thread apply all bt full
quit
EOF
gdb -n -batch -x $TMPFILE --pid $PID < /dev/null 2>&1
rm -f $TMPFILE