0

I recently tried to build the new version of GCC (4.8.1) on Ubuntu 12.04. I managed to build everything correctly, it passed the tests and I installed the new compiler.

I can build programs with the new compiler. I can run them. However, as soon as I try to debug them in eclipse it does not work. It gives me the following error message:

No source available for "main() at 0x8048693"

Is there something other than GCC that I should update to be able to debug?

Edit:

Here is the "program" I am trying to debug and how I compile it.

test.cpp:

#include <iostream>

int main() {
    std::cout << "Hello World!" << std::endl;
    return 0;
}

compilation command:

g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test.d" -MT"src/test.d" -o "src/test.o" "../src/test.cpp"
  • 2
    Did you ask the compiler to generate debug information? – Thorbjørn Ravn Andersen Sep 13 '13 at 11:14
  • @ThorbjørnRavnAndersen Yes I did, see my edit. – slepasteur Sep 13 '13 at 14:27
0

I had the same issue. After installing gdb 7.6.1, I can debug by using eclipse.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.