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
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 2 May 2005 13:05:15 -0700
- Subject: Re: [RFA] maintenance_print_msymbols: Try harder to match files
- References: <20050124210931.GE17455@cygbert.vinschen.de> <20050501233700.GD4311@nevyn.them.org>
> 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?
--
Joel