diff options
author | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2017-11-22 14:02:49 +0000 |
---|---|---|
committer | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2017-11-22 14:02:49 +0000 |
commit | 5aa75429d0531ac6cfe59efd80f1ab01311865b3 (patch) | |
tree | 782ce01aab43dad3a32daad856d5acd413e85998 /gdb/p-lang.c | |
parent | 2400729ecfd2c7be8b18aeaa822fef5a4b503f8a (diff) | |
download | gdb-5aa75429d0531ac6cfe59efd80f1ab01311865b3.zip gdb-5aa75429d0531ac6cfe59efd80f1ab01311865b3.tar.gz gdb-5aa75429d0531ac6cfe59efd80f1ab01311865b3.tar.bz2 |
[GAS/ARM] Clarify relation between reg_expected_msgs and arm_reg_type
Uses of reg_expected_msgs rely on each arm_reg_type enumerator to have a
message entry in the same order as the enumerator declaration. This is
not clearly stated in the definition of both the arm_reg_type enum and
the reg_expected_msgs. Worse, there is nothing to ensure both are kept
in sync.
As an attempt towards this, this patch uses C99 array designators to
ensure that each message is associated with the right arm_reg_type. A
comment is also added near the definition of arm_reg_type to point to
the reg_expected_msgs array. Finally, the array is synced with
arm_reg_type by adding the missing error message for REG_TYPE_RNB.
2017-11-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
gas/
* config/tc-arm.c (arm_reg_type): Comment on the link with
reg_expected_msgs.
(reg_expected_msgs): Initialize using array designators with
arm_reg_type index.
Diffstat (limited to 'gdb/p-lang.c')
0 files changed, 0 insertions, 0 deletions