+#include "solib-svr4.h"
+#include "target.h"
+
+/* Core file support. */
+
+/* Even though NetBSD/alpha used ELF since day one, it used the
+ traditional a.out-style core dump format before NetBSD 1.6. */
+
+/* Sizeof `struct reg' in <machine/reg.h>. */
+#define ALPHANBSD_SIZEOF_GREGS (32 * 8)
+
+/* Sizeof `struct fpreg' in <machine/reg.h. */
+#define ALPHANBSD_SIZEOF_FPREGS ((32 * 8) + 8)
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+ in the floating-point register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+static void
+alphanbsd_supply_fpregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len)
+{
+ const gdb_byte *regs = fpregs;
+ int i;
+
+ gdb_assert (len >= ALPHANBSD_SIZEOF_FPREGS);
+
+ for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; i++)
+ {
+ if (regnum == i || regnum == -1)
+ regcache_raw_supply (regcache, i, regs + (i - ALPHA_FP0_REGNUM) * 8);
+ }
+
+ if (regnum == ALPHA_FPCR_REGNUM || regnum == -1)
+ regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 32 * 8);
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+ in the general-purpose register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */