Make target_desc::features an std::vector
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 5 Dec 2017 21:30:23 +0000 (16:30 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:30:23 +0000 (16:30 -0500)
commit3eea796c5daeb7b60531fc3d707470fa91a86e11
tree9d6d50cd9a735f6f63a2c63b42f5224361394bc7
parent40e2a9835f6cf47b630babef3fd788e413ef2dc5
Make target_desc::features an std::vector

This patch makes target_desc to be a vector of unique_ptr to
tdesc_feature objects.  This way, we don't have to manually free the
features and the vector in the target_desc destructor.

gdb/ChangeLog:

* target-descriptions.c (tdesc_feature_p): Remove typedef.
(DEF_VEC_P (tdesc_feature_p)): Remove.
(struct target_desc) <features>: Change type to std::vector.
<~target_desc>: Replace with default implementation.
<accept>: Adjust.
<operator==>: Adjust.
(tdesc_has_registers): Adjust.
(tdesc_find_feature): Adjust.
(tdesc_use_registers): Adjust.
(tdesc_create_feature): Adjust.
gdb/ChangeLog
gdb/target-descriptions.c