diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-02 16:12:59 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-02 16:12:59 +0000 |
commit | 3d2c1d41d4b6cdaa6052ddfd99b0745cc70c9cbb (patch) | |
tree | addbf54d22e8398af15ff23704ed86fd84b94bd8 /gdb/remote.c | |
parent | 0af3e2db57c384891ab4f6905ea619930d953ae6 (diff) | |
download | gdb-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/remote.c')
-rw-r--r-- | gdb/remote.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index b440e9e..c79f6e2 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2505,13 +2505,14 @@ start_thread (struct gdb_xml_parser *parser, struct thread_item item; char *id; + struct gdb_xml_value *attr; - id = VEC_index (gdb_xml_value_s, attributes, 0)->value; + id = xml_find_attribute (attributes, "id")->value; item.ptid = read_ptid (id, NULL); - if (VEC_length (gdb_xml_value_s, attributes) > 1) - item.core = *(ULONGEST *) VEC_index (gdb_xml_value_s, - attributes, 1)->value; + attr = xml_find_attribute (attributes, "core"); + if (attr != NULL) + item.core = *(ULONGEST *) attr->value; else item.core = -1; |