Hi Berke,

I had the same problem last year. Many IDEs don't really work for developing gcc. Most here probably use either emacs or vim. If you want to use an IDE, you might have to do some hacks.

The oldschool indentation style of gcc (mix of tab and spaces) is not widely supported. IDEs/Editors that support displaying this identation style are GNOME Builder (but that doesn't support the way gcc is built), Eclipse, VS Code (since Dec 22) and vim/emacs of course. For VS Code, you need to apply 'unexpand' to the source files as it does not support converting 8 spaces to 1 tab automatically. There are plugins for Code to run customs commands on save.

To keep your IDE snappy, you should exclude everything that you won't need from the indexing, especially the test directory.

At last, for debugging, I had good experiences with launching a gdbserver, i.e. replacing "-wrapper gdb" with "-wrapper gdbserver,localhost:2345". Then you can connect your IDE to that gdbserver and fully use the IDE interface to debug. You can configure running gcc with a gdbserver as a pre-task to automate this.

- Tim

PS: When I tried CLion last year, I neither could get the build system working nor the indentation. So you might want to look at one of the other IDEs but I don't if something changed in the time.

On Mi, Mär 1 2023 at 20:59:17 +0300, Berke Yavas via Gcc <gcc@gcc.gnu.org> wrote:
Hi,

I am trying to set up my environment for the upcoming google summer of
code. One thing I haven't figured out yet, how can I debug C++ frontend(or any other language frontend) with CLion. If anybody managed to do this(or
using another IDE), could you please share your settings with me?

Best regards,
Berke


Reply via email to