From 64be3606c4fdcde087eda413f0c262d3e15c66ff Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 9 Jun 2023 09:25:32 +0200 Subject: [PATCH] system: kgdb wants debug version --- src/etc/rc.subr.d/crashdump | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/etc/rc.subr.d/crashdump b/src/etc/rc.subr.d/crashdump index 1d7a2a277..e46ba2ba3 100755 --- a/src/etc/rc.subr.d/crashdump +++ b/src/etc/rc.subr.d/crashdump @@ -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