Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Gernot Hillier <gernot.hillier@siemens.com>, gdb@sources.redhat.com
Subject: Re: handling of absolute source file paths (feature wish/implementation idea)
Date: Thu, 22 Jan 2004 17:58:00 -0000	[thread overview]
Message-ID: <20040122175828.GA18705@nevyn.them.org> (raw)
In-Reply-To: <1659-Thu22Jan2004192206+0200-eliz@elta.co.il>

On Thu, Jan 22, 2004 at 07:22:06PM +0200, Eli Zaretskii wrote:
> > From: Gernot Hillier <gernot.hillier@siemens.com>
> > Date: Thu, 22 Jan 2004 16:01:14 +0100
> > 
> > 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.
> 
> I like this suggestion the best.  It does exactly what you need here:
> allow the source directory tree to be moved deeper in the hierarchy.
> Your other suggestion, searching the source path for relative file
> names, sounds like an ad-hoc hack to me.

Thinking about this some more... here are the rearrangements I find
myself needing.

1.
  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.

2.  Same as above, but /blah/src/configure instead of ../src/configure,
so files have paths /blah/src/bfd/elf32-arm.h but also ./bfd.h.  Moved
to /blah-backup/obj/bfd again.  So the absolute paths to headers are
wrong and they don't have a simple prefix.  This is probably not
worth solving.

3.  Similar to #2 is the situation Gernot described; the absolute path
for the compilation directory has gained a prefix.  This is pretty
unnatural for me, because I do not mount my _entire_ root filesystem on
the target.  So I have to create /mnt/opt/src on the target and mount
host:/opt/src there, instead of just mounting host:/opt/src on
target:/mnt.  But this is not hard to do, just surprising.  And it
avoids the problem in #2.

So I would like for the absolute prefix to be applied to both
compilation directories used for relative paths and directly to
absolute source paths, and I think that will make my life a little
easier debugging GDB :)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2004-01-22 17:58 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 [this message]
2004-03-03 17:54     ` Baurjan Ismagulov
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=20040122175828.GA18705@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=gernot.hillier@siemens.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