Date: Sun, 5 Nov 2023 01:55:02 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 13a974574670 - main - crashinfo: remove unused /usr/bin/gdb support Message-ID: <202311050155.3A51t22J069956@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=13a974574670cc85a7db60bae6620631ad756f2a commit 13a974574670cc85a7db60bae6620631ad756f2a Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-03-08 14:32:24 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-11-05 01:45:15 +0000 crashinfo: remove unused /usr/bin/gdb support We have not had gdb 6.1 in the base system for some time; there is no need to check for it. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34478 --- usr.sbin/crashinfo/crashinfo.sh | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 8a6981ba883c..0482d41804f2 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -44,19 +44,6 @@ cleanup() [ -e $VMCORE ] && rm -f $VMCORE } -# Find a gdb binary to use and save the value in GDB. -find_gdb() -{ - local binary - - for binary in /usr/local/bin/gdb /usr/libexec/gdb; do - if [ -x ${binary} ]; then - GDB=${binary} - return - fi - done -} - # Run a single gdb command against a kernel file in batch mode. # The kernel file is specified as the first argument and the command # is given in the remaining arguments. @@ -66,11 +53,7 @@ gdb_command() k=$1 ; shift - if [ ${GDB} = /usr/local/bin/gdb ]; then - ${GDB} -batch -ex "$@" $k - else - echo -e "$@" | ${GDB} -x /dev/stdin -batch $k - fi + ${GDB} -batch -ex "$@" $k } find_kernel() @@ -173,8 +156,8 @@ if $BATCH; then exec > $FILE 2>&1 fi -find_gdb -if [ -z "$GDB" ]; then +GDB=/usr/local/bin/gdb +if [ ! -x "$GDB" ]; then echo "Unable to find a kernel debugger." echo "Please install the devel/gdb port or gdb package." exit 1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311050155.3A51t22J069956>