From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26202 invoked by alias); 22 Sep 2011 10:23:53 -0000 Received: (qmail 26189 invoked by uid 22791); 22 Sep 2011 10:23:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Sep 2011 10:23:27 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 130D3CB0035; Thu, 22 Sep 2011 12:23:28 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nd4iHlFh4YYH; Thu, 22 Sep 2011 12:23:17 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id BDCBCCB0251; Thu, 22 Sep 2011 12:23:17 +0200 (CEST) Subject: Re: [RFA] Disable ASLR on Darwin Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Tristan Gingold In-Reply-To: <201109211534.30277.pedro@codesourcery.com> Date: Thu, 22 Sep 2011 11:47:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201109211534.30277.pedro@codesourcery.com> To: Pedro Alves 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/msg00407.txt.bz2 On Sep 21, 2011, at 4:34 PM, Pedro Alves wrote: > On Wednesday 21 September 2011 14:45:37, Tristan Gingold wrote: >> Hi, >>=20 >> 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). >>=20 >> 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_infer= ior, adjusted all the calls of fork_inferior (I preferred to pass NULL inst= ead of execvp, because the prototype of the later is somewhat not universal= ), and added the real work for darwin. >>=20 >> No regressions on i386/GNU linux >> Manually tested on Lion. >>=20 >> Ok for trunk ? >=20 > Okay, though it's a shame you don't leave the option to disable > ASLR with a user setting like on linux. Ok, I will add this option after completing the support of PIE on darwin. Tristan.