5.10.120-tegra #1 SMP PREEMPT Tue Aug 1 12:32:50 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux
while running cuda-gdb on Jetson devices, it shows that i got the following errors.
How do i fix it or continue with the debugging?
https://docs.nvidia.com/cuda/cuda-gdb/index.html#walk-through-examples
From the walk-through guide even though cudaMalloc was called but it doesn’t seem to trigger fatal error.
I have done the below with the cuda-gdb guide for jetson-devices
### 3.1.2. Using the CUDA-GDB debugger on Jetson and Drive Tegra devices[](https://docs.nvidia.com/cuda/cuda-gdb/index.html#using-the-cuda-gdb-debugger-on-jetson-and-drive-tegra-devices)
By default, on Jetson and Drive Tegra devices, GPU debugging is supported only if `cuda-gdb` and `cuda-gdbserver` are launched by a user who is a member of the **debug** group.
To add the current user to the **debug** group run this command:
sudo usermod -a -G debug $USER
nvcc -O0 -g -std=c++17 -m64 -lm -lcudart -lpthread xxx.cu -o xxx_executable
Breakpoint 2, main (args=1, arglist=0xffffffffec78, environs=0xffffffffec88) at xxx.cu:59
59 cudaMalloc((void**)&d,sizeof(int)*0x100);
stepping over the instruction it errors out
(cuda-gdb) n
[Detaching after fork from child process 241798]
fatal: One or more CUDA devices cannot be used for debugging. Please consult the list of supported CUDA devices for more details. (error code = CUDBG_ERROR_INVALID_DEVICE(0xb)