Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/scripts/dumpstack.sh
9354 views
1
#!/bin/sh
2
3
# we want everything on stderr, so the program is not disturbed
4
exec 1>&2
5
6
PID=$1
7
TMPFILE=/tmp/gdb.$$
8
cat << EOF > $TMPFILE
9
set height 0
10
bt full
11
thread apply all bt full
12
quit
13
EOF
14
gdb -n -batch -x $TMPFILE --pid $PID < /dev/null 2>&1
15
rm -f $TMPFILE
16
17