kodev: fix run -g (#14257)

Close #14256.
This commit is contained in:
Benoit Pierre
2025-08-30 20:37:32 +02:00
committed by GitHub
parent d3c5ee3d6f
commit 97cdacecba

15
kodev
View File

@@ -475,18 +475,17 @@ ANDROID TARGET:
if [[ -n "${VALUE}" ]]; then if [[ -n "${VALUE}" ]]; then
declare -a "wrap=(${VALUE})" declare -a "wrap=(${VALUE})"
else else
if is_system macOS; then local -a candidates
if ! wrap=("$(command -v lldb | head -n1)"); then case "${OSTYPE}" in
die 1 "Couldn't find LLDB." darwin*) candidates=(lldb) ;;
fi
else
# Try to use friendly defaults for GDB: # Try to use friendly defaults for GDB:
# - DDD is a slightly less nice GUI # - DDD is a slightly less nice GUI
# - cgdb is a nice curses-based GDB front # - cgdb is a nice curses-based GDB front
# - GDB standard CLI has a fallback # - GDB standard CLI has a fallback
if ! wrap=("$(command -v ddd cgdb gdb | head -n1)"); then *) candidates=(ddd cgdb gdb) ;;
die 1 "Couldn't find GDB." esac
fi if ! wrap=("$(command -v "${candidates[@]}" | head -n1)"); then
die 1 "Couldn't find a supported debugger (${candidates[*]})."
fi fi
fi fi
if [[ ${#wrap[@]} -eq 1 ]]; then if [[ ${#wrap[@]} -eq 1 ]]; then