problems with gdb

Eli Zaretskii eliz@is.elta.co.il
Sun Dec 10 00:09:00 GMT 2000


On Sun, 10 Dec 2000, Bernd K. wrote:

> i can't debug my programs. If i write "gdb program" and then for 
> instance "list" it returns
> "init.c no such file or directory".
> What's wrong?

This happens when GDB cannot find the sources for your program.  Is 
init.c in the same directory where you run GDB?  If not, you can add 
any directory FOO to the list of directories where GDB looks for sources 
by typing "dir FOO" at the GDB prompt.  You can add several directories 
with several `dir' commands, or by typing a list of directories separated 
by a semi-colon.

Do that _before_ the first `list' command.


More information about the Gdb mailing list