This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: problems with gdb
- To: "Bernd K." <kuhlen at gmx dot net>
- Subject: Re: problems with gdb
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Sun, 10 Dec 2000 10:08:21 +0200 (IST)
- cc: gdb at sourceware dot cygnus dot com
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.