Use this script to generate a useful backtrace from the core file.
#!/bin/bash
corefile=$1
outfile=$1.gdbtrace.log
function getprocess {
commandstring=$(gdb -c $corefile \
--eval-command='set pagination off' \
--eval-command='bt' \
--eval-command='quit' \
|awk '/Core was generated by/ { split($0, a, "`"); split(a[2], b, "'\''"); split(b[1], c, " "); print c[1] }')
echo $commandstring|awk '{print $1}'
}
if [ -a $corefile ] ; then
process=$(getprocess)
else
echo You must provide a core file as an argument
exit
fi
if [ -a $process ] ; then
echo Core was generated by $process
gdb $process \
-c $corefile \
--eval-command='set pagination off' \
--eval-command="set logging file $outfile" \
--eval-command='set logging on' \
--eval-command='bt' \
--eval-command='bt full' \
--eval-command='thread apply all bt' \
--eval-command='thread apply all bt full' \
--eval-command='quit'
echo "Trace written to $outfile"
else
echo "Can not find $process. This script my be broken, or the file disappeared."
exit
fi
1 comment:
Borgata Hotel & Casino - FilmFileEurope.com
Borgata Hotel & Casino. This 사다리 타기 사이트 is 넷마블 도메인 one of the largest and most sophisticated gaming resorts in Atlantic City, NJ. The Borgata Hotel 파워볼사이트 & Casino has been 와이즈토토 in operation 스포츠 와이즈 토토
Post a Comment