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: Eli Zaretskii <eliz at gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>, gdb-patches at sources dot redhat dot com
- Cc: ARistovski at qnx dot com, gcc-patches at gcc dot gnu dot org, RMansfield at qnx dot com
- Date: Sun, 06 Jan 2008 21:37:17 +0200
- Subject: Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path st yles
- References: <2F6320727174C448A52CEB63D85D11F40A58@nova.ott.qnx.com> <20080106054030.GA10410@caradoc.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
[I added gdb-patches to the discussion.]
> Date: Sun, 6 Jan 2008 00:40:30 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, gcc-patches@gcc.gnu.org,
> Ryan Mansfield <RMansfield@qnx.com>
>
> On Sun, Jan 06, 2008 at 12:30:11AM -0500, Aleksandar Ristovski wrote:
> > >
> > > But the form of the file names is determined by the platform on which
> > > you compiled the sources, right?
> >
> > Right and this is the problem: IS_ABSOLUTE_PATH is determined at compile
> > time only by platform on which gdb will be running. Gdb, however needs to
> > deal with binaries possibly built on a platform with different file system
> > (we often have this case: gdb on POSIX file system debugging binary built on
> > windows).
>
> I also regularly work with the other direction, POSIX build system and
> Windows debug host.
In that case, I think it's wrong to allow both styles of slashes and
absolute file names. Instead, we should have a user option to set the
correct style, which would default to the convention of the platform
where GDB was built to run.
If you agree with this approach, then the _ANY version of the macros
is not needed.