From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5848 invoked by alias); 24 Dec 2012 04:27:15 -0000 Received: (qmail 5803 invoked by uid 22791); 24 Dec 2012 04:27:13 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_CP X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Dec 2012 04:27:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C60EF2E44B; Sun, 23 Dec 2012 23:27:06 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JhOo+YsPzj8L; Sun, 23 Dec 2012 23:27:06 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3D00D2E037; Sun, 23 Dec 2012 23:27:06 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EBBBCC26BE; Mon, 24 Dec 2012 08:26:57 +0400 (RET) Date: Mon, 24 Dec 2012 04:27:00 -0000 From: Joel Brobecker To: Mike Frysinger Cc: gdb-patches@sourceware.org, Tristan Gingold , Iain Sandoe Subject: Re: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10. Message-ID: <20121224042657.GT5370@adacore.com> References: <59ABFF71-CA26-452C-B9B2-9B0FC6AAE2BD@sandoe-acoustics.co.uk> <03DE2A59-DA13-4F7C-B757-533D4AF5F1DD@adacore.com> <201212232258.05972.vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201212232258.05972.vapier@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-12/txt/msg00803.txt.bz2 > how about this instead. it localizes the #ifdef and has a comment. Tristan being on holiday, I will take over this week. This looks OK to me with one tiny request: Update the function documentation about also returning -1 to signify that the request is unsupported. I assume you'll remember to provide a CL. I wonder how we are expected to iterate over shared libraries on Darwin 9 (we no longer have access to this version of Darwin). Thanks! > diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c > index 252fe3e..ac0aaac 100644 > --- a/gdb/darwin-nat.c > +++ b/gdb/darwin-nat.c > @@ -1821,6 +1821,10 @@ out: > static int > darwin_read_dyld_info (task_t task, CORE_ADDR addr, char *rdaddr, int length) > { > +#ifndef TASK_DYLD_INFO_COUNT > + /* This is not available in Darwin 9. */ > + return -1; > +#else > struct task_dyld_info task_dyld_info; > mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT; > int sz = TASK_DYLD_INFO_COUNT * sizeof (natural_t); > @@ -1838,6 +1842,7 @@ darwin_read_dyld_info (task_t task, CORE_ADDR addr, char > *rdaddr, int length) > length = sz - addr; > memcpy (rdaddr, (char *)&task_dyld_info + addr, length); > return length; > +#endif > } > > > -mike -- Joel