Cant debug on Gentoo 64

Eran Ifrah eran.ifrah@gmail.com
Wed Aug 6 08:49:00 GMT 2008


Hi All,

I tried to debug a very simple 'hello world' application which
consists a single source file (main.cpp):

#include <stdio.h>
int main(int argc, char **argv){
   printf("hello world\n");
   return 0;
}

This is how I compiled it:

g++ -c main.cpp -o main.o -g -fPIC
g++ -o TestGDB main.o

Running the executable with the debugger, worked as expected. Howver,
trying to debug it, using gdb 6.7.1
produced this warning:

warning: no loadable sections found in added symbol-file
system-supplied DSO at <some address goes here>
placing a breakpoint at main does not work and program simply executes
until it terminates (return 0).

The OS I am using is Gentoo 64Bit, amd opteron 270 CPU

Any ideas?

-- 
Eran Ifrah
eran.ifrah@gmail.com



More information about the Gdb mailing list