From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30184 invoked by alias); 21 Sep 2011 14:36:03 -0000 Received: (qmail 30018 invoked by uid 22791); 21 Sep 2011 14:36:02 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Sep 2011 14:35:49 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R6Nts-0001Rk-NP from pedro_alves@mentor.com ; Wed, 21 Sep 2011 07:35:48 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 21 Sep 2011 15:35:46 +0100 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] Disable ASLR on Darwin Date: Wed, 21 Sep 2011 15:07:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: Tristan Gingold References: <201109211534.30277.pedro@codesourcery.com> In-Reply-To: <201109211534.30277.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109211535.44892.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00388.txt.bz2 On Wednesday 21 September 2011 15:34:30, Pedro Alves wrote: > On Wednesday 21 September 2011 14:45:37, Tristan Gingold wrote: > > Hi, > > > > this patch disable ASLR on Darwin for spawned programs, so that you can reuse breakpoint/watchpoints with addresses. > > Also this adds support for PIE for free (as already noted by Pedro, this doesn't handle attached processes). > > > > Contrary to other OS, this is done at exec (i.e. posix_spawn) time. In order to use posix_spawn instead of exec, I added a parameter to fork_inferior, adjusted all the calls of fork_inferior (I preferred to pass NULL instead of execvp, because the prototype of the later is somewhat not universal), and added the real work for darwin. > > > > No regressions on i386/GNU linux > > Manually tested on Lion. > > > > Ok for trunk ? > > Okay, though it's a shame you don't leave the option to disable > ASLR with a user setting like on linux. s/to disable/to enable/ -- Pedro Alves