From: Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
To: gdb@sources.redhat.com
Subject: Re: handling of absolute source file paths (feature wish/implementation idea)
Date: Wed, 03 Mar 2004 17:54:00 -0000 [thread overview]
Message-ID: <20040303175451.GC4677@ata.cs.hun.edu.tr> (raw)
In-Reply-To: <20040122175828.GA18705@nevyn.them.org>
Hello, Daniel!
On Thu, Jan 22, 2004 at 12:58:28PM -0500, Daniel Jacobowitz wrote:
> > > 3. Implement a new setting "source-absolute-prefix" (analog to the already
> > > existing "solib-absolute-prefix") which allows the user to set a prefix for
> > > given absolute source code paths.
...
> src/include/elf.h
> src/bfd/elfarm-nabi.c
> src/bfd/elf32-arm.h
> obj/bfd/bfd.h
>
> obj/bfd/elfarm-nabi.o:
> compilation dir /blah/obj/bfd
> path to source ../../src/bfd/elfarm-nabi.c
> include flags -I. -I../../src/bfd -I../../src/include
>
> I want to be able to issue one command and find elf32-arm.h,
> elfarm-nabi.c, bfd.h, and elf.h. They all have relative paths, rooted
> at compilation directory /blah/obj/bfd. It happens to have been moved
> to /blah-backup/obj/bfd and /blah-backup/src/bfd.
I can't see how source-absolute-prefix could help. If you set it to
/blah-backup, gdb would look for
/blah-backup/../../src/bfd/elfarm-nabi.c and wouldn't be able to find
it. If you set it to /blah-backup/obj/bfd and ask for
../../../src/gdb/cli/cli-cmds.c (compiled under /blah/obj/gdb/cli), gdb
would again not find it. How did you want to use it?
I think the problem is actually the fact that we use
gdb/source.c:openp() both for binaries and sources. For the former we
don't want to search the path if the name contains directory separators
due to the reasons discussed before in this thread. For the latter we
currently do the same; is it just because it is handled by the same
function, or are there any other reasons?
Seems that if we look for source files (both absolute and relative) in
the supplied path, we can use dir command to access the source trees
that were moved -- and this is, according to gdb 5.3 info documentation,
what dir command was intended for. As far as I could see, 1)
implementing source-absolute-prefix would also require this
rearrangement, 2) the case with trees moved deeper in hierarchy is the
only problem solved by source-absolute-prefix, and 3) it would be
already covered by dir if we process binaries and sources differently.
That is why I suggest that I modify openp so that it looks into search
path for source files (I'm thinking about replacing try_cwd_first with a
set of boolean flags determining the various aspects of the algorithm
and adding the respective flag for searching). What do you think?
With kind regards,
Baurjan.
next prev parent reply other threads:[~2004-03-03 17:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-22 15:01 Gernot Hillier
2004-01-22 15:07 ` Daniel Jacobowitz
2004-01-22 15:39 ` Gernot Hillier
2004-01-22 18:02 ` Daniel Jacobowitz
2004-01-22 16:04 ` Paul Koning
2004-01-22 17:26 ` Eli Zaretskii
2004-01-22 17:58 ` Daniel Jacobowitz
2004-03-03 17:54 ` Baurjan Ismagulov [this message]
2004-01-22 18:45 ` Andrew Cagney
2004-01-22 20:16 ` Daniel Jacobowitz
2004-01-23 13:02 ` Eli Zaretskii
2004-01-23 20:26 ` Andrew Cagney
[not found] <1074884800.30040.ezmlm@sources.redhat.com>
2004-01-23 21:31 ` Jim Ingham
2004-03-03 16:12 ` Baurjan Ismagulov
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=20040303175451.GC4677@ata.cs.hun.edu.tr \
--to=ibr@ata.cs.hun.edu.tr \
--cc=gdb@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