remove long long printf crash
[deliverable/binutils-gdb.git] / gdb / core-sol2.c
index 4ead2ac2085759ebdc1f114747948f72cda79a59..9e07c35b2277fc8092e9045b401a9740470a856e 100644 (file)
@@ -15,14 +15,14 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 
 /* Solaris comes with two flavours of core files, cores generated by
    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"
@@ -34,19 +34,21 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <sys/procfs.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <string.h>
+#include "gdb_string.h"
 
 #include "inferior.h"
 #include "target.h"
 #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 +117,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.025397 seconds and 4 git commands to generate.