"Enter"a basıp içeriğe geçin

Eclipse CDT’s “Unable to load memory” Bug and Its Solution

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:

  1. You are using 64-bit version of Eclipse.
  2. You installed “Eclipse IDE for Java Developers” first and installed CDT plugin later.

The bug does not happen under these conditions:

  1. You are using 32-bit version of Eclipse.
  2. 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:

Unable to load memory from the specified address

The solution to this bug is changing the default launcher for debugging. In order to do so,

  1. Go to Window > Preferences.
  2. From the left hand side of the preferences window, search for “Default Launchers”.
  3. Select Debug option of “C/C++ Application”.
  4. You should see “GDB Create Process Launcher” is selected. Change it to “Standard Create Process Launcher”.
  5. Close the window.
Setting an alternate launcher for debugging

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 🙂

Hooray!
Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Time limit is exhausted. Please reload CAPTCHA.