This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cant debug on Gentoo 64


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]