HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/cuda-12/bin/cuda-gdb
#!/usr/bin/env bash

# Check the cuda-gdb executables in order of preference
# for unresolved shared library references.

# Start with the value of CUDA_GDB_BINARIES, so that end-users can put their own
# at the front of the list.
CUDA_GDB_BINARIES="$CUDA_GDB_BINARIES cuda-gdb-python3.12-tui"
CUDA_GDB_BINARIES="$CUDA_GDB_BINARIES cuda-gdb-python3.11-tui"
CUDA_GDB_BINARIES="$CUDA_GDB_BINARIES cuda-gdb-python3.10-tui"
CUDA_GDB_BINARIES="$CUDA_GDB_BINARIES cuda-gdb-python3.9-tui"
CUDA_GDB_BINARIES="$CUDA_GDB_BINARIES cuda-gdb-python3.8-tui"
CUDA_GDB_BINARIES="$CUDA_GDB_BINARIES cuda-gdb-minimal"

PRINT_VERSION=0
for arg in $*; do
    if [ "$arg" == "--version" ]; then
        PRINT_VERSION=1
        break
    fi
done

exec_cuda_gdb() {
    binary="$1"
    shift

    # Check to see if the specified cuda-gdb executable will run on this
    # system by invoking cuda-gdb with --version. If it succeeds
    # with exit code 0, go ahead and run the binary
    $binary --version > /dev/null 2>&1
    if [ $? == 0 ]; then
        if [ "$PRINT_VERSION" != 0 ]; then
            echo "exec:" "$binary" "$@"
        fi
        exec "$binary" "$@"
    fi
}

# Check $PATH first
for binary in $CUDA_GDB_BINARIES; do
    exec_cuda_gdb "$binary" "$@"
done

# No binary could be found on $PATH
# Check again alongside this wrapper script.
# Note that 'dirname cuda-gdb-python3.12-tui' will return '.'
# even without an explicit leading './'
WRAPPER_SCRIPT_DIR=`dirname $0`
for binary in $CUDA_GDB_BINARIES; do
    if [ -f "$WRAPPER_SCRIPT_DIR/$binary" ]; then
        exec_cuda_gdb "$WRAPPER_SCRIPT_DIR/$binary" "$@"
    fi
done

echo "Could not find system compatible cuda-gdb binary executable" 1>&2
echo "Supported binaries are:" $CUDA_GDB_BINARIES 1>&2
exit 1