[binutils-gdb] gdb/remote: Use true/false instead of 1/0
Andrew Burgess
aburgess@sourceware.org
Mon Jun 28 15:31:47 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4d60b897707863bdfceb5b6e1c14545ad173a3a1
commit 4d60b897707863bdfceb5b6e1c14545ad173a3a1
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date: Mon Jun 7 10:18:47 2021 +0100
gdb/remote: Use true/false instead of 1/0
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.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/remote.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14d4a9ec226..5ba05036ec2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-28 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * remote.c (remote_target::start_remote): Set 'starting_up' using
+ boolean values instead of integers.
+
2021-06-25 Simon Marchi <simon.marchi@polymtl.ca>
* guile/scm-param.c (struct param_smob) <set_command,
diff --git a/gdb/remote.c b/gdb/remote.c
index 22933eeaeec..adc53e324d0 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 ())
More information about the Gdb-cvs
mailing list