diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2017-12-05 16:30:28 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-12-05 16:30:28 -0500 |
commit | d4a0e8b57d6f85e4ee4a31e0e6929ff5b4fd9823 (patch) | |
tree | 0e83717fd7af88d2bef064f8580d8ef57d48e428 /gdb/features/rs6000 | |
parent | f0cddbef410cb626ea87b3a954bd4e3d7526115e (diff) | |
download | binutils-gdb-d4a0e8b57d6f85e4ee4a31e0e6929ff5b4fd9823.tar.gz |
Split tdesc_type into multiple classes
This patch makes tdesc_type an abstract base class and creates three
subclasses:
- tdesc_type_builtin, for builtin types
- tdesc_type_vector, for vector types
- tdesc_type_with_fields, for struct, union, flag and enum types
This allows getting rid of the union in tdesc_type and to not allow the
std::vector separately. I tried to go further and create separate
classes for struct, union, flag and enum, but it proved too difficult.
One problem is that from the point of the of the target description
code, the types tdesc_type_* are opaque (only forward-declared).
Therefore, it doesn't know about inheritance relationship between those
classes. This makes it impossible to make functions that accept a
pointer to a base class and pass a pointer to a derived class, for
example. I think this patch here is a good compromise, and if somebody
wants to improve things further, the door is open.
A make_gdb_type virtual pure method is added to tdesc_type, which
replaces the current tdesc_gdb_type function. Calling this method on a
tdesc_type returns the corresponding built gdb type.
gdb/ChangeLog:
* target-descriptions.c (struct tdesc_type): Use default
destructor.
<u>: Remove.
<accept>: Remove.
(struct tdesc_type_builtin): New.
(struct tdesc_type_vector): New.
(struct tdesc_type_with_fields): New.
(tdesc_predefined_types): Change type to tdesc_type_builtin[].
(tdesc_gdb_type): Remove.
(tdesc_register_type): Adjust.
(tdesc_create_vector): Create tdesc_type_vector.
(tdesc_create_struct): Create tdesc_type_with_fields.
(tdesc_set_struct_size): Change parameter type.
(tdesc_create_union): Create tdesc_type_with_fields.
(tdesc_create_flags): Likewise.
(tdesc_create_enum): Likewise.
(tdesc_add_field): Change parameter type.
(tdesc_add_typed_bitfield): Likewise.
(tdesc_add_bitfield): Likewise.
(tdesc_add_flag): Likewise.
(tdesc_add_enum_value): Likewise.
(print_c_tdesc) <visit>: Remove overload with tdesc_type
parameter, add overloads for tdesc_type_builtin,
tdesc_type_with_fields and tdesc_type_vector.
<m_printed_type>: Remove.
<m_printed_element_type, m_printed_type_with_fields>: Add.
* target-descriptions.h (tdesc_create_enum): Change return type.
(tdesc_add_typed_bitfield): Change parameter type.
(tdesc_add_enum_value): Change parameter type.
* xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
type to tdesc_type_with_fields.
(tdesc_start_struct): Adjust.
(tdesc_start_flags): Adjust.
(tdesc_start_enum): Adjust.
(tdesc_start_field): Adjust.
* arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
(struct tdesc_type_vector): Forward-declare.
(struct tdesc_type_with_fields): Forward-declare.
(tdesc_create_struct): Change return type.
(tdesc_create_union): Likewise.
(tdesc_create_flags): Likewise.
(tdesc_add_field): Change parameter type.
(tdesc_set_struct_size): Likewise.
(tdesc_add_bitfield): Likewise.
(tdesc_add_flag): Likewise.
* features: Re-generate C files.
gdb/gdbserver/ChangeLog:
* tdesc.c (struct tdesc_type): Change return type.
(tdesc_add_flag): Change parameter type.
(tdesc_add_bitfield): Likewise.
(tdesc_add_field): Likewise.
(tdesc_set_struct_size): Likewise.
Diffstat (limited to 'gdb/features/rs6000')
-rw-r--r-- | gdb/features/rs6000/powerpc-7400.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec32.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec32l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec64.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec64l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-cell32l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-cell64l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-altivec32l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-altivec64l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-vsx32l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-vsx64l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx32.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx32l.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx64.c | 33 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx64l.c | 33 |
15 files changed, 255 insertions, 240 deletions
diff --git a/gdb/features/rs6000/powerpc-7400.c b/gdb/features/rs6000/powerpc-7400.c index 32b6995fd0e..ba9f12c94b1 100644 --- a/gdb/features/rs6000/powerpc-7400.c +++ b/gdb/features/rs6000/powerpc-7400.c @@ -138,31 +138,32 @@ initialize_tdesc_powerpc_7400 (void) tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 119, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 120, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-altivec32.c b/gdb/features/rs6000/powerpc-altivec32.c index e97132ec750..9cb83cad1c2 100644 --- a/gdb/features/rs6000/powerpc-altivec32.c +++ b/gdb/features/rs6000/powerpc-altivec32.c @@ -90,31 +90,32 @@ initialize_tdesc_powerpc_altivec32 (void) tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 71, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 72, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-altivec32l.c b/gdb/features/rs6000/powerpc-altivec32l.c index a9445d96d01..afaf8ed3e41 100644 --- a/gdb/features/rs6000/powerpc-altivec32l.c +++ b/gdb/features/rs6000/powerpc-altivec32l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_altivec32l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-altivec64.c b/gdb/features/rs6000/powerpc-altivec64.c index 3b626a94419..94041e113b4 100644 --- a/gdb/features/rs6000/powerpc-altivec64.c +++ b/gdb/features/rs6000/powerpc-altivec64.c @@ -90,31 +90,32 @@ initialize_tdesc_powerpc_altivec64 (void) tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 71, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 72, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-altivec64l.c b/gdb/features/rs6000/powerpc-altivec64l.c index cca53537722..c7ed171cfa8 100644 --- a/gdb/features/rs6000/powerpc-altivec64l.c +++ b/gdb/features/rs6000/powerpc-altivec64l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_altivec64l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-cell32l.c b/gdb/features/rs6000/powerpc-cell32l.c index c615b8d8d63..390d7b28824 100644 --- a/gdb/features/rs6000/powerpc-cell32l.c +++ b/gdb/features/rs6000/powerpc-cell32l.c @@ -96,31 +96,32 @@ initialize_tdesc_powerpc_cell32l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-cell64l.c b/gdb/features/rs6000/powerpc-cell64l.c index 5040e5e929e..39890baf83f 100644 --- a/gdb/features/rs6000/powerpc-cell64l.c +++ b/gdb/features/rs6000/powerpc-cell64l.c @@ -96,31 +96,32 @@ initialize_tdesc_powerpc_cell64l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-isa205-altivec32l.c b/gdb/features/rs6000/powerpc-isa205-altivec32l.c index 943d02db469..203bb4a71a3 100644 --- a/gdb/features/rs6000/powerpc-isa205-altivec32l.c +++ b/gdb/features/rs6000/powerpc-isa205-altivec32l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_isa205_altivec32l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-isa205-altivec64l.c b/gdb/features/rs6000/powerpc-isa205-altivec64l.c index d454bac1b85..8f66a161ff0 100644 --- a/gdb/features/rs6000/powerpc-isa205-altivec64l.c +++ b/gdb/features/rs6000/powerpc-isa205-altivec64l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_isa205_altivec64l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-isa205-vsx32l.c b/gdb/features/rs6000/powerpc-isa205-vsx32l.c index 09fd5cee29d..fc0f615cd0b 100644 --- a/gdb/features/rs6000/powerpc-isa205-vsx32l.c +++ b/gdb/features/rs6000/powerpc-isa205-vsx32l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_isa205_vsx32l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-isa205-vsx64l.c b/gdb/features/rs6000/powerpc-isa205-vsx64l.c index d295ab77260..3313d04a6ab 100644 --- a/gdb/features/rs6000/powerpc-isa205-vsx64l.c +++ b/gdb/features/rs6000/powerpc-isa205-vsx64l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_isa205_vsx64l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-vsx32.c b/gdb/features/rs6000/powerpc-vsx32.c index 8cf75624680..1a824a825f3 100644 --- a/gdb/features/rs6000/powerpc-vsx32.c +++ b/gdb/features/rs6000/powerpc-vsx32.c @@ -90,31 +90,32 @@ initialize_tdesc_powerpc_vsx32 (void) tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 71, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 72, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-vsx32l.c b/gdb/features/rs6000/powerpc-vsx32l.c index e8c18815532..f5bf11e675e 100644 --- a/gdb/features/rs6000/powerpc-vsx32l.c +++ b/gdb/features/rs6000/powerpc-vsx32l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_vsx32l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-vsx64.c b/gdb/features/rs6000/powerpc-vsx64.c index 30953c539c1..601df398e08 100644 --- a/gdb/features/rs6000/powerpc-vsx64.c +++ b/gdb/features/rs6000/powerpc-vsx64.c @@ -90,31 +90,32 @@ initialize_tdesc_powerpc_vsx64 (void) tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 71, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 72, 1, NULL, 128, "vec128"); diff --git a/gdb/features/rs6000/powerpc-vsx64l.c b/gdb/features/rs6000/powerpc-vsx64l.c index 5f126505476..d34bd811fb6 100644 --- a/gdb/features/rs6000/powerpc-vsx64l.c +++ b/gdb/features/rs6000/powerpc-vsx64l.c @@ -94,31 +94,32 @@ initialize_tdesc_powerpc_vsx64l (void) tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int"); feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec"); - struct tdesc_type *field_type; - field_type = tdesc_named_type (feature, "ieee_single"); - tdesc_create_vector (feature, "v4f", field_type, 4); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "ieee_single"); + tdesc_create_vector (feature, "v4f", element_type, 4); - field_type = tdesc_named_type (feature, "int32"); - tdesc_create_vector (feature, "v4i32", field_type, 4); + element_type = tdesc_named_type (feature, "int32"); + tdesc_create_vector (feature, "v4i32", element_type, 4); - field_type = tdesc_named_type (feature, "int16"); - tdesc_create_vector (feature, "v8i16", field_type, 8); + element_type = tdesc_named_type (feature, "int16"); + tdesc_create_vector (feature, "v8i16", element_type, 8); - field_type = tdesc_named_type (feature, "int8"); - tdesc_create_vector (feature, "v16i8", field_type, 16); + element_type = tdesc_named_type (feature, "int8"); + tdesc_create_vector (feature, "v16i8", element_type, 16); - struct tdesc_type *type; - type = tdesc_create_union (feature, "vec128"); + tdesc_type_with_fields *type_with_fields; + tdesc_type *field_type; + type_with_fields = tdesc_create_union (feature, "vec128"); field_type = tdesc_named_type (feature, "uint128"); - tdesc_add_field (type, "uint128", field_type); + tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); - tdesc_add_field (type, "v4_float", field_type); + tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v4i32"); - tdesc_add_field (type, "v4_int32", field_type); + tdesc_add_field (type_with_fields, "v4_int32", field_type); field_type = tdesc_named_type (feature, "v8i16"); - tdesc_add_field (type, "v8_int16", field_type); + tdesc_add_field (type_with_fields, "v8_int16", field_type); field_type = tdesc_named_type (feature, "v16i8"); - tdesc_add_field (type, "v16_int8", field_type); + tdesc_add_field (type_with_fields, "v16_int8", field_type); tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128"); tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128"); |