aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-01-02 21:06:30 +0000
committerMike Frysinger <vapier@gentoo.org>2013-01-02 21:06:30 +0000
commit569283d40e3546979fd7c222c61408dd107de32b (patch)
treef9ae1c1856745e2e5634e468552901d69f53f1c6 /gdb
parent2e36fbea4cb35f1fee549d234744d4a729ba0b40 (diff)
downloadgdb-569283d40e3546979fd7c222c61408dd107de32b.zip
gdb-569283d40e3546979fd7c222c61408dd107de32b.tar.gz
gdb-569283d40e3546979fd7c222c61408dd107de32b.tar.bz2
gdb: fix building on Darwin 9
TASK_DYLD_INFO_COUNT etc. are not defined.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/darwin-nat.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7ad74ea..6e840dc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-02 Iain Sandoe <developer@sandoe-acoustics.co.uk>
+
+ * darwin-nat.c (darwin_read_dyld_info): Only build if
+ TASK_DYLD_INFO_COUNT is defined.
+ (darwin_xfer_partial): Call darwin_read_dyld_info only if
+ TASK_DYLD_INFO_COUNT is defined.
+
2013-01-02 Tom Tromey <tromey@redhat.com>
* symfile.h (struct ecoff_debug_hack): Remove.
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 0d18305..0307048 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1816,8 +1816,10 @@ out:
/* 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. */
+ Return 0 on failure; number of bytes read / written otherwise. */
+#ifndef TASK_DYLD_INFO_COUNT
+/* This is not available in Darwin 9. */
static int
darwin_read_dyld_info (task_t task, CORE_ADDR addr, char *rdaddr, int length)
{
@@ -1839,6 +1841,7 @@ darwin_read_dyld_info (task_t task, CORE_ADDR addr, char *rdaddr, int length)
memcpy (rdaddr, (char *)&task_dyld_info + addr, length);
return length;
}
+#endif
/* Return 0 on failure, number of bytes handled otherwise. TARGET
@@ -1881,6 +1884,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 != NULL || readbuf == NULL)
{
@@ -1888,6 +1892,7 @@ darwin_xfer_partial (struct target_ops *ops,
return -1;
}
return darwin_read_dyld_info (inf->private->task, offset, readbuf, len);
+#endif
default:
return -1;
}