From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28361 invoked by alias); 25 Apr 2002 21:29:41 -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 28340 invoked from network); 25 Apr 2002 21:29:40 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 25 Apr 2002 21:29:40 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA12331; Thu, 25 Apr 2002 14:29:38 -0700 (PDT) Message-ID: <3CC8726A.D93DA309@redhat.com> Date: Thu, 25 Apr 2002 14:29:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: Andrew Cagney , thorpej@wasabisystems.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH] Use multi-arch'd START_INFERIOR_TRAPS_EXPECTED on Alpha target References: <20020421181544.S1627@dr-evil.shagadelic.org> <3CC74887.2070401@cygnus.com> <20020425160400.A19216@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg01045.txt.bz2 Daniel Jacobowitz wrote: > > On Wed, Apr 24, 2002 at 08:06:31PM -0400, Andrew Cagney wrote: > > >The following puts STARTUP_WITH_SHELL > > > > Hmm, HP merge. An intermediate version looked like: > > > > /* 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 > > ! */ > > #define STARTUP_WITH_SHELL 1 > > - #define START_INFERIOR_TRAPS_EXPECTED (STARTUP_WITH_SHELL + 1) > > > > Does STARTUP_WITH_SHELL need to be multi-arched? > > > > I'm wondering if it would be better to make it a variable (``set > > startup-with-shell ''). Looking at its uses it appears that > > fork-child.c:startup_inferior() would still work (if it did previously). > > Silly question.... are there any (supported? working?) uses for this > besides globbing and backtick interpolation? I think there aren't, and > I think it would simplify GDB to just have a function which called > glob() and invoked subshells for ``. It's a little tricky, but not > very. We'd lose access to things like shell-specific globbing tricks, > but I think that's a worthwhile price to pay. I'm not so sure. Sometimes getting the exact behavior of a specific shell might be important. Also, might this functionality be used for piping and I/O redirection?