Heratic behaviour of cuda-gdb

I’m trying to debug a very complicated program written with Cuda c++ but I get heratic behaviour when I try to navigate through the code.
Most of the time the debugger stops at the right line (but this is not always true. Sometimes it may be a little before or a little after).
Most of the time, no variable can be consulted (in the Watch or local sections).
When I try to go to the next line, however, I often land in a different part of the code, which makes debugging almost impossible.

I use cuda 12.3 with all the cuda tools in the same version

I use compilation flags -O0 -g -lineinfo
I use the launcher :

"version: “0.2.0”,
“configurations”: [

    {
        "cwd": "/home/karlhal/Documents/test 1",
        "type": "cuda-gdb",
        "request": "launch",
        "name": "launch program",
        "args": ["-tests wfa '/home/karlhal/Documents/test 1/fastq/1M_SRR9336468_1.fastq' '/home/karlhal/Documents/test 1/chromosomes/Saccharomyces_cerevisiae.R64-1-1.dna.toplevel.fa' "],
        "program": "/home/karlhal/bioinformatic2/code/RbowtieCuda/src/nvbio/build_deb/sw-benchmark/sw-benchmark"
    }
]

Could someone help me?

Thank you!

Hi, @franck.richard

As you are compling with -lineinfo, but without -G, debugger stepping and breakpoint behavior may appear somewhat erratic. Details please refer

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.