#include "gdbtypes.h"
#include "linux-tdep.h"
#include "observer.h"
-
+#include "auxv.h"
+#include "target.h"
#include "elf-bfd.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;
+}
+
/* Observer for the executable_changed event, to check whether the new
exec binary is a PIE (Position Independent Executable) specimen, which
is currently unsupported. */
in this session.\n"));
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_linux_tdep;
+
void
_initialize_linux_tdep (void)
{