[RFC] Do not treat '\' as escape character on MinGW Windows hosts
André Pönitz
andre.poenitz@nokia.com
Thu Apr 22 12:47:00 GMT 2010
On Thursday 22 April 2010 04:34:21 Christopher Faylor wrote:
> On Wed, Apr 21, 2010 at 08:17:14PM -0400, Joel Brobecker wrote:
> >> > (gdb) file c:\\foo\\bar.exe
> >> > Reading symbols from c:\foo\bar.exe...done.
> >>
> >> Why not just use a "forward" slash?
> >
> >It's not always that easy - A lot of times, the user wants to copy/paste
> >a path that's been printed by another tool. Also, the typical Windows
> >user seems to think that he should be able to use a valid Windows path
> >(which I agree)...
>
> I agree too except when we're talking about something that is
> essentially a UNIX tool
Isn't gdb aiming at supporting (at least?) the same environments as
gcc does?
If so, the answer seems pretty clear to me: gcc works for MinGW,
so gdb should "just work", too. Whether this boils down to making
a backslash an ordinary character, or have some setting for it
is another question.
I do understand that gdb has a UNIX history, but telling people "If you
mean 'a', type 'b'" strikes me as odd - no matter what the context is.
> And, I don't see how you can talk about the pain of doubling up
> the backslashes if you're talking about cutting and pasting.
If you cut&paste paths from a shell or browser on Windows you'll get
single backslashs. Some applications (also lots with a UNIX history)
can handle that, some not. In the latter cases the user has to manually
"fix" (he might even call it "cripple") the pasted path to make that
application happy. That's slow, prone to error, and ugly.
gdb has by now a _huge_ potential to be _the_ cross-platform debugging
solution. In practice, it is hampered by usability issues like that to a
degree that makes it practically unusable in a lot of scenarios - also
on UNIX btw.
> I know I'll be outvoted here but I I hate cluttering code with MS-DOS
> workarounds.
Oh well... For me the "joy" of application development has always been to
take some burden from the user and place it on the sholders of the developer.
And in a cross-platform environment this sometimes may mean using the
preprocessor, or use an otherwise unneeded abstraction layer.
Sure, this makes the application code more complex, but isn't making
applications doing something useful the actual goal of making them?
Andre'
More information about the Gdb-patches
mailing list