This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] maintenance_print_msymbols: Try harder to match files


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]