From patchwork Thu Dec 7 14:49:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Metzger, Markus T" X-Patchwork-Id: 24776 Received: (qmail 36982 invoked by alias); 7 Dec 2017 14:49:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 36966 invoked by uid 89); 7 Dec 2017 14:49:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Directors, Managing, supervisory, Chairperson X-HELO: mga18.intel.com Received: from mga18.intel.com (HELO mga18.intel.com) (134.134.136.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Dec 2017 14:49:33 +0000 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Dec 2017 06:49:31 -0800 X-ExtLoop1: 1 Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga006.fm.intel.com with ESMTP; 07 Dec 2017 06:49:30 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.248]) by IRSMSX152.ger.corp.intel.com ([169.254.6.87]) with mapi id 14.03.0319.002; Thu, 7 Dec 2017 14:49:29 +0000 From: "Metzger, Markus T" To: Simon Marchi , "gdb-patches@sourceware.org" Subject: RE: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector Date: Thu, 7 Dec 2017 14:49:28 +0000 Message-ID: References: <20171202164937.13641-1-simon.marchi@polymtl.ca> In-Reply-To: <20171202164937.13641-1-simon.marchi@polymtl.ca> x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTU5NGM3NDItOGVhNC00M2ZmLTk5YWMtZTA5MzQ4ZjJkNzkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJUSDJsUSs4anZIWnpsNmZ0ZEQxUjYyR0xoM2xSTUJ3ZDdwYTE0YnQwYWFJUnhUTWhWa21aczE5VGRrdHV0VTdvIn0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action MIME-Version: 1.0 X-IsSubscribed: yes -----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 Subject: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector Hello Simon, 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 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 &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,