Is it possible to integrate cuda-gdb into CLion?

Answered

Hello colleagues. Could you help me with one problem?  I successfully use CLion for Cuda programming. I've set  cuda-gdb as custom debugger, but during debug session it doesn't work correctly. Ubuntu 16.04 hangs up, when i try to debug Cuda kernel (Shift F9), but start up debugger notice is:  NVIDIA (R) CUDA Debugger
8.0 release
Portions Copyright (C) 2007-2016 NVIDIA Corporation
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"..

If i use cuda-gdb from terminal, it works well. Start up notice is:

NVIDIA (R) CUDA Debugger
8.0 release
Portions Copyright (C) 2007-2016 NVIDIA Corporation
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
---Type <return> to continue, or q <return> to quit---q

 

The difference, that first variant uses host library libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"..

Why doesn't it work as if it works from terminal? What's the problem? Thank you.

1
2 comments

Could you please enable debug logging by entering `#com.jetbrains.cidr.execution.debugger` into Help | Debug Log Settings, restart the IDE, reproduce the problem and send us idea.log (Help | Show Log in Finder). Do not forget to disable debug logging after that. Please send the log to clion-support at jetbrains.com. It would help us in our investigation.

0

Was there any resolution to this? I have the same issue.

It allows me to hit breakpoints in device code, but I cannot get any variable info.

Setting the focus to a device resolves normally, but it does not actually seem to change the focus. The focus remains on the host thread.

0

Please sign in to leave a comment.