aboutsummaryrefslogtreecommitdiff
path: root/gdb/xml-support.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xml-support.h')
-rw-r--r--gdb/xml-support.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/xml-support.h b/gdb/xml-support.h
index ee5fd52..5947623 100644
--- a/gdb/xml-support.h
+++ b/gdb/xml-support.h
@@ -74,11 +74,13 @@ bool xml_process_xincludes (std::string &result,
struct gdb_xml_value
{
+ gdb_xml_value (const char *name_, void *value_)
+ : name (name_), value (value_)
+ {}
+
const char *name;
- void *value;
+ gdb::unique_xmalloc_ptr<void> value;
};
-typedef struct gdb_xml_value gdb_xml_value_s;
-DEF_VEC_O(gdb_xml_value_s);
/* The type of an attribute handler.
@@ -146,7 +148,7 @@ enum gdb_xml_element_flag
typedef void (gdb_xml_element_start_handler)
(struct gdb_xml_parser *parser, const struct gdb_xml_element *element,
- void *user_data, VEC(gdb_xml_value_s) *attributes);
+ void *user_data, std::vector<gdb_xml_value> &attributes);
/* A handler called at the end of an element.
@@ -199,8 +201,8 @@ void gdb_xml_error (struct gdb_xml_parser *parser, const char *format, ...)
/* Find the attribute named NAME in the set of parsed attributes
ATTRIBUTES. Returns NULL if not found. */
-struct gdb_xml_value *xml_find_attribute (VEC(gdb_xml_value_s) *attributes,
- const char *name);
+struct gdb_xml_value *xml_find_attribute
+ (std::vector<gdb_xml_value> &attributes, const char *name);
/* Parse an integer attribute into a ULONGEST. */