aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-01-25 01:29:31 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-01-25 01:29:31 +0100
commit619de413911941d54bd33da2bfccdcd1884edb85 (patch)
tree390fc6122c7acd560f502f878ebfe0f7832fe2b9
parentos.sh: remove obsolete stuff (diff)
downloadlinux-home-619de413911941d54bd33da2bfccdcd1884edb85.tar.gz
linux-home-619de413911941d54bd33da2bfccdcd1884edb85.zip
cxx.sh: remove unused routines
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_utils/cxx.sh78
1 files changed, 0 insertions, 78 deletions
diff --git a/%HOME%/.bash_utils/cxx.sh b/%HOME%/.bash_utils/cxx.sh
index d094f3f..bd9885f 100644
--- a/%HOME%/.bash_utils/cxx.sh
+++ b/%HOME%/.bash_utils/cxx.sh
@@ -168,81 +168,3 @@ runcxx() (
runc_compiler="${runcxx_compiler:-g++}" \
runc "$@"
)
-
-_runc_gdb() (
- set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
-
- if [ "$#" -ne 2 ]; then
- echo "usage: ${FUNCNAME[0]} BINARY CORE_DUMP" >&2
- return 1
- fi
-
- local binary_path="$1"
- local core_dump_path="$2"
-
- gdb "$binary_path" "$core_dump_path"
-)
-
-_runc_lldb() (
- set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
-
- if [ "$#" -ne 2 ]; then
- echo "usage: ${FUNCNAME[0]} BINARY CORE_DUMP" >&2
- return 1
- fi
-
- local binary_path="$1"
- local core_dump_path="$2"
-
- lldb -f "$binary_path" -c "$core_dump_path"
-)
-
-runc_debug() (
- set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
-
- if [ "$#" -ne 1 ]; then
- echo "usage: ${FUNCNAME[0]} BINARY" >&2
- return 1
- fi
-
- local binary_path="$1"
- binary_path="$( readlink --canonicalize-missing -- "$binary_path" )"
-
- local crash_path
- crash_path="$( str_replace "$binary_path" '/' '_' )"
- crash_path="$crash_path.$UID.crash"
- crash_path="/var/crash/$crash_path"
-
- if [ ! -r "$crash_path" ]; then
- echo "${FUNCNAME[0]}: $crash_path doesn't exist or isn't readable" >&2
- return 1
- fi
-
- local crash_dir
- crash_dir="$( mktemp --directory )"
-
- local rm_crash_dir
- rm_crash_dir="$( printf -- 'rm -rf -- %q' "$crash_dir" )"
- trap "$rm_crash_dir" EXIT
-
- apport-unpack "$crash_path" "$crash_dir"
- local core_dump_path="$crash_dir/CoreDump"
-
- if [ ! -r "$core_dump_path" ]; then
- echo "${FUNCNAME[0]}: $core_dump_path doesn't exist or isn't readable" >&2
- return 1
- fi
-
- "${DEBUG_FUNCTION:-_runc_gdb}" "$binary_path" "$core_dump_path"
-)
-
-runc_gdb() {
- DEBUG_FUNCTION=_runc_gdb runc_debug "$@"
-}
-
-runc_lldb() {
- DEBUG_FUNCTION=_runc_lldb runc_debug "$@"
-}