From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20383 invoked by alias); 7 Sep 2011 13:28:48 -0000 Received: (qmail 20373 invoked by uid 22791); 7 Sep 2011 13:28:48 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_RG 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; Wed, 07 Sep 2011 13:28:23 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id DE728CB02B5; Wed, 7 Sep 2011 15:28:24 +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 ncp5HkAqjghw; Wed, 7 Sep 2011 15:28:14 +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 9F4CCCB02BF; Wed, 7 Sep 2011 15:28:14 +0200 (CEST) Subject: Re: [RFC] Support of Lion (darwin 11) Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Tristan Gingold In-Reply-To: <201109071409.06452.pedro@codesourcery.com> Date: Wed, 07 Sep 2011 13:47:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <3B7D5F6A-664C-4A05-BCE9-16BC8BA9F78D@adacore.com> References: <201109071409.06452.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/msg00119.txt.bz2 On Sep 7, 2011, at 3:09 PM, Pedro Alves wrote: > On Wednesday 07 September 2011 13:28:41, Tristan Gingold wrote: >> Hi, >>=20 >> with the latest mac OS X, executables are now pie by default and their l= oad address is random. This obviously needs to be considered by gdb, and t= he easiest method is to disable the randomization. >=20 > This leaves out attaching to already running programs. We support PIE on > linux/svr4 now. Correct. But handling attached PIE processes is a different problem. > Would it be hard to impossible to support it on Lion? No, it isn't impossible. It is just more difficult than PIE executables. >> I also did some cleanup in this function: use alloca instead of xmalloc= for argv to avoid a memory leak, and moved the code that allocate shell_co= mmand within the if (shell) block. I also factorized the gdb_flush/_exit c= ode used in case on error. >=20 > How about splitting these out into a separate, preparatory patch? Sure. Tristan.