Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path st yles

Eli Zaretskii
2008-01-06T20:18:27Z

> Date: Sun, 6 Jan 2008 12:03:08 -0800
> From: "Doug Evans" <dje@google.com>
> Cc: "Daniel Jacobowitz" <drow@false.org>, gdb-patches@sources.redhat.com,
> ARistovski@qnx.com, gcc-patches@gcc.gnu.org, RMansfield@qnx.com
>
> > 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.
>
> It seems like GDB should know what to use, or at least be able to
> figure it out (in cases where it really matters).

How can GDB figure that out? We don't tell it enough about the
program being debugged for that.

But if I'm wrong, and GDB _can_ figure it out on its own, then it
should use the right style of file names automagically, and the _ANY
set of macros is again not needed.

> Are we really sure we need an option?

If GDB cannot figure this out, the user should tell it, since the user
always knows.

> How would this option work in practice?

How about

(gdb) set filename-style (dos|unix)

?

> If one ever wanted to set it to the non-default value it'd be
> rather cumbersome to have to set it and then reset it for one-off
> uses of "the other" path kind.

No more cumbersome than any other similar option, like "set
demangle-style", for example.