aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2012-05-22 13:50:50 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2012-05-22 13:50:50 +0000
commit23512c015ea3be9106e07b67133eaa2425dbcefd (patch)
tree8d6b204e728712de00e13454c7615c083b4a585b
parent90061c3348116fbc64c9ef19dc28c154450d218e (diff)
downloadgdb-23512c015ea3be9106e07b67133eaa2425dbcefd.zip
gdb-23512c015ea3be9106e07b67133eaa2425dbcefd.tar.gz
gdb-23512c015ea3be9106e07b67133eaa2425dbcefd.tar.bz2
2012-05-22 Will Deacon <will.deacon@arm.com>
* linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)): Include asm/ptrace.h. (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not already defined.
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/linux-low.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index cf34bac..5017bc6 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-22 Will Deacon <will.deacon@arm.com>
+
+ * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
+ Include asm/ptrace.h.
+ (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
+ already defined.
+
2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
* linux-low.c (linux_store_registers): Don't re-retrieve data
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 712cc03..19f7be6 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -78,6 +78,8 @@
#ifdef __UCLIBC__
#if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+/* PTRACE_TEXT_ADDR and friends. */
+#include <asm/ptrace.h>
#define HAS_NOMMU
#endif
#endif
@@ -4796,6 +4798,9 @@ linux_stopped_data_address (void)
}
#if defined(__UCLIBC__) && defined(HAS_NOMMU)
+#if ! (defined(PT_TEXT_ADDR) \
+ || defined(PT_DATA_ADDR) \
+ || defined(PT_TEXT_END_ADDR))
#if defined(__mcoldfire__)
/* These should really be defined in the kernel's ptrace.h header. */
#define PT_TEXT_ADDR 49*4
@@ -4810,6 +4815,7 @@ linux_stopped_data_address (void)
#define PT_DATA_ADDR (0x10004*4)
#define PT_TEXT_END_ADDR (0x10008*4)
#endif
+#endif
/* Under uClinux, programs are loaded at non-zero offsets, which we need
to tell gdb about. */