*** empty log message ***
[binutils-gdb.git] / gdb / linux-tdep.c
index 37770f5f5b93fea2bbd097db60c0f5c6c6aa906d..07fd67c887d1c1b22de73356d4ccbfa173d7b31d 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux, architecture independent.
 
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,9 @@
 #include "defs.h"
 #include "gdbtypes.h"
 #include "linux-tdep.h"
+#include "auxv.h"
+#include "target.h"
+#include "elf/common.h"
 
 /* This function is suitable for architectures that don't
    extend/override the standard siginfo structure.  */
@@ -134,3 +137,18 @@ linux_get_siginfo_type (struct gdbarch *gdbarch)
 
   return siginfo_type;
 }
+
+int
+linux_has_shared_address_space (void)
+{
+  /* Determine whether we are running on uClinux or normal Linux
+     kernel.  */
+  CORE_ADDR dummy;
+  int target_is_uclinux;
+
+  target_is_uclinux
+    = (target_auxv_search (&current_target, AT_NULL, &dummy) > 0
+       && target_auxv_search (&current_target, AT_PAGESZ, &dummy) == 0);
+
+  return target_is_uclinux;
+}