CLion 2016.3 EAP: remote GDB debug, UDL rename and code analysis fixes
Hi,
We hope you had a chance to try our previous EAP build with lots of changes in CMake workflow and improved overload resolution support. Today we are rolling out another EAP build, 163.7342.13. As usual, a patch update will be rolled out shortly for those using the previous EAP (163.6957.27).
The most valuable improvements include:
- Remote GDB debug on Windows
- User-defined literals rename
- Fixes in code analysis
- CMake reload optimizations
Remote GDB debug on Windows
In CLion 2016.2 remote GDB debug was implemented for Linux and macOS platforms. With this build it comes to Windows! The following cases are supported:
- Debugging of Windows targets built with MinGW (or MinGW-w64) from Windows host with MinGW (or MinGW-w64) GDB.
- Debugging of Windows targets built with Cygwin from Windows host with Cygwin GDB.
- Debugging of Windows targets built with one toolchain (MinGW/MinGW-w64 or Cygwin) from Windows host with GDB from another one. In that case don’t forget to provide correct path mappings in the Remote GDB Debug configuration’s settings.
Start your application under gdbserver on remote host, connect there in CLion on Windows and use all the features of CLion’s built-in debugger.
Cross-platform debug (i.e. targets on Linux) requires GDB for Linux to be used from CLion on Windows. The easiest way for it is to build it on Linux with cross-compilation settings. Get the binutils-gdb sources on Linux from the Git repository, switch branch to gdb-7.11.1-release and build like this (here the in-source build is used):
sudo apt-get install mingw-w64 make flex bison texinfo mkdir build-mingw-w64-x86_64 cd build-mingw-w64-x86_64 ../configure --host=x86_64-w64-mingw32 --target=x86_64-linux-gnu --disable-gdbserver --prefix=$(pwd)/usr make make install find usr/ -type f -executable -print -exec x86_64-w64-mingw32-strip '{}' ';'
Copy the debugger (build-mingw-w64-x86_64/usr/bin/x86_64-linux-gnu-gdb.exe
) to your Windows machine and select in the remote GDB configuration in CLion.
Renaming of user-defined literals
First 2016.3 EAP introduced user-defined literals support in CLion. With this EAP you are now able to use Rename refactoring on such literals:
Besides, Find Usages works now for overloaded operators (except for new and delete), like for example in this case:
Fixes in code analysis
We continue our work on cleaning up the false-positive code analysis along with incorrect quick-fixes in CLion. This EAP build includes another set of fixes. The most important one relates to simplify quick-fix, that previously produced incorrect code for overloaded operators (CPP-2100).
Other fixes cover incorrect Reference may be null case (when one-element initializer list is used) and bogus loop variable is not updated inside the loop warnings.
CMake reload optimizations
CMake project reload can be time-consuming, that’s why we’ve worked on the conditions in which the reload happens to be sure it’s not called when not necessary. Now CLion doesn’t reload project on opening, if nothing changed. Changes that do lead to reload are environment changes, CMake project settings changes and dependent files changes.
Full release notes are available by the link.
Your CLion Team
JetBrains
The Drive to Develop