Well, I have never written a post in English on my blog before but considering the current lack of resources available on the internet, I believe a little change would not be so bad but helpful instead 🙂
Today I’ll write about a bug (and its solution) I’ve encountered on using CDT plugin on 64-bit Eclipse IDE. For those who don’t know; Eclipse is a multi-platform development environment mainly used for Java but its capabilities can be expanded via using plugins for other languages (C/C++, Python, PHP…) as well. CDT is the plugin which enables developing C and C++ applications on Eclipse.
The bug happens under these conditions:
- You are using 64-bit version of Eclipse.
- You installed “Eclipse IDE for Java Developers” first and installed CDT plugin later.
The bug does not happen under these conditions:
- You are using 32-bit version of Eclipse.
- You installed “Eclipse IDE for C/C++ Developers“, not the plugin.
I’ve also got to mention that I use Linux, so I don’t know whether this bug happens on other platforms as well or not. Sorry Mac and Windows users.
The problem I’ve encountered is; when I start debugging C / C++ applications, I can’t view memory locations of any given variable. Instead I get the following error:
The solution to this bug is changing the default launcher for debugging. In order to do so,
- Go to Window > Preferences.
- From the left hand side of the preferences window, search for “Default Launchers”.
- Select Debug option of “C/C++ Application”.
- You should see “GDB Create Process Launcher” is selected. Change it to “Standard Create Process Launcher”.
- Close the window.
Now whenever you start debugging, you should see that the memory view correctly displays the addresses and values of variables stored on main memory. Happy debugging 🙂