[PATCH] Fix PTRACE_GETREGSET failure for compat inferiors on arm64
Sun Dec 4 19:30:00 GMT 2016
On Sun, Dec 4, 2016 at 3:11 AM, Yao Qi <firstname.lastname@example.org> wrote:
> On Fri, Dec 2, 2016 at 11:08 PM, Kees Cook <email@example.com> wrote:
>>>> diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
>>>> index d11bdc6..2126cd7 100644
>>>> --- a/gdb/arm-linux-nat.c
>>>> +++ b/gdb/arm-linux-nat.c
>>>> @@ -384,17 +384,19 @@ arm_linux_fetch_inferior_registers (struct target_ops *ops,
>>>> if (-1 == regno)
>>>> fetch_regs (regcache);
>>>> - fetch_fpregs (regcache);
>>> We should only call fetch_fpregs if tdep->have_fpa_registers is true.
>> I couldn't determine how this was handled. What actually sets
>> org.gnu.gdb.arm.fpa in tdesc? I found gdb/features/arm/arm-fpa.xml and
>> seems to imply it's always included with arm? I wasn't able to follow,
>> but it seemed like _having_ VFP was a indicator that FPA wasn't used.
> What is I meant is that instead of calling fetch_fpregs unconditionally,
> we call fetch_fpregs if tdep->have_fpa_registers is true, like this,
> if (tdep->have_fpa_registers)
> fetch_fpregs (regcache);
> IOW, we only fetch FPA registers if we know FPA registers are available,
> as described in target description.
Right, I was asking how the target description is built. I couldn't
determine where FPA was detected.
More information about the Gdb-patches