From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16094 invoked by alias); 6 Feb 2006 02:41:14 -0000 Received: (qmail 16085 invoked by uid 22791); 6 Feb 2006 02:41:13 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 06 Feb 2006 02:41:12 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F5wJS-0002aQ-GT for gdb-patches@sourceware.org; Sun, 05 Feb 2006 21:41:10 -0500 Date: Mon, 06 Feb 2006 02:41:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: RFA: Support Windows extended error numbers in safe_strerror Message-ID: <20060206024110.GB9872@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <200602041435.k14EZ6NK016329@elgar.sibelius.xs4all.nl> <20060205001503.GB8728@trixie.casa.cgf.cx> <20060205193440.GB4718@trixie.casa.cgf.cx> <20060205202222.GB5574@nevyn.them.org> <20060205215036.GE4718@trixie.casa.cgf.cx> <20060205215659.GA7232@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00116.txt.bz2 On Mon, Feb 06, 2006 at 12:47:58AM +0200, Eli Zaretskii wrote: > > Date: Sun, 5 Feb 2006 16:56:59 -0500 > > From: Daniel Jacobowitz > > > > > Isn't the shell used to allow redirection and shell-like quoting from > > > the gdb command-line? Lack of redirection, at least, is an occasional > > > complaint about gdb-under-cygwin. > > > > That's right; and we certainly can't ditch that support. But what we > > do today is pass the command line arguments directly to a shell, which > > means all sorts of worrying about quoting, and also means that we get > > Bourne shell behavior if the user has an appropriate $SHELL, or C shell > > if they're using csh/tcsh, et cetera. I don't know if anyone takes > > advantage of that as a feature, but it's sure confusing! > > I don't see why this is confusing at all. The point is that the user > should type the command arguments as if she were typing at the shell's > prompt, and feel exactly the same. So I don't see why we need to > worry about quoting--just passing the args verbatim to the shell > should do the trick. Or am I missing something? This way you can't write documentation for GDB that says how the arguments to "run" behave - you have to reference another program, and we're not even sure which program it is half the time. I'd rather be able to have a chapter in the manual saying "this is how you use globbing, if you want to", and "this is how you escape arguments", and "this is how you redirect stderr to a file, if your platform supports that". Bonus: we could make that work with remote targets, too, by redirecting the Remote File I/O stdout and stderr channels. I will be doing some work with both file I/O and remote argument passing over the next month; I may revisit this and write a proposal... -- Daniel Jacobowitz CodeSourcery