1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / core-sol2.c
index e9cf7dc8fe55696152bf6cb94dc4e2676b87815e..3c69e63612d2cff3680851eb5ac60ed02ef528c6 100644 (file)
@@ -22,14 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    an ELF executable and cores generated by programs that were
    run under BCP (the part of Solaris which allows it to run SunOS4
    a.out files).
-   This file combines the core register fetching from core-svr4.c
+   This file combines the core register fetching from core-regset.c
    and sparc-nat.c to be able to read both flavours.  */
 
 #include "defs.h"
-#undef gregset_t
-#undef fpregset_t
-
 #include <time.h>
+#include <sys/types.h>
 #include <sys/regset.h>
 #include <sys/procfs.h>
 #include <fcntl.h>
@@ -41,12 +39,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "command.h"
 #include "gdbcore.h"
 
-void
+static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR));
+
+static void
 fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
      char *core_reg_sect;
      unsigned core_reg_size;
      int which;
-     unsigned int reg_addr;    /* Unused in this version */
+     CORE_ADDR reg_addr;       /* Unused in this version */
 {
   prgregset_t prgregset;
   prfpregset_t prfpregset;
@@ -115,3 +115,19 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
        }
     }
 }
+
+\f
+/* Register that we are able to handle solaris core file formats. */
+
+static struct core_fns solaris_core_fns =
+{
+  bfd_target_elf_flavour,
+  fetch_core_registers,
+  NULL
+};
+
+void
+_initialize_core_solaris ()
+{
+  add_core_fns (&solaris_core_fns);
+}
This page took 0.023232 seconds and 4 git commands to generate.