aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils
diff options
context:
space:
mode:
Diffstat (limited to '%HOME%/.bash_utils')
-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 "$@"
-}