From: Daniel Jacobowitz <drow@false.org>
To: Joakim Hove <hove@ift.uib.no>
Cc: gdb@sources.redhat.com
Subject: Re: Setting breakpoint in src file located in different directory
Date: Tue, 12 Apr 2005 13:04:00 -0000 [thread overview]
Message-ID: <20050412130410.GA10078@nevyn.them.org> (raw)
In-Reply-To: <bjj8y3o2ojx.fsf@termo1.fi.uib.no>
On Tue, Apr 12, 2005 at 01:59:46PM +0200, Joakim Hove wrote:
> o I have a directory ~/libdos/src/ which contains many different
> source files. These files are compiled and linked to a shared
> library.
That's the key. Shared library.
> 1: break /HOME/user/Apps/src/App.c:450
>
> This corresponds to a situation where both the src file "App.c"
> and the executable App.x are located in the same directory,
> altough the execution is invoked from another directory. This
> works in 6.3 and did not work in 6.1
Good. This is the bug which I thought was fixed.
> 2: break /HOME/user/libdos/src/ehist.c:450
>
> This is an attempt to set breakpoints in one of the files which
> are located in a "third" directory, i.e. distrinct from both the
> directory containing the executable and the execution
> directory. This fails with:
>
> No source file named /home/fimm/cmu/hove/libdos/src/ehist.c.
>
>
> 3: If you to try set the breakpoint indicated in above manually from
> within gdb I get the following behaviour:
>
> bash% ~/bin/gdb ../App.x
> <....>
> (gdb) break /HOME/user/libdos/src/ehist.c:450
>
> No source file named /home/fimm/cmu/hove/libdos/src/ehist.c.
> Make breakpoint pending on future shared library load? (y or [n])
>
> Well, answering yes to this and then starting the program with:
>
> (gdb) run arg1 arg2 ...
> Breakpoint 4 at 0x2a95673dd0: file ehist.c, line 450.
> Pending breakpoint "/home/fimm/cmu/hove/libdos/src/ehist.c:450"
> resolved
>
> The pending breakpoint is immediately resolved, and everything
> works correctly.
See the [n]? The default answer to this question is no, because
historically pending breakpoints were not available; this is the most
consistent interface. If you want this to work from .gdbinit, see
"help set breakpoint pending".
The breakpoint can't be set yet, because the shared library has not yet
been loaded.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-04-12 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-12 10:16 Joakim Hove
2005-04-12 12:07 ` Daniel Jacobowitz
2005-04-12 12:18 ` Joakim Hove
2005-04-12 12:22 ` Daniel Jacobowitz
2005-04-12 12:59 ` Joakim Hove
2005-04-12 13:04 ` Daniel Jacobowitz [this message]
2005-04-12 13:16 ` Joakim Hove
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=20050412130410.GA10078@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=hove@ift.uib.no \
/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