From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21035 invoked by alias); 7 Sep 2011 13:09:36 -0000 Received: (qmail 20854 invoked by uid 22791); 7 Sep 2011 13:09:34 -0000 X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_00,BOTNET,RDNS_NONE,TO_NO_BRKTS_NORDNS,TW_RG X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Sep 2011 13:09:09 +0000 Received: (qmail 15441 invoked from network); 7 Sep 2011 13:09:08 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Sep 2011 13:09:08 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFC] Support of Lion (darwin 11) Date: Wed, 07 Sep 2011 13:14:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: Tristan Gingold References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109071409.06452.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/msg00117.txt.bz2 On Wednesday 07 September 2011 13:28:41, Tristan Gingold wrote: > Hi, > > with the latest mac OS X, executables are now pie by default and their load address is random. This obviously needs to be considered by gdb, and the easiest method is to disable the randomization. This leaves out attaching to already running programs. We support PIE on linux/svr4 now. Would it be hard to impossible to support it on Lion? > 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_command within the if (shell) block. I also factorized the gdb_flush/_exit code used in case on error. How about splitting these out into a separate, preparatory patch? -- Pedro Alves