Use visitors for make_gdb_type
authorAlan Hayward <alan.hayward@arm.com>
Mon, 5 Feb 2018 16:33:04 +0000 (16:33 +0000)
committerAlan Hayward <alan.hayward@arm.com>
Mon, 5 Feb 2018 16:34:13 +0000 (16:34 +0000)
commitb8df6ca79e69678a07d3216b9b2b552fce27cda8
treefdaf944f94b02bfb582c541e879664c2ba891f4c
parent89424b1d6965bcda21a225d0f545f43d9294ff21
Use visitors for make_gdb_type

Remove the make_gdb_type functions from the tdesc_type_ classes.
Replace with a static make_gdb_type function that uses a element
visitor called gdb_type_creator.

gdb/
* target-descriptions.c (tdesc_element_visitor) Add empty implementations.
(tdesc_type): Move make_gdb_type from here.
(tdesc_type_builtin): Likewise.
(tdesc_type_vector): Likewise.
(tdesc_type_with_fields): Move make_gdb_type_ functions from here.
(make_gdb_type_struct): Move from tdesc_type_with_fields.
(make_gdb_type_union): Likewise.
(make_gdb_type_flags): Likewise.
(make_gdb_type_enum): Likewise.
(make_gdb_type): New function.
(tdesc_register_type): Use static make_gdb_type.
gdb/ChangeLog
gdb/target-descriptions.c