How to run cuda-gdb on DRIVE-AGX

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.7.1.8928
other

Host Machine Version
native Ubuntu 18.04
other

I am currently having issues running CUDA on DRIVE-AGX
and am trying to analyze it using cuda-gdb.
However, cuda-gdb does not work well on DRIVE-AGX.

For example, “helloworld.cpp” in the following link works fine
for normal execution and execution of gdb,
but it does not work well with cuda-gdb.
DriveWorks SDK Reference: Hello World Application (nvidia.com)

When debugging with cuda-gdb, the process does not return
from “dwInitialize” and the process does not proceed.

Can you please tell me how to run cuda-gdb on DRIVE-AGX?

Dear @Takafumi_Shokonji,
Could you share the used command and terminal output ? Also, please check if the steps in https://docs.nvidia.com/cuda/cuda-gdb/index.html#tegra-setup are followed

Dear @SivaRamaKrishnaNV

Thank you for your reply.

Could you share the used command and terminal output ?

gcc compilation

gcc -g -I/usr/local/driveworks/include/ -I/usr/local/cuda/include helloworld.cpp -ldriveworks -L/usr/local/driveworks/lib/ -lstdc++ -o helloworld

“launch.json” file on vscode

{

    "configurations": [

        {

            "name": "helloworld_cuda-gdb",

            "type": "cppdbg",

            "request": "launch",

            "program": "${workspaceFolder}/helloworld",

            "args": [],

            "stopAtEntry": false,

            "cwd": "${workspaceFolder}",

            "environment": [],

            "MIMode": "gdb",

            "miDebuggerPath": "/usr/local/cuda/bin/cuda-gdb",

            "setupCommands": [

                {

                    "description": "Enable pretty-printing for gdb",

                    "text": "-enable-pretty-printing",

                    "ignoreFailures": true,

                },

            ],

        },

    ]

}

The output will stop processing and nothing will come out,
as described earlier.

Hi, @Takafumi_Shokonji

Please refer to 3.2. Compiling the Application and I would suggest you try with CUDA sample first. Thanks.