aboutsummaryrefslogtreecommitdiff
path: root/gdb/memory-map.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/memory-map.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/memory-map.c')
-rw-r--r--gdb/memory-map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
index 77389eb..5e61ca5 100644
--- a/gdb/memory-map.c
+++ b/gdb/memory-map.c
@@ -64,9 +64,9 @@ memory_map_start_memory (struct gdb_xml_parser *parser,
struct mem_region *r = VEC_safe_push (mem_region_s, *data->memory_map, NULL);
ULONGEST *start_p, *length_p, *type_p;
- start_p = VEC_index (gdb_xml_value_s, attributes, 0)->value;
- length_p = VEC_index (gdb_xml_value_s, attributes, 1)->value;
- type_p = VEC_index (gdb_xml_value_s, attributes, 2)->value;
+ start_p = xml_find_attribute (attributes, "start")->value;
+ length_p = xml_find_attribute (attributes, "length")->value;
+ type_p = xml_find_attribute (attributes, "type")->value;
mem_region_init (r);
r->lo = *start_p;
@@ -101,7 +101,7 @@ memory_map_start_property (struct gdb_xml_parser *parser,
struct memory_map_parsing_data *data = user_data;
char *name;
- name = VEC_index (gdb_xml_value_s, attributes, 0)->value;
+ name = xml_find_attribute (attributes, "name")->value;
snprintf (data->property_name, sizeof (data->property_name), "%s", name);
}