system: kgdb wants debug version

This commit is contained in:
Franco Fichtner 2023-06-09 09:25:32 +02:00
parent 9e25bf7c85
commit 64be3606c4

View File

@ -20,9 +20,10 @@ while read DEV MP TYPE MORE; do
savecore /var/crash ${DEV}
fi
for VMCORE in $(find /var/crash -type f -name "vmcore.*"); do
KERNEL="/var/crash/kernel.${VMCORE##*.}"
if [ ! -x ${KERNEL} ]; then
cp "$(sysctl -n kern.bootfile)" ${KERNEL}
DST="/var/crash/kernel.${VMCORE##*.}"
SRC="/usr/lib/debug/$(sysctl -n kern.bootfile).debug"
if [ -e ${SRC} && [ ! -e ${DST} ]; then
cp ${SRC} ${DST}
fi
done
exit 0