This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path st yles
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Aleksandar Ristovski <ARistovski at qnx dot com>, dje at google dot com, gdb-patches at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org, RMansfield at qnx dot com
- Date: Wed, 9 Jan 2008 14:42:36 -0500
- Subject: Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path st yles
- References: <2F6320727174C448A52CEB63D85D11F40A76@nova.ott.qnx.com> <usl16stnf.fsf@gnu.org>
On Wed, Jan 09, 2008 at 09:09:24PM +0200, Eli Zaretskii wrote:
> > From: Aleksandar Ristovski <ARistovski@qnx.com>
> > Cc: dje@google.com, gdb-patches@sources.redhat.com, gcc-patches@gcc.gnu.org, Ryan Mansfield <RMansfield@qnx.com>
> > Date: Wed, 9 Jan 2008 11:13:11 -0500
> >
> > (This only works for drive letter in DOS paths, doesn't address the dir.
> > Separator issue).
>
> Right, and therefore why is it useful to consider partial solutions?
> Can we at all use similar method to handle the slashes?
I used to use a local version of filename_cmp which treated both / and
\ as directory separators. Barring the strict POSIX filename support
issue, which we've agreed can be handled by a user option, it worked
well enough. You would still need to use substitute-path to handle
drive names; this wasn't an issue for me, since I was running the GDB
testsuite, which uses "dir" heavily to find source files.
--
Daniel Jacobowitz
CodeSourcery