1/ install devel/gdb with GDB_LINK (default) 2/ prefer /usr/local apps in PATH $ PATH=/usr/local/bin:$PATH crashinfo Unable to find matching kernel for /var/crash/vmcore.1 $ echo 'printf " Version String: %s", version' | /usr/local/bin/gdb -x /dev/stdin -batch /boot/kernel/kernel warning: /dev/stdin: No such file or directory
I'm working on fixing crashinfo to use devel/gdb when it is available.
Patch posted at https://reviews.freebsd.org/D7218
A commit references this bug: Author: jhb Date: Wed Jul 20 18:41:47 UTC 2016 New revision: 303109 URL: https://svnweb.freebsd.org/changeset/base/303109 Log: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D7218 Changes: head/usr.sbin/crashinfo/crashinfo.sh
A commit references this bug: Author: jhb Date: Wed Jul 27 17:55:14 UTC 2016 New revision: 303402 URL: https://svnweb.freebsd.org/changeset/base/303402 Log: MFC 303109: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Approved by: re (gjb) Changes: _U stable/11/ stable/11/usr.sbin/crashinfo/crashinfo.sh
A commit references this bug: Author: jhb Date: Wed Jul 27 17:55:40 UTC 2016 New revision: 303403 URL: https://svnweb.freebsd.org/changeset/base/303403 Log: MFC 303109: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Changes: _U stable/10/ stable/10/usr.sbin/crashinfo/crashinfo.sh _U stable/9/usr.sbin/crashinfo/ stable/9/usr.sbin/crashinfo/crashinfo.sh