tags:

views:

491

answers:

2
+2  A: 
  1. No.
  2. No.
  3. Yes.

Make sure you compile with -g (debug) option. Make sure the sourcepaths are set correctly. Use directory, show directories and dir commands to see/set.

Murali VP
of course the code is compiled with -g option..
Neeraj
+1  A: 

The other thing to beware of besides shared libraries is that gdb source file names are relative to the directory where the code was compiled. If you haven't compiled with absolute pathnames, use the dir command to add the compilation directory to the list of places gdb searches for source code.

And a hint: I find I am wildly more productive when I use the Data Display Debugger (DDD) graphical front end to gdb.

Norman Ramsey
thanks.. that worked like a charm.. infact the entire behavior was due to the include path not being in the path to be searched.
Neeraj