From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26727 invoked by alias); 5 May 2003 19:29:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26720 invoked from network); 5 May 2003 19:29:54 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 5 May 2003 19:29:54 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 94D492B2F; Mon, 5 May 2003 15:29:51 -0400 (EDT) Message-ID: <3EB6BBAF.5080504@redhat.com> Date: Mon, 05 May 2003 19:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz , Joel Brobecker Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [RFA/RFC] Problem with '!' escaping with zsh/bash/ksh References: <20030502233458.GP992@gnat.com> <1438-Sat03May2003113601+0300-eliz@elta.co.il> <20030503143251.GA1878@nevyn.them.org> <20030503165109.GT992@gnat.com> <20030503165915.GA16323@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00072.txt.bz2 Joel, testcase? I was going to suggest gdb.base/args.exp but someone's already added that. Consider an addition to that existing test case pre-approved (and any other evil combinations you come up with). Anyway, as best I can tell the technical issues were resolved, so yes, approved. Andrew >> I think you are right to say that "\a" is equivalent to "a" in general. >> However, in our case, the argument is quoted, specifically single-quoted. >> And it seems to make a big difference: with single quotes, the >> expression is no longer evaluated. That's why the backslash becomes >> harmful. >> >> Daniel said: > >> > By the way... what would the general reaction be to supporting exec'ing >> > the program directly instead of through the shell? At least as an >> > option, since it would be a bit of an interface/quoting change? > >> >> I think that'd be very nice, actually. Can somebody tell me what the >> advantage of forking via a shell is? > > > Globbing, primarily; and it handles some complexities of quoting (but > introduces others!). > > Me, I think on modern systems we can just do argument splitting > and globbing ourselves if we want to. It's more efficient and less > fragile. Hmm, this came up ``recently'', "inferior.h" contains: /* If STARTUP_WITH_SHELL is set, GDB's "run" will attempts to start up the debugee under a shell. This is in order for argument-expansion to occur. E.g., (gdb) run * The "*" gets expanded by the shell into a list of files. While this is a nice feature, it turns out to interact badly with some of the catch-fork/catch-exec features we have added. In particular, if the shell does any fork/exec's before the exec of the target program, that can confuse GDB. To disable this feature, set STARTUP_WITH_SHELL to 0. To enable this feature, set STARTUP_WITH_SHELL to 1. The catch-exec traps expected during start-up will be 1 if target is not started up with a shell, 2 if it is. - RT If you disable this, you need to decrement START_INFERIOR_TRAPS_EXPECTED in tm.h. */ #define STARTUP_WITH_SHELL 1 #if !defined(START_INFERIOR_TRAPS_EXPECTED) #define START_INFERIOR_TRAPS_EXPECTED 2 #endif http://sources.redhat.com/ml/gdb-patches/2002-04/msg00759.html Andrew