new for ptx
[deliverable/binutils-gdb.git] / gdb / coredep.c
index 87be34992aa255ac756bed98f400ddbd087cfe08..ae309800c8fecd70e32f09c410db3f90df06a974 100644 (file)
@@ -21,21 +21,29 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
    this file is more machine-specific.  */
 
 #include "defs.h"
-#include "param.h"
+#include <sys/types.h>
+#include <sys/param.h>
 #include "gdbcore.h"
-#include <stdio.h>
+#include "value.h" /* For supply_register.  */
 
 /* These are needed on various systems to expand REGISTER_U_ADDR.  */
-#include <sys/types.h>
-#include <sys/param.h>
 #ifndef USG
 #include <sys/dir.h>
 #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
 
+#ifdef NEED_SYS_CORE_H
+#include <sys/core.h>
+#endif
 
 /* Extract the register values out of the core file and store
    them where `read_register' will find them.
@@ -70,8 +78,6 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
      NOP.  */
   if (reg_ptr > core_reg_size)
     reg_ptr -= KERNEL_U_ADDR;
-  if (reg_ptr > core_reg_size)
-    fprintf (stderr, "Can't find registers in core file\n");
 
   for (regno = 0; regno < NUM_REGS; regno++)
     {
@@ -83,7 +89,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
        supply_register (regno, core_reg_sect + addr);
       }
     }
-  if (bad_reg > 0)
+  if (bad_reg >= 0)
     {
       error ("Register %s not found in core file.", reg_names[bad_reg]);
     }
This page took 0.024612 seconds and 4 git commands to generate.