[PATCH v2 0/5] Arm: Use feature target descriptions

Alan Hayward
2019-07-11T13:45:34Z

Version 2. First two patches from the original set have been pushed.
1 and 4 are updated as per review comments.
Otherwise identical. Will push mid next week if there are no more comments.

This set of patches is a result of me trying to figure out exactly what
is supported for Arm. It moves Arm over to using feature target descriptions,
simplifying the confusion of xml files in the features/arm/ directory.
In addition it helps to further separate out AArch32.

There are zero functional changes made by this series. The intention is
that all Arm target descriptions are identical before and after the series.
All quirks that might seem odd (for example, the Arm with NEON creates a
vfp3 feature and then a blank neon feature) have been preserved. One of the
patches adds tests to prove the new target descriptions are identical. The
final patch then removes these tests (as they block the removal of the xml
files).

One of the patches breaks the AArch64 gdbserver build, but it is fixed in
the following patch. Preventing this would have meant including additional
unused functionality, and then removing again.

Code has been tested with AArch32, Armv7, and X86 target-all builds. I don't
have every Arm target to test this on, but the xml tests should alleviate any
issue.

Alan Hayward (5):
Arm: Add read_description read funcs and use in GDB
Arm: Use feature target descriptions
Arm: Add xml unit tests
Arm: Use read_description funcs in gdbserver
Arm: Remove unused feature files and tests

gdb/Makefile.in | 5 ++
gdb/aarch32-tdep.c | 33 +++++++++
gdb/aarch32-tdep.h | 25 +++++++
gdb/aarch64-linux-nat.c | 6 +-
gdb/arch/aarch32.c | 43 +++++++++++
gdb/arch/aarch32.h | 27 +++++++
gdb/arch/arm.c | 84 ++++++++++++++++++++++
gdb/arch/arm.h | 27 +++++++
gdb/arm-fbsd-tdep.c | 12 ++--
gdb/arm-linux-nat.c | 11 +--
gdb/arm-linux-tdep.c | 11 +--
gdb/arm-tdep.c | 65 +++++++++++------
gdb/arm-tdep.h | 12 ++--
gdb/configure.tgt | 8 ++-
gdb/features/arm/arm-with-iwmmxt.c | 83 ---------------------
gdb/features/arm/arm-with-iwmmxt.xml | 13 ----
gdb/features/arm/arm-with-m-fpa-layout.c | 46 ------------
gdb/features/arm/arm-with-m-fpa-layout.xml | 46 ------------
gdb/features/arm/arm-with-m-vfp-d16.c | 56 ---------------
gdb/features/arm/arm-with-m-vfp-d16.xml | 14 ----
gdb/features/arm/arm-with-m.c | 37 ----------
gdb/features/arm/arm-with-m.xml | 12 ----
gdb/features/arm/arm-with-neon.c | 74 -------------------
gdb/features/arm/arm-with-neon.xml | 14 ----
gdb/features/arm/arm-with-vfpv2.c | 56 ---------------
gdb/features/arm/arm-with-vfpv2.xml | 13 ----
gdb/features/arm/arm-with-vfpv3.c | 72 -------------------
gdb/features/arm/arm-with-vfpv3.xml | 13 ----
gdb/gdbserver/configure.srv | 22 ++----
gdb/gdbserver/linux-aarch32-low.c | 2 -
gdb/gdbserver/linux-aarch32-low.h | 2 -
gdb/gdbserver/linux-aarch32-tdesc.c | 46 ++++++++++++
gdb/gdbserver/linux-aarch32-tdesc.h | 29 ++++++++
gdb/gdbserver/linux-aarch64-low.c | 3 +-
gdb/gdbserver/linux-arm-low.c | 77 ++++++++++----------
gdb/gdbserver/linux-arm-tdesc.c | 62 ++++++++++++++++
gdb/gdbserver/linux-arm-tdesc.h | 29 ++++++++
37 files changed, 532 insertions(+), 658 deletions(-)
create mode 100644 gdb/aarch32-tdep.c
create mode 100644 gdb/aarch32-tdep.h
create mode 100644 gdb/arch/aarch32.c
create mode 100644 gdb/arch/aarch32.h
delete mode 100644 gdb/features/arm/arm-with-iwmmxt.c
delete mode 100644 gdb/features/arm/arm-with-iwmmxt.xml
delete mode 100644 gdb/features/arm/arm-with-m-fpa-layout.c
delete mode 100644 gdb/features/arm/arm-with-m-fpa-layout.xml
delete mode 100644 gdb/features/arm/arm-with-m-vfp-d16.c
delete mode 100644 gdb/features/arm/arm-with-m-vfp-d16.xml
delete mode 100644 gdb/features/arm/arm-with-m.c
delete mode 100644 gdb/features/arm/arm-with-m.xml
delete mode 100644 gdb/features/arm/arm-with-neon.c
delete mode 100644 gdb/features/arm/arm-with-neon.xml
delete mode 100644 gdb/features/arm/arm-with-vfpv2.c
delete mode 100644 gdb/features/arm/arm-with-vfpv2.xml
delete mode 100644 gdb/features/arm/arm-with-vfpv3.c
delete mode 100644 gdb/features/arm/arm-with-vfpv3.xml
create mode 100644 gdb/gdbserver/linux-aarch32-tdesc.c
create mode 100644 gdb/gdbserver/linux-aarch32-tdesc.h
create mode 100644 gdb/gdbserver/linux-arm-tdesc.c
create mode 100644 gdb/gdbserver/linux-arm-tdesc.h

--
2.20.1 (Apple Git-117)