This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: Inferior command line arguments


> Date: Sun, 30 Sep 2001 15:07:51 -0400
> From: Christopher Faylor <cgf@redhat.com>
> >
> >And running Cygwin applications needs yet another modification.  For
> >the full story, see the function sys_spawnve on w32proc.c in the Emacs
> >distribution.
> 
> I am not sure why cygwin would need more modifications.  We try to emulate
> the standard arcane Windows quoting rules.
> 
> Could you elaborate?

Well, I'm talking from hearsay here, so please take the below with a
grain of salt.

According to the comments and the code in src/w32proc.c in the Emacs
distribution, command lines passed to Cygwin applications need the
following special treatment:

  - quote some more special characters, like \r, \n, and \f (MSVC
    programs don't allow these in commands, I believe);

  - `\' needs to be escaped;

  - to escape a `"', you need to double it, whereas MSVC applications
    use a backslash to escape a quote.

It's possible that all this is true for some old version of Cygwin,
while current Cygwin versions are 100% compatible.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]