2
我正在尝试编写脚本来分析核心转储。到目前为止,我已经提出了这个脚本。使用bash的GDB脚本
#!/bin/bash
#
# A script to extract core-file informations
#
#Binary image
binimg=$1
# Today and yesterdays cores
core=$2
gdblogfile="$core-gdb.log"
rm -f $gdblogfile
gdb -batch \
-ex "set logging file $gdblogfile" \
-ex "set logging on" \
-ex "set pagination off" \
-ex "file $binimg" \
-ex "core-file $core" \
-ex "bt" \
-ex "quit"
,当我试着执行它时,我得到这个错误: 文件“退出”不存在或不是一个普通的文件。
你能让我知道我做错了什么吗?