Message ID | A78C989F6D9628469189715575E55B23696207B8@IRSMSX104.ger.corp.intel.com |
---|---|
State | New, archived |
Headers |
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: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> 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" <markus.t.metzger@intel.com> To: Simon Marchi <simon.marchi@polymtl.ca>, "gdb-patches@sourceware.org" <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: <A78C989F6D9628469189715575E55B23696207B8@IRSMSX104.ger.corp.intel.com> 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 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes |
Commit Message
Metzger, Markus T
Dec. 7, 2017, 2:49 p.m. UTC
-----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,
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
Comments
On 2017-12-07 09:49 AM, Metzger, Markus T wrote: > -----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. Can you clarify what looks odd? In your quote, there appears to be two added lines (two +): > - = (const char *) xml_find_attribute (attributes, "version")->value; > + = (const char *) xml_find_attribute (attributes, > + "version")->value.get (); But in my patch it's all on the same line. I am confused. > @@ -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. Same thing here. Simon
> -----Original Message----- > From: Simon Marchi [mailto:simon.marchi@ericsson.com] > Sent: 07 December 2017 19:50 > To: Metzger, Markus T <markus.t.metzger@intel.com>; Simon Marchi > <simon.marchi@polymtl.ca>; gdb-patches@sourceware.org > Subject: Re: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector Hello Simon, > In your quote, there appears to be two added lines (two +): > > > - = (const char *) xml_find_attribute (attributes, "version")->value; > > + = (const char *) xml_find_attribute (attributes, > > + "version")->value.get (); > > But in my patch it's all on the same line. I am confused. That's what I meant with odd. Looks like some extra line breaks. > > > @@ -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 (); And here, the line break after ';' seems to have been removed. 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
On 2017-12-08 03:03, Metzger, Markus T wrote: >> In your quote, there appears to be two added lines (two +): >> >> > - = (const char *) xml_find_attribute (attributes, "version")->value; >> > + = (const char *) xml_find_attribute (attributes, >> > + "version")->value.get (); >> >> But in my patch it's all on the same line. I am confused. > > That's what I meant with odd. Looks like some extra line breaks. > >> >> > @@ -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 (); > > And here, the line break after ';' seems to have been removed. Is it possible that this is done by your email client? The snippets you quoted don't look like the version in the archive, there the patch looks fine: https://sourceware.org/ml/gdb-patches/2017-12/msg00045.html Simon
> -----Original Message----- > From: Simon Marchi [mailto:simon.marchi@polymtl.ca] > Sent: 08 December 2017 09:19 > To: Metzger, Markus T <markus.t.metzger@intel.com> > Cc: Simon Marchi <simon.marchi@ericsson.com>; gdb-patches@sourceware.org > Subject: Re: [PATCH] Replace VEC(gdb_xml_value_s) with std::vector > Is it possible that this is done by your email client? The snippets you quoted don't > look like the version in the archive, there the patch looks > fine: > > https://sourceware.org/ml/gdb-patches/2017-12/msg00045.html Indeed. They look good. Strange. 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<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,