aboutsummaryrefslogtreecommitdiff
path: root/gdb/osdata.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-02-02 16:12:59 +0000
committerPedro Alves <palves@redhat.com>2011-02-02 16:12:59 +0000
commit3d2c1d41d4b6cdaa6052ddfd99b0745cc70c9cbb (patch)
treeaddbf54d22e8398af15ff23704ed86fd84b94bd8 /gdb/osdata.c
parent0af3e2db57c384891ab4f6905ea619930d953ae6 (diff)
downloadgdb-3d2c1d41d4b6cdaa6052ddfd99b0745cc70c9cbb.zip
gdb-3d2c1d41d4b6cdaa6052ddfd99b0745cc70c9cbb.tar.gz
gdb-3d2c1d41d4b6cdaa6052ddfd99b0745cc70c9cbb.tar.bz2
* 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 88190e2..c82746f 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);
}