From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22325 invoked by alias); 2 Jan 2013 19:35:19 -0000 Received: (qmail 22259 invoked by uid 22791); 2 Jan 2013 19:35:18 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED,TW_CP 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, 02 Jan 2013 19:35:12 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D30CC290059; Wed, 2 Jan 2013 20:35:19 +0100 (CET) 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 JVY4svt8R-NH; Wed, 2 Jan 2013 20:35:19 +0100 (CET) Received: from [192.168.0.14] (mtg95-3-82-238-192-125.fbx.proxad.net [82.238.192.125]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id E7D2D290054; Wed, 2 Jan 2013 20:35:18 +0100 (CET) Subject: Re: [PATCH] TASK_DYLD_INFO_COUNT build fix for darwin9 Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20130102183848.GM14383@gentoo.org> Date: Wed, 02 Jan 2013 19:35:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <937AAF12-6E3D-4F3D-8C1F-40A4D135CA54@adacore.com> References: <20130102183848.GM14383@gentoo.org> To: Fabian Groffen 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: 2013-01/txt/msg00027.txt.bz2 On Jan 2, 2013, at 7:38 PM, Fabian Groffen wrote: > This is a resent of patch 3/ from: > http://sourceware.org/ml/gdb-patches/2011-12/msg00890.html >=20 > Modified for 7.5.1 sources, as this is still a problem, see: > http://sourceware.org/bugzilla/show_bug.cgi?id=3D14405 >=20 > 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. >=20 > gdb: >=20 > * 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. Ok. >=20 > =3D=3D=3D=3D >=20 > TASK_DYLD_INFO_COUNT etc. are not defined. >=20 > 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 = them > 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 >=20 > /* 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, = len); > +#endif > default: > return -1; > } >=20 >=20 > --=20 > Fabian Groffen > Gentoo on a different level