-\f
-
-/* See common/tdesc.h. */
-
-void
-tdesc_create_reg (struct tdesc_feature *feature, const char *name,
- int regnum, int save_restore, const char *group,
- int bitsize, const char *type)
-{
- tdesc_reg *reg = new tdesc_reg (feature, name, regnum, save_restore,
- group, bitsize, type);
-
- feature->registers.emplace_back (reg);
-}
-
-/* See common/tdesc.h. */
-
-struct tdesc_type *
-tdesc_create_vector (struct tdesc_feature *feature, const char *name,
- struct tdesc_type *field_type, int count)
-{
- tdesc_type_vector *type = new tdesc_type_vector (name, field_type, count);
- feature->types.emplace_back (type);
-
- return type;
-}
-
-/* See common/tdesc.h. */
-
-tdesc_type_with_fields *
-tdesc_create_struct (struct tdesc_feature *feature, const char *name)
-{
- tdesc_type_with_fields *type
- = new tdesc_type_with_fields (name, TDESC_TYPE_STRUCT);
- feature->types.emplace_back (type);
-
- return type;
-}
-
-/* See common/tdesc.h. */
-
-void
-tdesc_set_struct_size (tdesc_type_with_fields *type, int size)
-{
- gdb_assert (type->kind == TDESC_TYPE_STRUCT);
- gdb_assert (size > 0);
- type->size = size;
-}
-
-/* See common/tdesc.h. */
-
-tdesc_type_with_fields *
-tdesc_create_union (struct tdesc_feature *feature, const char *name)
-{
- tdesc_type_with_fields *type
- = new tdesc_type_with_fields (name, TDESC_TYPE_UNION);
- feature->types.emplace_back (type);
-
- return type;
-}
-
-/* See common/tdesc.h. */
-
-tdesc_type_with_fields *
-tdesc_create_flags (struct tdesc_feature *feature, const char *name,
- int size)
-{
- gdb_assert (size > 0);
-
- tdesc_type_with_fields *type
- = new tdesc_type_with_fields (name, TDESC_TYPE_FLAGS, size);
- feature->types.emplace_back (type);
-
- return type;
-}
-
-tdesc_type_with_fields *
-tdesc_create_enum (struct tdesc_feature *feature, const char *name,
- int size)
-{
- gdb_assert (size > 0);
-
- tdesc_type_with_fields *type
- = new tdesc_type_with_fields (name, TDESC_TYPE_ENUM, size);
- feature->types.emplace_back (type);
-
- return type;
-}
-
-/* See common/tdesc.h. */
-
-void
-tdesc_add_field (tdesc_type_with_fields *type, const char *field_name,
- struct tdesc_type *field_type)
-{
- gdb_assert (type->kind == TDESC_TYPE_UNION
- || type->kind == TDESC_TYPE_STRUCT);
-
- /* Initialize start and end so we know this is not a bit-field
- when we print-c-tdesc. */
- type->fields.emplace_back (field_name, field_type, -1, -1);
-}
-
-void
-tdesc_add_typed_bitfield (tdesc_type_with_fields *type, const char *field_name,
- int start, int end, struct tdesc_type *field_type)
-{
- gdb_assert (type->kind == TDESC_TYPE_STRUCT
- || type->kind == TDESC_TYPE_FLAGS);
- gdb_assert (start >= 0 && end >= start);
-
- type->fields.emplace_back (field_name, field_type, start, end);
-}