From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25197 invoked by alias); 24 Dec 2012 05:09:42 -0000 Received: (qmail 25184 invoked by uid 22791); 24 Dec 2012 05:09:41 -0000 X-SWARE-Spam-Status: No, hits=-8.8 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,TW_CP,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Dec 2012 05:09:32 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 1439E33DA01; Mon, 24 Dec 2012 05:09:32 +0000 (UTC) From: Mike Frysinger To: Joel Brobecker Subject: Re: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10. Date: Mon, 24 Dec 2012 05:09:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; ) Cc: gdb-patches@sourceware.org, Tristan Gingold , Iain Sandoe References: <59ABFF71-CA26-452C-B9B2-9B0FC6AAE2BD@sandoe-acoustics.co.uk> <201212232258.05972.vapier@gentoo.org> <20121224042657.GT5370@adacore.com> In-Reply-To: <20121224042657.GT5370@adacore.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7380909.ot7KuE4liT"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201212240010.03213.vapier@gentoo.org> 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: 2012-12/txt/msg00804.txt.bz2 --nextPart7380909.ot7KuE4liT Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1991 On Sunday 23 December 2012 23:26:57 Joel Brobecker wrote: > > how about this instead. it localizes the #ifdef and has a comment. >=20 > 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. hmm, actually, that change won't work :/. it doesn't handle=20 TARGET_OBJECT_DARWIN_DYLD_INFO not being defined. so back to the original patch: --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1823,6 +1823,7 @@ out: return length; } +#ifdef TASK_DYLD_INFO_COUNT /* Read LENGTH bytes at offset ADDR of task_dyld_info for TASK, and=20=20 copy them to RDADDR. Return 0 on failure; number of bytes read / writen otherwise. */ @@ -1848,7 +1849,7 @@ darwin_read_dyld_info (task_t task, CORE_ADDR=20=20 addr, char *rdaddr, int length) memcpy (rdaddr, (char *)&task_dyld_info + addr, length); return length; } - +#endif =0C /* Return 0 on failure, number of bytes handled otherwise. TARGET is ignored. */ @@ -1890,6 +1891,7 @@ darwin_xfer_partial (struct target_ops *ops, case TARGET_OBJECT_MEMORY: return darwin_read_write_inferior (inf->private->task, offset, readbuf, writebuf, len); +#ifdef TASK_DYLD_INFO_COUNT case TARGET_OBJECT_DARWIN_DYLD_INFO: if (writebuf !=3D NULL || readbuf =3D=3D NULL) { @@ -1897,6 +1899,7 @@ darwin_xfer_partial (struct target_ops *ops, return -1; } return darwin_read_dyld_info (inf->private->task, offset, readbuf,= =20 len); +#endif default: return -1; } > I wonder how we are expected to iterate over shared libraries > on Darwin 9 (we no longer have access to this version of Darwin). i don't run any Darwin/OS X version, so i don't know. i just implemented t= his=20 for a fellow Gentoo dev. -mike --nextPart7380909.ot7KuE4liT Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQ1+OrAAoJEEFjO5/oN/WBGoYP+wVBCc0QrfP6MzmKIgoMFPH1 cODNnCVCtr6XVsOq5BVBdhFcoMHsZFT7fkLqquBGfcVTAIDL/B/8Skc20GOrglPS PSjfv6MOBYHPKgqdcDzgo8Yni6K2EvcABq1iGQUI3IOp9emtK+Jvp/s3R7bjiJGm bLB802hxPqPBC6VnTFNVStLUgk1VAvnS/prqIP7F4uclCuCPkJqfSQzO9ZRrwvwN KlekCCzr+oPEiH7N7IhsghvAVyAmjzS8SgcbVuOyv8Wuz99nIJwIUZp31fKPYU+v K90Qz9AAd0VXGdUuWJrrerHHhniWwt74upWSBQOILM+xtqJXdgJehygwGhGXdCpO u26UsJW0nlRBA3wPJsQZSG0V1o7+tBhU3Ahj7jdfxkQEd1EVV3j0PROsiYU9W5qN eeVesMOov1A22/9GRLIkYd4WrWk09qIyCROmJoGRs0H/palMhaPbNZqhl/dIhEHH My/7ipczwLJeqYoedBNw9gyee/IVehHNP3+KZfvJmNo1OloBGPFv/p6K901ypA2P zPWZ1jbtGNSXALL2IWu9Fty8YkTwCdo00Sw+cxSAh+2NlKfDiuj5wqCEVqRtaAS0 ee/P9IeoDuD/ew3BExNSEmlwkcNJVAWV+4FUsX4ixF3DHGFxl9bFAPto85uXiTWq RO6R9luRc9GqvqMafnC1 =MlFY -----END PGP SIGNATURE----- --nextPart7380909.ot7KuE4liT--