This is the mail archive of the gdb@sources.redhat.com 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]

Re: problems with gdb



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.

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