summaryrefslogtreecommitdiff
path: root/gdb/osdata.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2011-02-02 16:12:56 +0000
committerPedro Alves <pedro@codesourcery.com>2011-02-02 16:12:56 +0000
commitbe13bb8aedf78660eeeec80ffecc718295da05ee (patch)
treea225233a52e688e6d2ed1d3a7132b39d59c27f51 /gdb/osdata.c
parent93bda8ae0c6a760a7f6c2296e408fe765e1ca6ee (diff)
downloadgdb-be13bb8aedf78660eeeec80ffecc718295da05ee.tar.gz
* xml-support.c (xml_find_attribute): New.
(xinclude_start_include): Use it. * xml-support.h (xml_find_attribute): Declare. * memory-map.c (memory_map_start_memory) (memory_map_start_property): Use xml_find_attribute. * osdata.c (osdata_start_osdata, osdata_start_column): Use xml_find_attribute. * remote.c (start_thread): Use xml_find_attribute. * solib-target.c (library_list_start_segment) (library_list_start_section, library_list_start_library) (library_list_start_list): Use xml_find_attribute. * xml-tdesc.c (tdesc_start_target, tdesc_start_feature) (tdesc_start_union, tdesc_start_struct, tdesc_start_flags) (tdesc_start_field): Use xml_find_attribute.
Diffstat (limited to 'gdb/osdata.c')
-rw-r--r--gdb/osdata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/osdata.c b/gdb/osdata.c
index 88190e2028b..c82746f98c5 100644
--- a/gdb/osdata.c
+++ b/gdb/osdata.c
@@ -68,7 +68,7 @@ osdata_start_osdata (struct gdb_xml_parser *parser,
if (data->osdata)
gdb_xml_error (parser, _("Seen more than on osdata element"));
- type = VEC_index (gdb_xml_value_s, attributes, 0)->value;
+ type = xml_find_attribute (attributes, "type")->value;
osdata = XZALLOC (struct osdata);
osdata->type = xstrdup (type);
data->osdata = osdata;
@@ -95,7 +95,7 @@ osdata_start_column (struct gdb_xml_parser *parser,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
struct osdata_parsing_data *data = user_data;
- const char *name = VEC_index (gdb_xml_value_s, attributes, 0)->value;
+ const char *name = xml_find_attribute (attributes, "name")->value;
data->property_name = xstrdup (name);
}