This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug exp/21717] "print $fpscr" says "<unavailable>" until some VFP data register is printed


https://sourceware.org/bugzilla/show_bug.cgi?id=21717

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-07-21
           Assignee|unassigned at sourceware dot org   |qiyao at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #5 from Yao Qi <qiyao at gcc dot gnu.org> ---
(In reply to Ruslan from comment #4)
> 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.

Indeed, I'll fix it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]