This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] symfile.c, find_separate_debug_file
----- Original Message -----
From: "Eli Zaretskii" <eliz@gnu.org>
To: "Michael Snyder" <msnyder@sonic.net>
Cc: <drow@false.org>; <gdb-patches@sourceware.org>
Sent: Friday, August 03, 2007 5:31 AM
Subject: Re: [PATCH] symfile.c, find_separate_debug_file
> > From: "Michael Snyder" <msnyder@sonic.net>
> > Cc: <gdb-patches@sourceware.org>
> > Date: Thu, 2 Aug 2007 21:36:27 -0700
> >
> > > > * symfile.c (find_separate_debug_file): While consing up a path,
> > > > don't stick in an extra DIR_SEPARATOR.
> > >
> > > That's right, use DIR_SEPARATOR :-) IS_DIR_SEPARATOR in this case, I
> > > think?
> >
> > The existing code doesn't use it.
>
> Correction: the existing code appends "/" unconditionally, which is
> fine, since both Posix and non-Posix platforms support forward slashes
> in file names.
>
> But Daniel didn't mean that: he meant to use IS_DIR_SEPARATOR instead
> of literal comparison to '/' alone. The existing code didn't test
> anything, so it didn't have to cope with this issue.
Yes, I understood exactly what Daniel meant. I was saying,
the existing code uses the literal '/' instead of the symbolic
DIR_SEPARATOR.
I offered to have another go at the code and clean up the literals,
but as a separate patch to this one.