1999-02-02 Martin Hunt <hunt@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / irix4-nat.c
index 3141f105df2855b9774bc1a9f1cd15cafd2c5c88..5a6e111222969e8f1064223d0a8621bdd11a2bf5 100644 (file)
@@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "inferior.h"
+#include "gdbcore.h"
 
 #include <sys/time.h>
 #include <sys/procfs.h>
@@ -34,6 +35,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 typedef unsigned int greg_t;   /* why isn't this defined? */
 
+static void
+fetch_core_registers PARAMS ((char *, unsigned int, int, CORE_ADDR));
+
 /*
  * See the comment in m68k-tdep.c regarding the utility of these functions.
  */
@@ -157,12 +161,12 @@ get_longjmp_target (pc)
   return 1;
 }
 
-void
+static void
 fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
      char *core_reg_sect;
      unsigned core_reg_size;
      int which;                        /* Unused */
-     unsigned int reg_addr;    /* Unused */
+     CORE_ADDR reg_addr;       /* Unused */
 {
   if (core_reg_size != REGISTER_BYTES)
     {
@@ -172,3 +176,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
 
   memcpy ((char *)registers, core_reg_sect, core_reg_size);
 }
+
+\f
+/* Register that we are able to handle irix4 core file formats.
+   FIXME: is this really bfd_target_unknown_flavour? */
+
+static struct core_fns irix4_core_fns =
+{
+  bfd_target_unknown_flavour,
+  fetch_core_registers,
+  NULL
+};
+
+void
+_initialize_core_irix4 ()
+{
+  add_core_fns (&irix4_core_fns);
+}
This page took 0.023888 seconds and 4 git commands to generate.