Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: Fabian Groffen <grobian@gentoo.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] TASK_DYLD_INFO_COUNT build fix for darwin9
Date: Wed, 02 Jan 2013 19:35:00 -0000	[thread overview]
Message-ID: <937AAF12-6E3D-4F3D-8C1F-40A4D135CA54@adacore.com> (raw)
In-Reply-To: <20130102183848.GM14383@gentoo.org>


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
> 
> Modified for 7.5.1 sources, as this is still a problem, see:
> http://sourceware.org/bugzilla/show_bug.cgi?id=14405
> 
> From: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
> 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.

Ok.

> 
> ====
> 
> TASK_DYLD_INFO_COUNT etc. are not defined.
> 
> Fixed thus:
> --- gdb/darwin-nat.c
> +++ gdb/darwin-nat.c
> @@ -1814,6 +1814,7 @@
>   return length;
> }
> 
> +#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
> 
> 
> /* 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 != NULL || readbuf == NULL)
>         {
> @@ -1888,6 +1891,7 @@
>           return -1;
>         }
>       return darwin_read_dyld_info (inf->private->task, offset, readbuf, len);
> +#endif
>     default:
>       return -1;
>     }
> 
> 
> -- 
> Fabian Groffen
> Gentoo on a different level


  reply	other threads:[~2013-01-02 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 18:39 Fabian Groffen
2013-01-02 19:35 ` Tristan Gingold [this message]
2013-01-02 21:05   ` Mike Frysinger
2013-01-07 11:21     ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=937AAF12-6E3D-4F3D-8C1F-40A4D135CA54@adacore.com \
    --to=gingold@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=grobian@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox