aboutsummaryrefslogtreecommitdiff
path: root/gdb/xml-tdesc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xml-tdesc.c')
-rw-r--r--gdb/xml-tdesc.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index a50ac5e..ae689fd 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -83,7 +83,7 @@ struct tdesc_parsing_data
int next_regnum;
/* The struct or union we are currently parsing, or last parsed. */
- struct tdesc_type *current_type;
+ tdesc_type_with_fields *current_type;
/* The byte size of the current struct/flags type, if specified. Zero
if not specified. Flags values must specify a size. */
@@ -244,11 +244,11 @@ tdesc_start_struct (struct gdb_xml_parser *parser,
{
struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
char *id = (char *) xml_find_attribute (attributes, "id")->value;
- struct tdesc_type *type;
struct gdb_xml_value *attr;
- type = tdesc_create_struct (data->current_feature, id);
- data->current_type = type;
+ tdesc_type_with_fields *type_with_fields
+ = tdesc_create_struct (data->current_feature, id);
+ data->current_type = type_with_fields;
data->current_type_size = 0;
attr = xml_find_attribute (attributes, "size");
@@ -262,7 +262,7 @@ tdesc_start_struct (struct gdb_xml_parser *parser,
_("Struct size %s is larger than maximum (%d)"),
pulongest (size), MAX_FIELD_SIZE);
}
- tdesc_set_struct_size (type, size);
+ tdesc_set_struct_size (type_with_fields, size);
data->current_type_size = size;
}
}
@@ -276,7 +276,6 @@ tdesc_start_flags (struct gdb_xml_parser *parser,
char *id = (char *) xml_find_attribute (attributes, "id")->value;
ULONGEST size = * (ULONGEST *)
xml_find_attribute (attributes, "size")->value;
- struct tdesc_type *type;
if (size > MAX_FIELD_SIZE)
{
@@ -284,9 +283,8 @@ tdesc_start_flags (struct gdb_xml_parser *parser,
_("Flags size %s is larger than maximum (%d)"),
pulongest (size), MAX_FIELD_SIZE);
}
- type = tdesc_create_flags (data->current_feature, id, size);
- data->current_type = type;
+ data->current_type = tdesc_create_flags (data->current_feature, id, size);
data->current_type_size = size;
}
@@ -299,7 +297,6 @@ tdesc_start_enum (struct gdb_xml_parser *parser,
char *id = (char *) xml_find_attribute (attributes, "id")->value;
int size = * (ULONGEST *)
xml_find_attribute (attributes, "size")->value;
- struct tdesc_type *type;
if (size > MAX_FIELD_SIZE)
{
@@ -307,9 +304,8 @@ tdesc_start_enum (struct gdb_xml_parser *parser,
_("Enum size %s is larger than maximum (%d)"),
pulongest (size), MAX_FIELD_SIZE);
}
- type = tdesc_create_enum (data->current_feature, id, size);
- data->current_type = type;
+ data->current_type = tdesc_create_enum (data->current_feature, id, size);
data->current_type_size = 0;
}
@@ -375,7 +371,7 @@ tdesc_start_field (struct gdb_xml_parser *parser,
if (start != -1)
{
- struct tdesc_type *t = data->current_type;
+ tdesc_type_with_fields *t = data->current_type;
/* Older versions of gdb can't handle elided end values.
Stick with that for now, to help ensure backward compatibility.