[RFA] Fix bug in set substitute-patch

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[RFA] Fix bug in set substitute-patch

Joel Brobecker
This should fix a bug reported by Daniel when the source file is
compiled using absolute filenames.

        % gcc -c -o foo /path/to/foo.c

As Daniel reported, what happens in this case is that the compiler
puts the filename full path into the filename, and then leaves the
dirname empty.

2007-01-12  Joel Brobecker  <[hidden email]>

        * source.c (find_and_open_source): Try rewriting the source
        path inside filename if dirname is NULL.

Tested on x86-linux, no regression.
OK to apply?

Thanks,
--
Joel

subst.diff (914 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] Fix bug in set substitute-patch

Daniel Jacobowitz-2
On Fri, Jan 12, 2007 at 08:03:10AM +0400, Joel Brobecker wrote:

> This should fix a bug reported by Daniel when the source file is
> compiled using absolute filenames.
>
>         % gcc -c -o foo /path/to/foo.c
>
> As Daniel reported, what happens in this case is that the compiler
> puts the filename full path into the filename, and then leaves the
> dirname empty.
>
> 2007-01-12  Joel Brobecker  <[hidden email]>
>
>         * source.c (find_and_open_source): Try rewriting the source
>         path inside filename if dirname is NULL.
>
> Tested on x86-linux, no regression.
> OK to apply?

OK, and thanks.


--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] Fix bug in set substitute-patch

Joel Brobecker
> > 2007-01-12  Joel Brobecker  <[hidden email]>
> >
> >         * source.c (find_and_open_source): Try rewriting the source
> >         path inside filename if dirname is NULL.
> >
> > Tested on x86-linux, no regression.
> > OK to apply?
>
> OK, and thanks.

Thanks, Daniel. Now checked in.

--
Joel