This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/21717] "print $fpscr" says "<unavailable>" until some VFP data register is printed
- From: "b7.10110111 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 21 Jul 2017 13:36:53 +0000
- Subject: [Bug exp/21717] "print $fpscr" says "<unavailable>" until some VFP data register is printed
- Auto-submitted: auto-generated
- References: <bug-21717-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21717
--- Comment #4 from Ruslan <b7.10110111 at gmail dot com> ---
OK, here's what happens: in arm_linux_fetch_inferior_registers the last branch
else if (tdep->vfp_register_count > 0
&& regno >= ARM_D0_REGNUM
&& regno <= ARM_D0_REGNUM + tdep->vfp_register_count)
fetch_vfp_regs (regcache);
has tdep->vfp_register_count==16, while regno=90 (ARM_FPSCR_REGNUM). As
ARM_D0_REGNUM==58, the call to fetch_vfp_regs(regcache) doesn't happen.
What seems to mismatch here is that VFP register count is 16, i.e. D0-D15, but
enum gdb_regnum contains values up to ARM_D31_REGNUM, thus the next value,
ARM_FPSCR_REGNUM, is not reached by the comparisons. Thus it's not surprising
that the code does work on VFPv3, where there're 32 VFP double-precision
registers.
I suppose there should be a "|| regno==ARM_FPSCR_REGNUM" or something like that
inside the if-condition.
--
You are receiving this mail because:
You are on the CC list for the bug.