Uniquefy gdb.threads/attach-into-signal.exp
[deliverable/binutils-gdb.git] / gdb / memory-map.c
index 77389eb9938b7deddf5e7220f8a429171f3b958e..fa713c9620024cae052d475f0b0804422eb762ff 100644 (file)
@@ -1,7 +1,6 @@
 /* Routines for handling XML memory maps provided by target.
 
-   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 #include "defs.h"
 #include "memory-map.h"
-#include "gdb_assert.h"
-#include "exceptions.h"
-
-#include "gdb_string.h"
 
 #if !defined(HAVE_LIBEXPAT)
 
@@ -64,9 +59,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 +96,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);
 }
 
This page took 0.023826 seconds and 4 git commands to generate.