From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23636 invoked by alias); 2 Apr 2012 15:23:41 -0000 Received: (qmail 23624 invoked by uid 22791); 2 Apr 2012 15:23:40 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Apr 2012 15:23:28 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q32FN1GO021730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Apr 2012 11:23:01 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q32FMxKm002306; Mon, 2 Apr 2012 11:23:00 -0400 Message-ID: <4F79C453.3030802@redhat.com> Date: Mon, 02 Apr 2012 15:23:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 MIME-Version: 1.0 To: Andreas Schwab CC: Tristan Gingold , Jack Howarth , gdb@sourceware.org Subject: Re: PR13901 References: <20120330134210.GA7869@bromo.med.uc.edu> <14D51CD4-4990-4B11-952C-64EB8F791306@adacore.com> <4F79AFF4.9000704@redhat.com> <54AC9EED-A577-41CA-B09D-3ED879877D0C@adacore.com> <4F79B4CB.4090903@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00017.txt.bz2 On 04/02/2012 03:58 PM, Andreas Schwab wrote: > Pedro Alves writes: > >> I'd be glad to see STARTUP_WITH_SHELL turned into a run-time option. I think there's >> a PR open for that even. However, we need the shell at least for argument globbing, >> as in, e.g., debugging `ls *', so I don't think we could make it off by default, >> which practically renders it an orthogonal feature. > > It's actually redirections that are problematic case here (argument > expansions could be implemented completely independent from starting the > inferior). We can't make GDB fully compatible in all cases with what it can do today if we skip the shell completely. E.g., with "set args $(foo)", "$(foo)" is expanded by the shell, and what that means is up to the user's shell. That may mean "invoke the 'foo' program", as in "$(ls)" with sh. So I'd even inclined to have !STARTUP_WITH_SHELL end up with no argument expansion (as today). So, if we made STARTUP_WITH_SHELL a runtime option, and even if we defaulted it to off, we'd still need to make target code account for when the user toggled the setting on. So I still claim that that would be an orthogonal feature, and that GDB should avoid touching the SHELL process -- it should just PTRACE_CONT it, and nothing else. -- Pedro Alves