Make tdesc_feature::registers an std::vector
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:30:24 +0000 (16:30 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:30:24 +0000 (16:30 -0500)
commitc9c895b9666e33a2b910faf9c1b667ea665f00f1
tree2aa36a25f5853aaf5cd5ddebca8f0ce15ec9cd2d
parentf65ff9f9a4add415e5ae332a094b2134c1625517
Make tdesc_feature::registers an std::vector

This patch makes tdesc_feature::registers an std::vector of unique_ptr
to tdesc_reg.  This way, we don't have to manually free the tdesc_reg
objects and the vector in the tdesc_feature destructor.

gdb/ChangeLog:

* target-descriptions.c (tdesc_reg_p): Remove typedef.
(DEF_VEC_P (tdesc_reg_p)): Remove.
(struct tdesc_feature) <registers>: Change type to std::vector.
<~tdesc_feature>: Don't manually free registers.
<accept>: Adjust.
<operator==>: Adjust.
(tdesc_has_registers): Adjust.
(tdesc_find_register_early): Adjust.
(tdesc_use_registers): Adjust.
(tdesc_create_reg): Adjust.
gdb/ChangeLog
gdb/target-descriptions.c