From: Craig Jeffree <craig.jeffree@preston.net>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Relative source file search
Date: Thu, 06 Oct 2005 00:57:00 -0000 [thread overview]
Message-ID: <1128560230.18954.14.camel@norman> (raw)
In-Reply-To: <20051004013535.GA24000@nevyn.them.org>
On Mon, 2005-10-03 at 21:35 -0400, Daniel Jacobowitz wrote:
> I took a brief look at it, and felt that it was in the wrong place,
> i.e. belonged in openp. I haven't had a chance to come back to it yet.
>
I considered this, however the information provided by the symtab
doesn't fit with this. In the case that I'm experiencing I start up GDB
with a binary and issue this dir command:
dir /staff/taam/taam/bin/x86-Linux/nostrip/
which is the directory where the application was built.
When I do a "list GeAttribute.H:1" and break GDB at the start of
open_source_file() I get the following information in the symtab:
s->filename = "GeAttribute.H"
s->dirname = "../../../include/General"
s->fullname = 0x0
This dirname/filename concatenation is correct if taken relative to the
binary location added to the directory search path.
So open_source_file() calls find_and_open_source() which replaces
"$cdir" in the source search path with the value from s->dirname.
However this means the file cannot be found because openp() then
searches for the filename in each of the directories in the source
search path but this path now contains a relative path that depends on
one of the other entries in the path.
I don't think it makes sense for openp to start fiddling around with
combinations of directories from the path, however I can understand
wanting to move this into find_and_open_source() since open_source_file
() is meant to be a convenience function.
Would a move to find_and_open_source() instead of openp() be acceptable?
Cheers,
Craig.
next prev parent reply other threads:[~2005-10-06 0:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-27 7:42 Craig Jeffree
2005-10-04 1:24 ` [PATCH] " Craig Jeffree
2005-10-04 1:35 ` Daniel Jacobowitz
2005-10-06 0:57 ` Craig Jeffree [this message]
2005-10-06 2:16 ` Bob Rossi
2005-10-06 2:49 ` Craig Jeffree
2005-10-06 13:00 ` Bob Rossi
2005-10-06 23:33 ` Craig Jeffree
2005-10-07 0:25 ` Bob Rossi
2005-10-10 4:57 ` Craig Jeffree
2005-10-10 10:46 ` Bob Rossi
2005-10-10 16:46 ` Bob Rossi
2005-10-10 16:47 ` Daniel Jacobowitz
2005-10-10 23:15 ` Craig Jeffree
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=1128560230.18954.14.camel@norman \
--to=craig.jeffree@preston.net \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
/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