From: Mark Wielaard <mjw@redhat.com>
To: Patrick Palka <patrick@parcs.ath.cx>
Cc: Joel Brobecker <brobecker@adacore.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.
Date: Tue, 10 Feb 2015 23:51:00 -0000 [thread overview]
Message-ID: <20150210235058.GD17507@blokker.redhat.com> (raw)
In-Reply-To: <CA+C-WL-PpwKHDDOic7HfNQygCGM6VjqeZRXVo_ZbNg+w+AmSRA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
On Tue, Feb 10, 2015 at 06:15:44PM -0500, Patrick Palka wrote:
> Now that producer_is_gcc() returns a bool, shouldn't the statement
> 'return -1' become 'return false;', and the statement 'return major;'
> become 'return true;'?
Yes, of course. What a silly mistake. Thanks for catching that.
I pushed the attached as obvious.
[-- Attachment #2: 0001-gdb-producer_is_gcc-fix-bool-return-value.patch --]
[-- Type: text/plain, Size: 1188 bytes --]
From 9f615e3af0356052a475812cb5a4380a5fe51182 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 11 Feb 2015 00:45:31 +0100
Subject: [PATCH] gdb producer_is_gcc fix bool return value.
gdb/ChangeLog:
* utils.c (producer_is_gcc): Return true or false.
---
gdb/ChangeLog | 4 ++++
gdb/utils.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a23c2d8..fe61d24 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-11 Mark Wielaard <mjw@redhat.com>
+
+ * utils.c (producer_is_gcc): Return true or false.
+
2015-02-04 Mark Wielaard <mjw@redhat.com>
* utils.h (producer_is_gcc): Change return type to bool. Add major
diff --git a/gdb/utils.c b/gdb/utils.c
index 2b54739..3ce5814 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -3299,11 +3299,11 @@ producer_is_gcc (const char *producer, int *major, int *minor)
if (*cs && isspace (*cs))
cs++;
if (sscanf (cs, "%d.%d", major, minor) == 2)
- return major;
+ return true;
}
/* Not recognized as GCC. */
- return -1;
+ return false;
}
/* Helper for make_cleanup_free_char_ptr_vec. */
--
2.1.0
prev parent reply other threads:[~2015-02-10 23:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-25 16:32 Mark Wielaard
2015-01-29 15:59 ` Joel Brobecker
2015-01-29 16:28 ` Mark Wielaard
2015-02-04 17:19 ` Mark Wielaard
2015-02-04 18:05 ` Joel Brobecker
2015-02-04 19:59 ` Mark Wielaard
2015-02-10 20:29 ` Mark Wielaard
2015-02-10 23:16 ` Patrick Palka
2015-02-10 23:51 ` Mark Wielaard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150210235058.GD17507@blokker.redhat.com \
--to=mjw@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=patrick@parcs.ath.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox