From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29518 invoked by alias); 20 Oct 2012 17:20:05 -0000 Received: (qmail 29500 invoked by uid 22791); 20 Oct 2012 17:20:03 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Oct 2012 17:19:56 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MC700800BWK1K00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Sat, 20 Oct 2012 19:19:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MC7008JKC441E10@a-mtaout20.012.net.il>; Sat, 20 Oct 2012 19:19:16 +0200 (IST) Date: Sat, 20 Oct 2012 17:20:00 -0000 From: Eli Zaretskii Subject: Re: [RFA/commit/Windows] run program with space in path to exe. In-reply-to: <20121020162936.GC3050@adacore.com> To: Joel Brobecker Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83a9vhdpth.fsf@gnu.org> References: <1350692925-14181-1-git-send-email-brobecker@adacore.com> <83happzi44.fsf@gnu.org> <20121020162936.GC3050@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00369.txt.bz2 > Date: Sat, 20 Oct 2012 09:29:36 -0700 > From: Joel Brobecker > Cc: gdb-patches@sourceware.org > > > This is impossible, at least in the MinGW case: Windows file names > > cannot include the quote character. See > > > > http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx > > OK, great. I wasn't sure whether this was allowed or not. I was able > to create a file with a double-quote, but that was under cygwin. Cygwin employs some dark corners of NTFS to provide Posix-like features. A Cygwin GDB will indeed need to cope with quotes as part of file names in this context. > > But what happens if the program name is already quoted? A user can do > > that if she realizes the problem in advance, certainly if the program > > name is specified at the GDB prompt, as in 'file "c:\foo bar\my.exe"'. > > I think we should detect this case and not quote it again. > > As per the above - this time, it's GDB that punts, so we never even > get to the point where we can run the program. > > > Also, what about the arguments to the program? Don't they have the > > same issue when you use --args on the GDB command line? > > The arguments are always quoted properly by the generic portion of > GDB. No problem there. Then I guess you can go ahead and commit the changes. Thanks.