Message ID | 20200128142830.89282-2-ldurfina@tachyum.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 125774 invoked by alias); 28 Jan 2020 14:28:50 -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 125634 invoked by uid 89); 28 Jan 2020 14:28:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:0800, HX-Languages-Length:933 X-HELO: mail.tachyum.com Received: from mail.tachyum.com (HELO mail.tachyum.com) (66.160.133.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Jan 2020 14:28:48 +0000 Received: by mail.tachyum.com (Postfix, from userid 1001) id CA96E86E; Tue, 28 Jan 2020 06:28:50 -0800 (PST) Received: from THQ-IP-EX1.tachyum.com (relayhost.tachyum.com [10.7.1.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.tachyum.com (Postfix) with ESMTPS id 778E5220 for <gdb-patches@sourceware.org>; Tue, 28 Jan 2020 06:28:50 -0800 (PST) Received: from tachyum-sk-server.tachyum.com (10.7.241.13) by THQ-IP-EX1.tachyum.com (10.7.1.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1779.2; Tue, 28 Jan 2020 06:28:45 -0800 From: Lukas Durfina <ldurfina@tachyum.com> To: <gdb-patches@sourceware.org> Subject: [PATCH 2/2] gdb: Fix a type of sentinel Date: Tue, 28 Jan 2020 15:28:30 +0100 Message-ID: <20200128142830.89282-2-ldurfina@tachyum.com> In-Reply-To: <20200128142830.89282-1-ldurfina@tachyum.com> References: <20200128142830.89282-1-ldurfina@tachyum.com> MIME-Version: 1.0 Content-Type: text/plain |
Commit Message
ldurfina@tachyum.com
Jan. 28, 2020, 2:28 p.m. UTC
--- gdb/ChangeLog | 4 ++++ gdb/charset.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
Comments
On 2020-01-28 9:28 a.m., Lukas Durfina wrote: > --- > gdb/ChangeLog | 4 ++++ > gdb/charset.c | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 8b6da62bd4..1dd89ae2e0 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,7 @@ > +2020-01-28 Lukas Durfina <ldurfina@tachyum.com> > + > + * charset.c (find_charset_names): Fix a type of sentinel. > + > 2020-01-26 Tom Tromey <tom@tromey.com> > > * ctfread.c (struct ctf_fp_info): Reindent. > diff --git a/gdb/charset.c b/gdb/charset.c > index 5cfd2d8030..abf795ce6d 100644 > --- a/gdb/charset.c > +++ b/gdb/charset.c > @@ -818,7 +818,7 @@ find_charset_names (void) > { > std::string iconv_dir = relocate_gdb_directory (ICONV_BIN, > ICONV_BIN_RELOCATABLE); > - iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", NULL); > + iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", (char *) NULL); > } > #else > iconv_program = xstrdup ("iconv"); > -- > 2.17.1 > Hi Lukas, Same comment as patch 1/2. If this change fixes the same problem as patch 1/2, then you can put both changes in the same patch. Simon
On Tuesday, January 28, 2020 5:44 PM, Simon Marchi wrote: > On 2020-01-28 9:28 a.m., Lukas Durfina wrote: > > --- > > gdb/ChangeLog | 4 ++++ > > gdb/charset.c | 2 +- > > 2 files changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > > index 8b6da62bd4..1dd89ae2e0 100644 > > --- a/gdb/ChangeLog > > +++ b/gdb/ChangeLog > > @@ -1,3 +1,7 @@ > > +2020-01-28 Lukas Durfina <ldurfina@tachyum.com> > > + > > + * charset.c (find_charset_names): Fix a type of sentinel. > > + > > 2020-01-26 Tom Tromey <tom@tromey.com> > > > > * ctfread.c (struct ctf_fp_info): Reindent. > > diff --git a/gdb/charset.c b/gdb/charset.c > > index 5cfd2d8030..abf795ce6d 100644 > > --- a/gdb/charset.c > > +++ b/gdb/charset.c > > @@ -818,7 +818,7 @@ find_charset_names (void) > > { > > std::string iconv_dir = relocate_gdb_directory (ICONV_BIN, > > ICONV_BIN_RELOCATABLE); > > - iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", NULL); > > + iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", (char *) NULL); > > } > > #else > > iconv_program = xstrdup ("iconv"); > > -- > > 2.17.1 > > > > Hi Lukas, > > Same comment as patch 1/2. > > If this change fixes the same problem as patch 1/2, then you can put > both changes in the same patch. > > Simon Now that the line is being touched, it might also be a good idea to replace NULL with nullptr. -Baris 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, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
Hello, nullptr works of course too. I will prepare the second version with nullptr. To Simon: I will merge both patches into the single one. Also, I will update the commit message about fixed compilation error. You are right, it fixes the issue for cross compiling, but for our new architecture (Tachyum) that is being developed. I assume the change is generic improvement. Thanks Lukas > -----Original Message----- > From: Aktemur, Tankut Baris <tankut.baris.aktemur@intel.com> > Sent: Tuesday, January 28, 2020 6:06 PM > To: Simon Marchi <simark@simark.ca>; Lukas Durfina > <ldurfina@tachyum.com>; gdb-patches@sourceware.org > Subject: RE: [PATCH 2/2] gdb: Fix a type of sentinel > > On Tuesday, January 28, 2020 5:44 PM, Simon Marchi wrote: > > On 2020-01-28 9:28 a.m., Lukas Durfina wrote: > > > --- > > > gdb/ChangeLog | 4 ++++ > > > gdb/charset.c | 2 +- > > > 2 files changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog index > > > 8b6da62bd4..1dd89ae2e0 100644 > > > --- a/gdb/ChangeLog > > > +++ b/gdb/ChangeLog > > > @@ -1,3 +1,7 @@ > > > +2020-01-28 Lukas Durfina <ldurfina@tachyum.com> > > > + > > > + * charset.c (find_charset_names): Fix a type of sentinel. > > > + > > > 2020-01-26 Tom Tromey <tom@tromey.com> > > > > > > * ctfread.c (struct ctf_fp_info): Reindent. > > > diff --git a/gdb/charset.c b/gdb/charset.c index > > > 5cfd2d8030..abf795ce6d 100644 > > > --- a/gdb/charset.c > > > +++ b/gdb/charset.c > > > @@ -818,7 +818,7 @@ find_charset_names (void) > > > { > > > std::string iconv_dir = relocate_gdb_directory (ICONV_BIN, > > > > ICONV_BIN_RELOCATABLE); > > > - iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", > NULL); > > > + iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, > > > + "iconv", (char *) NULL); > > > } > > > #else > > > iconv_program = xstrdup ("iconv"); > > > -- > > > 2.17.1 > > > > > > > Hi Lukas, > > > > Same comment as patch 1/2. > > > > If this change fixes the same problem as patch 1/2, then you can put > > both changes in the same patch. > > > > Simon > > Now that the line is being touched, it might also be a good idea to replace > NULL with nullptr. > > -Baris > > > 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, Gary Kershaw Chairperson of the > Supervisory Board: Nicole Lau Registered Office: Munich Commercial > Register: Amtsgericht Muenchen HRB 186928
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b6da62bd4..1dd89ae2e0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-01-28 Lukas Durfina <ldurfina@tachyum.com> + + * charset.c (find_charset_names): Fix a type of sentinel. + 2020-01-26 Tom Tromey <tom@tromey.com> * ctfread.c (struct ctf_fp_info): Reindent. diff --git a/gdb/charset.c b/gdb/charset.c index 5cfd2d8030..abf795ce6d 100644 --- a/gdb/charset.c +++ b/gdb/charset.c @@ -818,7 +818,7 @@ find_charset_names (void) { std::string iconv_dir = relocate_gdb_directory (ICONV_BIN, ICONV_BIN_RELOCATABLE); - iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", NULL); + iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", (char *) NULL); } #else iconv_program = xstrdup ("iconv");