This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] maintenance_print_msymbols: Try harder to match files
On Mon, May 02, 2005 at 01:05:15PM -0700, Joel Brobecker wrote:
> > The xfullpath call doesn't do what you think it does:
> >
> > /* Extract the basename of filename, and return immediately
> > a copy of filename if it does not contain any directory prefix. */
> > if (base_name == filename)
> > return xstrdup (filename);
> >
> > I've got no idea at all why that is there. Joel added this function;
> > maybe he can explain.
>
> I don't remember all the details, I could dig up the relevant messages
> if necessary. But the comment at the begining of the function seems to
> confirm that this code is correct to be here:
>
> /* Return a copy of FILENAME, with its directory prefix canonicalized
> by gdb_realpath. */
>
> Perhaps the function is incorrectly named, though (misleading)...
> Should we consider finding a more meaningful name?
I would rather see an example of why the current behavior is correct,
first.
--
Daniel Jacobowitz
CodeSourcery, LLC