This is the mail archive of the gdb-patches@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]

Re: [PATCH] [ARM] Access FPSCR on vfpv2


On Tue, Jul 25, 2017 at 10:05 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
> GDB can fetch or store FPSCR on vfpv3, which has 32 VFP registers, but
> fail to do so on vfpv2, which has 16 VFP registers.  GDB code is incorrect
> for vfpv2,
>
>        else if (tdep->vfp_register_count > 0
>                && regno >= ARM_D0_REGNUM
>                && regno <= ARM_D0_REGNUM + tdep->vfp_register_count)
>
> while FPSCR register number is defined as ARM_D0_REGNUM + 32.
>
>   ARM_D0_REGNUM,                /* VFP double-precision registers.  */
>   ARM_D31_REGNUM = ARM_D0_REGNUM + 31,
>   ARM_FPSCR_REGNUM,
>
> The code above uses "<=" rather than "<", in order to put FPSCR in the
> range, but it is only correct when tdep->vfp_register_count is 32.  On
> vpfv2, it is 16, and FPSCR is out of the range, so fetch_vfp_regs or
> store_vfp_regs are not called.

I also pushed it to 8.0 branch, and update the wiki
page  for 8.0.1 release.
https://sourceware.org/gdb/wiki/GDB_8.0_Release

-- 
Yao (齐尧)


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