gdb/riscv: Improve flen length determination
authorSimon Cook <simon.cook@embecosm.com>
Wed, 22 May 2019 11:59:58 +0000 (12:59 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 22 May 2019 12:02:51 +0000 (13:02 +0100)
commit0a5954bd5f96dd665cb733b9ab6f2ca67bb4632d
tree33727c7376c4132e4a2623c8fd58f53102d85b96
parent7166f90a7756a3b68cfb93b5ea4a026e9b5f2459
gdb/riscv: Improve flen length determination

This solves an assertion failure when a remote provides a target
description which only refers to floating point registers by their
hardware name (e.g. f0), rather than their ABI name (e.g. ft0). GDB
assumed that should the floating point register feature be presented,
it would contain a register called ft0.

The floating point length is now instead determined by searching for
the same register, but looking for any of its aliases.

gdb/ChangeLog:

* riscv-tdep.c (riscv_gdbarch_init): Support determining flen from
target descriptions using exclusively floating point register name
aliases.
gdb/ChangeLog
gdb/riscv-tdep.c