Index: xml-tdesc.c =================================================================== RCS file: /cvs/src/src/gdb/xml-tdesc.c,v retrieving revision 1.10 diff -u -p -r1.10 xml-tdesc.c --- xml-tdesc.c 1 Jan 2008 22:53:13 -0000 1.10 +++ xml-tdesc.c 29 Feb 2008 03:36:06 -0000 @@ -114,7 +114,14 @@ tdesc_start_target (struct gdb_xml_parse void *user_data, VEC(gdb_xml_value_s) *attributes) { struct tdesc_parsing_data *data = user_data; - char *version = VEC_index (gdb_xml_value_s, attributes, 0)->value; + int length; + char *version; + + length = VEC_length (gdb_xml_value_s, attributes); + if (length == 0) + return; + + version = VEC_index (gdb_xml_value_s, attributes, 0)->value; if (strcmp (version, "1.0") != 0) gdb_xml_error (parser, @@ -338,7 +345,7 @@ static const struct gdb_xml_element feat }; static const struct gdb_xml_attribute target_attributes[] = { - { "version", GDB_XML_AF_NONE, NULL, NULL }, + { "version", GDB_XML_AF_OPTIONAL, NULL, NULL }, { NULL, GDB_XML_AF_NONE, NULL, NULL } };