/* 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.
#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. */
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 (¤t_target, AT_NULL, &dummy) > 0
+ && target_auxv_search (¤t_target, AT_PAGESZ, &dummy) == 0);
+
+ return target_is_uclinux;
+}