Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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"
share|improve this question
1  
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. –  piemur Sep 13 '13 at 14:27
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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