diff options
author | Catalin Udma <catalin.udma@freescale.com> | 2014-12-16 09:51:42 +0200 |
---|---|---|
committer | Catalin Udma <catalin.udma@freescale.com> | 2014-12-16 09:51:42 +0200 |
commit | bf330350c212fb8880faab663f5b3565319d0a95 (patch) | |
tree | 3ed47f08fda36a345b4793c58f8c7e2c7b9ccd2d /gdb/gdbserver | |
parent | 8fda9068191372d8282648986055493be17feff0 (diff) | |
download | gdb-bf330350c212fb8880faab663f5b3565319d0a95.zip gdb-bf330350c212fb8880faab663f5b3565319d0a95.tar.gz gdb-bf330350c212fb8880faab663f5b3565319d0a95.tar.bz2 |
aarch64/gdbserver: fix floating point registers display
When using aarch64 gdb with gdbserver, floating point registers are
not correctly displayed, as below:
(gdb) info registers fpsr fpcr
fpsr <unavailable>
fpcr <unavailable>
To fix these problems, the missing fpsr and fpcr registers are added
when floating point registers are read/write
Add test for aarch64 floating point
PR server/17457
gdb/gdbserver/
PR server/17457
* linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
(AARCH64_FPCR_REGNO): Likewise.
(AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
(aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
(aarch64_store_fpregset): Likewise.
gdb/testsuite/
PR server/17457
* gdb.arch/aarch64-fp.c: New file.
* gdb.arch/aarch64-fp.exp: New file.
Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/gdbserver/linux-aarch64-low.c | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 92b213a..3269b3f 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,12 @@ +2014-12-16 Catalin Udma <catalin.udma@freescale.com> + + PR server/17457 + * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define. + (AARCH64_FPCR_REGNO): Likewise. + (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers. + (aarch64_fill_fpregset): Add missing fpsr/fpcr registers. + (aarch64_store_fpregset): Likewise. + 2014-12-15 Joel Brobecker <brobecker@adacore.com> * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1. diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index 654b319..4fe023f 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -46,8 +46,10 @@ extern const struct target_desc *tdesc_aarch64; #define AARCH64_PC_REGNO 32 #define AARCH64_CPSR_REGNO 33 #define AARCH64_V0_REGNO 34 +#define AARCH64_FPSR_REGNO (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM) +#define AARCH64_FPCR_REGNO (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM + 1) -#define AARCH64_NUM_REGS (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM) +#define AARCH64_NUM_REGS (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM + 2) static int aarch64_regmap [] = @@ -255,6 +257,8 @@ aarch64_fill_fpregset (struct regcache *regcache, void *buf) for (i = 0; i < AARCH64_V_REGS_NUM; i++) collect_register (regcache, AARCH64_V0_REGNO + i, ®set->vregs[i]); + collect_register (regcache, AARCH64_FPSR_REGNO, ®set->fpsr); + collect_register (regcache, AARCH64_FPCR_REGNO, ®set->fpcr); } static void @@ -265,6 +269,8 @@ aarch64_store_fpregset (struct regcache *regcache, const void *buf) for (i = 0; i < AARCH64_V_REGS_NUM; i++) supply_register (regcache, AARCH64_V0_REGNO + i, ®set->vregs[i]); + supply_register (regcache, AARCH64_FPSR_REGNO, ®set->fpsr); + supply_register (regcache, AARCH64_FPCR_REGNO, ®set->fpcr); } /* Enable miscellaneous debugging output. The name is historical - it |