From: Eli Zaretskii <eliz@gnu.org>
To: Fei Ding <fdingiit@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: No source file named getopt.c.
Date: Fri, 20 Mar 2015 07:59:00 -0000 [thread overview]
Message-ID: <83a8z8w13l.fsf@gnu.org> (raw)
In-Reply-To: <CAGmPkf+mTt7xhZmWkR4oN-9h6jki1MUh8Rn0G06YhS4pQ8=H1A@mail.gmail.com>
> Date: Fri, 20 Mar 2015 14:09:00 +0800
> From: Fei Ding <fdingiit@gmail.com>
>
> I want to set a break point on some code in getopt.c, but I just got:
>
> ////////////////////////////////////////////
> (gdb) b getopt.c:100
> No source file named getopt.c.
> ////////////////////////////////////////////
>
> then, I did this to add the source directory of that code, as:
>
> ////////////////////////////////////////////
> (gdb) directory /home/dingaaa/test/gdb-7.6/libiberty/
> Source directories searched: /home/dingaaa/test/gdb-7.6/libiberty:$cdir:$cwd
> ////////////////////////////////////////////
>
> but still, I get
> ////////////////////////////////////////////
> (gdb) b getopt.c:100
> No source file named getopt.c.
> ////////////////////////////////////////////
>
> BTW: I've changed Makefiles, with `-g -O0`
>
> What's the problem?
You can only do this when debugging a program that has getopt.c
compiled in. Since you give no details on how you built that program,
it's hard to say something more intelligent.
next prev parent reply other threads:[~2015-03-20 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 6:09 Fei Ding
2015-03-20 7:59 ` Eli Zaretskii [this message]
2015-03-20 8:11 ` Fei Ding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a8z8w13l.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=fdingiit@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox