mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-13 05:41:26 +01:00
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
This commit is contained in:
parent
7c5146da12
commit
13a9745746
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user