Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb@sources.redhat.com
Subject: Re: Finding absolute path from relative.
Date: Mon, 29 Sep 2003 02:44:00 -0000	[thread overview]
Message-ID: <20030929023346.GA15141@nevyn.them.org> (raw)
In-Reply-To: <20030929023111.GC10687@white>

On Sun, Sep 28, 2003 at 10:31:11PM -0400, Bob Rossi wrote:
> On Sun, Sep 28, 2003 at 10:25:38PM -0400, Daniel Jacobowitz wrote:
> > On Sun, Sep 28, 2003 at 10:21:28PM -0400, Bob Rossi wrote:
> > > Hi,
> > > 
> > > I am thinking about the algorithm required to find the absolute path to
> > > a source file given the relative path and the output from 'show dir'.
> > > 
> > > Is it really as easy as this,
> > > 
> > > for I in 'show dir' # for each directory in show dir
> > >    if $I/relative_path exists 
> > >       break; # Found absolute path.
> > > 
> > > Or does it get more complex and obfuscated?
> > 
> > Well, often the input file has a specified directory.  That gets tried
> > first.
> > 
> > Anyway, there's a good comment or two about this in the source code...
> 
> Could you get me started in the right direction? ( ex. files of interest )
> 
> Either, I could write an MI command that would take a relative source
> path and convert it into an absolute path, or I could write a function
> in my front end that does the work.
> 
> I personally think an MI command could eventually be more helpful to
> everyone.

source.c:openp.  Then, open_source_file.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-09-29  2:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-29  2:25 Bob Rossi
2003-09-29  2:31 ` Daniel Jacobowitz
2003-09-29  2:33   ` Bob Rossi
2003-09-29  2:44     ` Daniel Jacobowitz [this message]
2003-09-29  4:58       ` Bob Rossi
2003-09-29  5:18         ` Eli Zaretskii

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=20030929023346.GA15141@nevyn.them.org \
    --to=drow@mvista.com \
    --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