From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/4] gdb/remote: Use true/false instead of 1/0
Date: Mon, 28 Jun 2021 16:32:30 +0100 [thread overview]
Message-ID: <20210628153230.GX2568@embecosm.com> (raw)
In-Reply-To: <5da89b0d4cd1ca887b9ce944088df11ec8e7a001.1623268999.git.andrew.burgess@embecosm.com>
* Andrew Burgess <andrew.burgess@embecosm.com> [2021-06-09 21:06:14 +0100]:
> The remote_state::starting_up member variable is already of type bool,
> but in some places we still write to it using 1 and 0. This commit
> just updates things to use true and false.
>
> There should be no user visible change after this commit.
>
> gdb/ChangeLog:
>
> * remote.c (remote_target::start_remote): Set 'starting_up' using
> boolean values instead of integers.
I have pushed just this patch from this series. The rest of this
series will need a review before it can be merged.
Thanks,
Andrew
> ---
> gdb/ChangeLog | 5 +++++
> gdb/remote.c | 8 ++++----
> 2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/remote.c b/gdb/remote.c
> index de04aab43dc..531d43a692b 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -4667,7 +4667,7 @@ remote_target::start_remote (int from_tty, int extended_p)
> Ctrl-C before we're connected and synced up can't interrupt the
> target. Instead, it offers to drop the (potentially wedged)
> connection. */
> - rs->starting_up = 1;
> + rs->starting_up = true;
>
> QUIT;
>
> @@ -4808,7 +4808,7 @@ remote_target::start_remote (int from_tty, int extended_p)
>
> /* We're connected, but not running. Drop out before we
> call start_remote. */
> - rs->starting_up = 0;
> + rs->starting_up = false;
> return;
> }
> else
> @@ -4923,7 +4923,7 @@ remote_target::start_remote (int from_tty, int extended_p)
>
> /* We're connected, but not running. Drop out before we
> call start_remote. */
> - rs->starting_up = 0;
> + rs->starting_up = false;
> return;
> }
>
> @@ -4968,7 +4968,7 @@ remote_target::start_remote (int from_tty, int extended_p)
> target, our symbols have been relocated, and we're merged the
> target's tracepoints with ours. We're done with basic start
> up. */
> - rs->starting_up = 0;
> + rs->starting_up = false;
>
> /* Maybe breakpoints are global and need to be inserted now. */
> if (breakpoints_should_be_inserted_now ())
> --
> 2.25.4
>
next prev parent reply other threads:[~2021-06-28 15:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 20:06 [PATCH 0/4] gdb/remote: spot stop packets sent for the wrong thread Andrew Burgess
2021-06-09 20:06 ` [PATCH 1/4] gdb/remote: Use true/false instead of 1/0 Andrew Burgess
2021-06-28 15:32 ` Andrew Burgess [this message]
2021-06-09 20:06 ` [PATCH 2/4] gdb/remote: better management of remote_state::starting_up flag Andrew Burgess
2021-06-09 20:06 ` [PATCH 3/4] gdb/remote: use remote_add_thread from extended_remote_target::attach Andrew Burgess
2021-06-09 20:06 ` [PATCH 4/4] gdb/remote: error if a stop arrives for a non-resumed thread Andrew Burgess
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=20210628153230.GX2568@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).