This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/5] Introduce build_debug_file_name
- From: Gary Benson <gbenson at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, cedric dot buissart at gmail dot com
- Date: Thu, 18 Jun 2015 11:55:28 +0100
- Subject: Re: [PATCH 1/5] Introduce build_debug_file_name
- Authentication-results: sourceware.org; auth=none
- References: <1434447768-17328-1-git-send-email-gbenson at redhat dot com> <1434447768-17328-2-git-send-email-gbenson at redhat dot com> <83zj3zn21q dot fsf at gnu dot org> <20150617094734 dot GA9671 at blade dot nx> <83a8vymgmg dot fsf at gnu dot org>
Eli Zaretskii wrote:
> > Date: Wed, 17 Jun 2015 10:47:34 +0100
> > From: Gary Benson <gbenson@redhat.com>
> > Cc: gdb-patches@sourceware.org, cedric.buissart@gmail.com
> >
> > For the case you mention nothing would be stripped (the "d" in
> > that path is !IS_DIR_SEPARATOR) so the filename components would
> > be concatenated verbatim, just as with the original code. The
> > resulting filename may not make sense, but it's not a regression.
>
> But won't we produce "d://foo/bar" as result?
No. build_debug_file_name strips both leading and trailing slashes.
The only ways to get a double slash from build_debug_file_name is to
pass one in in the middle of a string.
build_debug_file_name ("d:", "foo", "bar") -> "d:/foo/bar"
build_debug_file_name ("d:/", "/foo", "bar") -> "d:/foo/bar"
build_debug_file_name ("d:///", "///foo///", "bar") -> "d:/foo/bar"
but
build_debug_file_name("d://foo", "bar") -> "d://foo/bar"
> > I don't believe this series should be blocked unless it breaks
> > something that actually worked before.
>
> If a fix is very simple, why not make it?
I don't understand, what are you asking me to fix?
Thanks,
Gary
--
http://gbenson.net/