summaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-12-05 16:30:26 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-12-05 16:30:26 -0500
commitd05200d155f065b93e2dc353a7d33408c7574e9c (patch)
tree259f089741a8913702c161a7eeca62fee5d38f9c /gdb/ChangeLog
parent082b9140d953b9e6a78271384ec48ff5d0ba8fad (diff)
downloadbinutils-gdb-d05200d155f065b93e2dc353a7d33408c7574e9c.tar.gz
Make tdesc_type::u::u::fields an std::vector
This patch makes the tdesc_type::u::u::fields an std::vector of tdesc_type_field. The difficulty here is that the vector is part of a union. Because of this, I made fields a pointer to a vector, and instantiate/destroy the vector if the type is one that uses this member of the union The field tdesc_type_field::name is changed to an std::string at the same time. gdb/ChangeLog: * target-descriptions.c (tdesc_type_field): Remove typedef. (DEF_VEC_O (tdesc_type_field)): Remove. (struct tdesc_type_field): Add constructor. <name>: Change type to std::string. (struct tdesc_type) <tdesc_type>: Instantiate vector if the type kind uses it. <~tdesc_type>: Destroy vector if the type kind uses it. <u::u::fields>: Change type to std::vector. (tdesc_gdb_type): Adjust. (tdesc_add_field): Adjust. (tdesc_add_typed_bitfield): Adjust. (tdesc_add_field): Adjust. (tdesc_add_enum_value): Adjust. (class print_c_tdesc) <visit>: Adjust.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 678942149a4..dde3229e8ec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,22 @@
2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
+ * target-descriptions.c (tdesc_type_field): Remove typedef.
+ (DEF_VEC_O (tdesc_type_field)): Remove.
+ (struct tdesc_type_field): Add constructor.
+ <name>: Change type to std::string.
+ (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
+ kind uses it.
+ <~tdesc_type>: Destroy vector if the type kind uses it.
+ <u::u::fields>: Change type to std::vector.
+ (tdesc_gdb_type): Adjust.
+ (tdesc_add_field): Adjust.
+ (tdesc_add_typed_bitfield): Adjust.
+ (tdesc_add_field): Adjust.
+ (tdesc_add_enum_value): Adjust.
+ (class print_c_tdesc) <visit>: Adjust.
+
+2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
+
* target-descriptions.c (struct tdesc_type) <name>: Change type
to std::string.
<~tdesc_type>: Don't manually free name.