diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-07-30 19:03:49 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-07-30 19:03:49 +0000 |
commit | 2fda49774f178145b87bc2081c69c58c39747d1c (patch) | |
tree | b3d7af63ae1b065714ab1617059730716dcfd536 /gdb/ppc-linux-nat.c | |
parent | 3e000b18800d3409d952a46c96aa3393a1955ac7 (diff) | |
download | binutils-gdb-2fda49774f178145b87bc2081c69c58c39747d1c.tar.gz |
* ppc-linux-tdep.c (ELF_NGREG, ELF_NFPREG, ELF_NVRREG)
(ELF_FPREGSET_SIZE, ELF_GREGSET_SIZE): New enums.
(fetch_core_registers, ppc_linux_supply_gregset)
(ppc_linux_supply_fpregset): New functions.
(ppc_linux_regset_core_fns): New.
(_initialize_ppc_linux_tdep): Call add_core_fns.
* ppc-tdep.h: Add prototypes for ppc_linux_supply_fpregset
and ppc_linux_supply_gregset.
* ppc-linux-nat.c (supply_gregset): Call ppc_linux_supply_gregset.
(supply_fpregset): Call ppc_linux_supply_fpregset.
* config/powerpc/linux.mh (NATDEPFILES): Remove core-regset.o and
corelow.o.
* config/powerpc/linux.mt (TDEPFILES): Add corelow.o.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r-- | gdb/ppc-linux-nat.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 25616c0f047..721e05f8c24 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -475,21 +475,7 @@ store_inferior_registers (int regno) void supply_gregset (gdb_gregset_t *gregsetp) { - int regi; - register elf_greg_t *regp = (elf_greg_t *) gregsetp; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - - for (regi = 0; regi < 32; regi++) - supply_register (regi, (char *) (regp + regi)); - - supply_register (PC_REGNUM, (char *) (regp + PT_NIP)); - supply_register (tdep->ppc_lr_regnum, (char *) (regp + PT_LNK)); - supply_register (tdep->ppc_cr_regnum, (char *) (regp + PT_CCR)); - supply_register (tdep->ppc_xer_regnum, (char *) (regp + PT_XER)); - supply_register (tdep->ppc_ctr_regnum, (char *) (regp + PT_CTR)); - if (tdep->ppc_mq_regnum != -1) - supply_register (tdep->ppc_mq_regnum, (char *) (regp + PT_MQ)); - supply_register (tdep->ppc_ps_regnum, (char *) (regp + PT_MSR)); + ppc_linux_supply_gregset ((char *) gregsetp); } void @@ -525,12 +511,7 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno) void supply_fpregset (gdb_fpregset_t * fpregsetp) { - int regi; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - - for (regi = 0; regi < 32; regi++) - supply_register (FP0_REGNUM + regi, (char *) (*fpregsetp + regi)); - supply_register (tdep->ppc_fpscr_regnum, (char *) (*fpregsetp + 32)); + ppc_linux_supply_fpregset ((char *) fpregsetp); } /* Given a pointer to a floating point register set in /proc format |