#include <sys/types.h>
#include <sys/param.h>
#include "gdbcore.h"
-#include "nm.h"
/* These are needed on various systems to expand REGISTER_U_ADDR. */
#ifndef USG
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/user.h>
-#include <sys/ptrace.h>
+#ifndef NO_PTRACE_H
+# ifdef PTRACE_IN_WRONG_PLACE
+# include <ptrace.h>
+# else /* !PTRACE_IN_WRONG_PLACE */
+# include <sys/ptrace.h>
+# endif /* !PTRACE_IN_WRONG_PLACE */
+#endif /* NO_PTRACE_H */
#endif
/* Extract the register values out of the core file and store