From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92891 invoked by alias); 26 Sep 2018 11:12:32 -0000 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 Received: (qmail 92863 invoked by uid 89); 26 Sep 2018 11:12:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=integrity, Hx-languages-length:1174, sierra, Sierra X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.196.23) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Sep 2018 11:12:31 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway36.websitewelcome.com (Postfix) with ESMTP id C306A401D155E for ; Wed, 26 Sep 2018 05:18:17 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 57jHgH5l98YaU57jlglBJh; Wed, 26 Sep 2018 06:12:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6p2gvtEyCQMbEmbR6eUEp2q8JrYOLGuXeuh0PceefpM=; b=xR/BTBVOOup1yWi0Q6Gm2GV/gC D+jiW/lzOXfMgueO5Vx3pMDe6/ZpkJCQ2gV4Sm9fhM2eh83/qwia2/twbQ5nEZzuXPzMJ6tZyVYOY N5+CnRPOjtg+d8xBnwMDzsKFB; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:44312 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g57jG-0014pw-T6 for gdb-patches@sourceware.org; Wed, 26 Sep 2018 06:11:38 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [RFC 0/6] A different approach to startup-with-shell on macOS Date: Wed, 26 Sep 2018 11:12:00 -0000 Message-Id: <20180926111130.18956-1-tom@tromey.com> X-SW-Source: 2018-09/txt/msg00834.txt.bz2 Currently the macOS port will disable startup-with-shell on versions of macOS that have System Integrity Protection. This is done because with SIP, gdb cannot ptrace certain executables, including the normal shells. This series implements a different approach: copy the user's shell executable to the cache directory and arrange to use the copy. This avoids the SIP restrictions. Most of the series is just cleanup, rearranging so some private functions can be shared, and fixing a few small things I noticed along the way. This has been regression tested by one of the buildbot builders, and then I tested the final patch on macOS High Sierra. One question I have is whether it's possible to build gdb on an older version of macOS and then run it on a newer version. If this can be done, then the #if-based approach taken in the final patch will not work. I didn't include any way to control this feature other than "set startup-with-shell off". My thinking was that turning this off will just result in failures, which isn't useful. However if there's a reason to do something else, I could add it. Tom