From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16760 invoked by alias); 2 Jan 2013 18:39:00 -0000 Received: (qmail 16710 invoked by uid 22791); 2 Jan 2013 18:38:59 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=BAYES_00,KHOP_PGP_SIGNED,KHOP_SPAMHAUS_DROP,SPF_NEUTRAL,TW_CP X-Spam-Check-By: sourceware.org Received: from amun.cheops.bitzolder.nl (HELO amun.cheops.bitzolder.nl) (83.161.135.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Jan 2013 18:38:52 +0000 Received: from nut.cheops.bitzolder.nl ([172.17.2.83] helo=gentoo.org) by amun.cheops.bitzolder.nl with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1TqTDF-00034m-FA for gdb-patches@sourceware.org; Wed, 02 Jan 2013 19:38:51 +0100 Date: Wed, 02 Jan 2013 18:39:00 -0000 From: Fabian Groffen To: gdb-patches@sourceware.org Subject: [PATCH] TASK_DYLD_INFO_COUNT build fix for darwin9 Message-ID: <20130102183848.GM14383@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SuSGaIqs99hP22V3" Content-Disposition: inline User-Agent: Mutt/1.5.21 (Darwin 11.4.2, VIM - Vi IMproved 7.3) X-Content-Scanned: by amun.cheops.bitzolder.nl (Exim Exiscan) using SpamAssassin and ClamAV 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: 2013-01/txt/msg00025.txt.bz2 --SuSGaIqs99hP22V3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1740 This is a resent of patch 3/ from: http://sourceware.org/ml/gdb-patches/2011-12/msg00890.html Modified for 7.5.1 sources, as this is still a problem, see: http://sourceware.org/bugzilla/show_bug.cgi?id=3D14405 From: Iain Sandoe To: gdb-patches at sourceware dot org Date: Thu, 29 Dec 2011 20:30:31 +0000 Subject: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10. gdb: * darwin-nat.c (darwin_read_dyld_info): Only build if TASK_DYLD_INFO_COUNT is available. (darwin_xfer_partial): Don not try to fetch dyld info unless TASK_DYLD_INFO_COUNT is available. =3D=3D=3D=3D TASK_DYLD_INFO_COUNT etc. are not defined. Fixed thus: --- gdb/darwin-nat.c +++ gdb/darwin-nat.c @@ -1814,6 +1814,7 @@ return length; } =20 +#ifdef TASK_DYLD_INFO_COUNT /* Read LENGTH bytes at offset ADDR of task_dyld_info for TASK, and copy t= hem to RDADDR. Return 0 on failure; number of bytes read / writen otherwise. */ @@ -1839,6 +1840,7 @@ memcpy (rdaddr, (char *)&task_dyld_info + addr, length); return length; } +#endif =20 =0C /* Return 0 on failure, number of bytes handled otherwise. TARGET @@ -1881,6 +1883,7 @@ 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) { @@ -1888,6 +1891,7 @@ return -1; } return darwin_read_dyld_info (inf->private->task, offset, readbuf, l= en); +#endif default: return -1; } --=20 Fabian Groffen Gentoo on a different level --SuSGaIqs99hP22V3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 195 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (Darwin) iEYEAREKAAYFAlDkfrgACgkQX3X2B8XHTolmKwCfdLAbRvpGKjT1E0Ob4X1Oc/wt muoAn2za/n5HFxqBIYMtrd7btjahjxVb =/Ee5 -----END PGP SIGNATURE----- --SuSGaIqs99hP22V3--