Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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


#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
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
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

Your Answer


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.