void supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) { if (mips_isa_regsize (get_regcache_arch (regcache)) == 4) mips_supply_fpregset (regcache, (const mips_elf_fpregset_t *) fpregsetp); else mips64_supply_fpregset (regcache, (const mips64_elf_fpregset_t *) fpregsetp); }
static void mips_supply_fpregset_wrapper (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { gdb_assert (len == sizeof (mips_elf_fpregset_t)); mips_supply_fpregset (regcache, (const mips_elf_fpregset_t *)gregs); }
static void fetch_core_registers (struct regcache *regcache, char *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR reg_addr) { mips_elf_gregset_t gregset; mips_elf_fpregset_t fpregset; mips64_elf_gregset_t gregset64; mips64_elf_fpregset_t fpregset64; if (which == 0) { if (core_reg_size == sizeof (gregset)) { memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset)); mips_supply_gregset (regcache, (const mips_elf_gregset_t *) &gregset); } else if (core_reg_size == sizeof (gregset64)) { memcpy ((char *) &gregset64, core_reg_sect, sizeof (gregset64)); mips64_supply_gregset (regcache, (const mips64_elf_gregset_t *) &gregset64); } else { warning (_("wrong size gregset struct in core file")); } } else if (which == 2) { if (core_reg_size == sizeof (fpregset)) { memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset)); mips_supply_fpregset (regcache, (const mips_elf_fpregset_t *) &fpregset); } else if (core_reg_size == sizeof (fpregset64)) { memcpy ((char *) &fpregset64, core_reg_sect, sizeof (fpregset64)); mips64_supply_fpregset (regcache, (const mips64_elf_fpregset_t *) &fpregset64); } else { warning (_("wrong size fpregset struct in core file")); } } }