From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127213 invoked by alias); 23 Aug 2018 20:42:13 -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 127204 invoked by uid 89); 23 Aug 2018 20:42:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=dark, vote, Pedro's, pedros X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Aug 2018 20:42:12 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w7NKg5cR029483 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Aug 2018 16:42:10 -0400 Received: by simark.ca (Postfix, from userid 112) id D56C31EB3F; Thu, 23 Aug 2018 16:42:05 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 5897A1E012; Thu, 23 Aug 2018 16:42:04 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 23 Aug 2018 20:42:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org, roirand@adacore.com Subject: Re: [RFC] Make "run" work on macOS 10.13 In-Reply-To: <8736v43l6b.fsf@tromey.com> References: <20180629205532.25377-1-tom@tromey.com> <8736v43l6b.fsf@tromey.com> Message-ID: <2134cb12537fd13c8e846f850180ada7@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00583.txt.bz2 On 2018-08-23 16:03, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > >>> { >>> + /* Starting with Sierra, SIP prevents gdb from attaching to the >>> + shell, so users have to disable startup-with-shell. */ >>> + scoped_restore save_startup >>> + = make_scoped_restore (&startup_with_shell, 0); >>> + >>> /* Do the hard work. */ >>> fork_inferior (exec_file, allargs, env, darwin_ptrace_me, > > Simon> I think this part is good. I would suggest printing a > Simon> message/warnings to indicate that we are disabling > startup-with-shell > Simon> (only if startup_with_shell is 1 in the first place). > > See the bug and also Pedro's comments on Xavier's similar patch -- > there are other, probably better, ideas here. I have seen those, but I think your change would improve the situation in the immediate, so I would vote for merging it (and even cherry-picking to 8.2). > Simon> The unrelocated value of the symbol is 0xf782. That breakpoint > is > Simon> used for "set stop-on-solib-events", it seems, so I tried to > enable > Simon> that with both of your patches. I got a stop with Xavier's > patch and > Simon> none with Tom's, which leads me to think that Xavier's patch > gets it > Simon> right. I think you may be using the executable base address, > while we > Simon> actually want to use dyld's base address? This is not very > clear to > Simon> me yet. > > I think we want Xavier's patch and not mine. Mine was more of a stab > in > the dark. Ok, thanks, so we'll continue with Xavier's lead. Simon