This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 7 Dec 2017 14:49:28 +0000
- Subject: RE: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector
- Authentication-results: sourceware.org; auth=none
- Dlp-product: dlpe-windows
- Dlp-reaction: no-action
- Dlp-version: 11.0.0.116
- References: <20171202164937.13641-1-simon.marchi@polymtl.ca>
-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Simon Marchi
Sent: 02 December 2017 17:50
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector
Hello Simon,
diff --git a/gdb/btrace.c b/gdb/btrace.c index 8338ebfb0a..547f43d691 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -2004,10 +2004,11 @@ btrace_free_objfile (struct objfile *objfile) static void check_xml_btrace_version (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)
{
const char *version
- = (const char *) xml_find_attribute (attributes, "version")->value;
+ = (const char *) xml_find_attribute (attributes,
+ "version")->value.get ();
This looks a bit odd.
@@ -2040,8 +2042,8 @@ parse_xml_btrace_block (struct gdb_xml_parser *parser,
gdb_xml_error (parser, _("Btrace format error."));
}
- begin = (ULONGEST *) xml_find_attribute (attributes, "begin")->value;
- end = (ULONGEST *) xml_find_attribute (attributes, "end")->value;
+ begin = (ULONGEST *) xml_find_attribute (attributes,
+ "begin")->value.get (); end = (ULONGEST *) xml_find_attribute
+ (attributes, "end")->value.get ();
This too.
Thanks,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928