Commonise tdesc_feature and makes use of it in gdbserver tdesc
authorAlan Hayward <alan.hayward@arm.com>
Wed, 18 Apr 2018 10:39:53 +0000 (11:39 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Wed, 18 Apr 2018 13:00:34 +0000 (14:00 +0100)
commit82ec9bc7055ca76f1f7dd344f3f58bf6aecec7c8
treee9dfea1cdae7262eb147050fe6480d8c39f27c7e
parentea3e7d717982e3c467edc7886b1d6cc2807195af
Commonise tdesc_feature and makes use of it in gdbserver tdesc

gdb/
* common/tdesc.c (tdesc_feature::accept): Move to here.
(tdesc_feature::operator==): Likewise.
(tdesc_create_reg): Likewise.
* common/tdesc.h (tdesc_type_kind): Likewise.
(struct tdesc_type): Likewise.
(struct tdesc_feature): Likewise.
* regformats/regdat.sh: Create a feature.
* target-descriptions.c (tdesc_type_kind): Move from here.
(tdesc_type): Likewise.
(tdesc_type_up): Likewise.
(tdesc_feature): Likewise.
(tdesc_create_reg): Likewise.

gdbserver/
* tdesc.c (~target_desc): Remove implictly deleted items.
(init_target_desc): Iterate all features.
(tdesc_get_features_xml): Use vector.
(tdesc_create_feature): Create feature.
* tdesc.h (tdesc_feature) Remove
(target_desc): Add features.
gdb/ChangeLog
gdb/common/tdesc.c
gdb/common/tdesc.h
gdb/gdbserver/ChangeLog
gdb/gdbserver/tdesc.c
gdb/gdbserver/tdesc.h
gdb/regformats/regdat.sh
gdb/target-descriptions.c