RFC: add relative file name handling for linespecs
Eli Zaretskii
eliz@gnu.org
Tue Jan 10 17:40:00 GMT 2012
> From: Tom Tromey <tromey@redhat.com>
> Date: Tue, 10 Jan 2012 09:06:08 -0700
>
> This needs at least a doc review.
Thanks, the documentation parts are okay.
> +/* See whether FILENAME matches SEARCH_NAME using the rule that we
> + advertise to the user.
Why not say explicitly how the names are matched? "The rule we
advertise" doesn't give any hint where to look for that rule, so the
issue remains a mystery and requires to read the source to glean what
this does.
> + /* Either the names must completely match, or the character
> + preceding the trailing SEARCH_NAME segment of FILENAME must be a
> + directory separator. */
> + return (len == search_len
> + || IS_DIR_SEPARATOR (filename[len - search_len - 1]));
What about the (somewhat perverse) case of "d:foo/bar" and "foo/bar"
on Windows?
More information about the Gdb-patches
mailing list