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"
-#undef gregset_t
-#undef fpregset_t
-
#include <time.h>
+#include <sys/types.h>
#include <sys/regset.h>
#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;
}
}
}
+
+\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);
+}