Clang 8.0 dubugging support?
Answered
I use CLion 2019.1 on Fedora 30 and Clang 8.0. Compiling works fine, but I have issues with debugging. For example, I can't inspect std::string variables in the debugger. I have tried both the built-in LLDB version 7 and LLDB 8 from Fedora's installation.
Am I doing something wrong, or is Clang 8 support not quite ready?
Please sign in to leave a comment.
Hi! Do you see "Unable to read data" like in https://youtrack.jetbrains.com/issue/CPP-13701?
In my own code, I mostly see error: summary string parsing error. I see those errors in the example you link to, but I also see Unable to read data. The curious thing is that I can see the 2nd element of the vector if I scroll down a bit. See attached screenshot.
after scrolling down:
Please comment or upvote https://youtrack.jetbrains.com/issue/CPP-13701 in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
Sorry for the inconvenience.
I just tried clang++-8 on Ubuntu 19.04, and all works as expected. I need to do more research, but it appears I only see this issue on Fedora 30.
More info .. I don't know how this happened, but I had clang-8 on Fedora 30 without LLVM 8 installed. Compiling seemed to work fine. I used dnf install clang, and it didn't install LLVM 8. Once I installed it, debugging worked as expected.
I suspect Ubuntu 19.04 installed LLVM 8 when I installed clang-8.
Thank you for the information!
I spoke too soon. CLion on my Fedora 30 system no longer debugs as expected. With clang-8, I can't inspect variables in scope. I'm using the built-in LLDB version 7 since CLion does not appear to support LLDB version 8 from my OS.
With the GCC toolchain and GDB, now breakpoints are ignored.
Neither of the above situations is reliably reproducible.
In order to investigate the issues, we need logs. Please enable debugger logging as described here, reproduce the issue and send the resulting idea.log file to clion-support at jetbrains.com. Thanks. Do not forget to disable debug logging after that. Note that logs might contain private user's information (like file paths and names).
Thanks for the offer. This turns out to be an issue with Fedora 30 and LLDB, not with CLion. I reproduced the issue with VSCode. I wonder if "dnf install clang" on Fedora 30 does not install a package required for debugging libstd++ or libcxx. I don't know.
Since it's not a CLion issue, let's forget all about it.