This is the mail archive of the
mailing list for the GDB project.
Re: Finding absolute path from relative.
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb at sources dot redhat dot com
- Date: Sun, 28 Sep 2003 22:25:38 -0400
- Subject: Re: Finding absolute path from relative.
- References: <20030929022128.GB10687@white>
On Sun, Sep 28, 2003 at 10:21:28PM -0400, Bob Rossi wrote:
> 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
Anyway, there's a good comment or two about this in the source code...
MontaVista Software Debian GNU/Linux Developer