LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   /root/init.c: No File or Directory in GDB (https://www.linuxquestions.org/questions/programming-9/root-init-c-no-file-or-directory-in-gdb-283569/)

irfanhab 01-28-2005 10:15 PM

/root/init.c: No File or Directory in GDB
 
Hi

I can not debug my programs because something has gone wrong with gdb:

I compile a file called mheap.cpp, which has only uses iostream.h, and algorithm.h, it compiles fine.
when I run gdb and set a break point at line 108, which is the main procedure it says

No line 108 in file "init.c".


when I fireup ddd and load the executable it says:
"/root/init.c: No File or Directory"


I never had a file init.c in root, whats wrong?

Dark_Helmet 01-28-2005 10:27 PM

Just a shot in the dark, but did you remember to compile with the debugging option ( -g )?

irfanhab 01-28-2005 11:17 PM

Quote:

Just a shot in the dark, but did you remember to compile with the debugging option ( -g )?
dead accurate shot! yeap that solved the problem, how stupid of me to forget -r


All times are GMT -5. The time now is 02:13 PM.