aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-01-22 12:40:48 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-01-22 12:40:48 -0500
commit02349803fc5a7941b4e23d1580bd8b600d6be1bd (patch)
tree63d3416fbdf5e1d6f69581cb1837f67c8cb50c8a
parentcda09ec9f9cbebef06345a5fb768f347267b3d73 (diff)
downloadgdb-02349803fc5a7941b4e23d1580bd8b600d6be1bd.zip
gdb-02349803fc5a7941b4e23d1580bd8b600d6be1bd.tar.gz
gdb-02349803fc5a7941b4e23d1580bd8b600d6be1bd.tar.bz2
gdb: change remote_debug to bool
As far as I can see, there are no more spots looking for a remote_debug other than true/false. If we ever want to revert to an int, we can always change it back later, but this makes things simpler for now. gdb/ChangeLog: * remote.h (remote_debug): Change to bool. * remote.c (remote_debug): Change to bool. (_initialize_remote): Adjust. Change-Id: I21aac5b4cff9dc4f75c8efaf47c23583ecabd2a6
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/remote.c15
-rw-r--r--gdb/remote.h6
3 files changed, 17 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ceb6b10..8efc9da 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
+ * remote.h (remote_debug): Change to bool.
+ * remote.c (remote_debug): Change to bool.
+ (_initialize_remote): Adjust.
+
+2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
+
* target.h (remote_debug): Move to...
* remote.h (remote_debug): ... here.
* top.c (remote_debug): Move to...
diff --git a/gdb/remote.c b/gdb/remote.c
index 79ce6a3..70d5e88 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -89,7 +89,7 @@ Specify the serial device it is connected to\n\
/* See remote.h */
-int remote_debug = 0;
+bool remote_debug = false;
#define OPAQUETHREADBYTES 8
@@ -15062,14 +15062,15 @@ Specify \"unlimited\" to display all the characters."),
NULL, show_remote_packet_max_chars,
&setdebuglist, &showdebuglist);
- add_setshow_zinteger_cmd ("remote", no_class, &remote_debug, _("\
-Set debugging of remote protocol."), _("\
-Show debugging of remote protocol."), _("\
+ add_setshow_boolean_cmd ("remote", no_class, &remote_debug,
+ _("Set debugging of remote protocol."),
+ _("Show debugging of remote protocol."),
+ _("\
When enabled, each packet sent or received with the remote target\n\
is displayed."),
- NULL,
- show_remote_debug,
- &setdebuglist, &showdebuglist);
+ NULL,
+ show_remote_debug,
+ &setdebuglist, &showdebuglist);
add_setshow_zuinteger_unlimited_cmd ("remotetimeout", no_class,
&remote_timeout, _("\
diff --git a/gdb/remote.h b/gdb/remote.h
index de582a2..1f6916c 100644
--- a/gdb/remote.h
+++ b/gdb/remote.h
@@ -24,9 +24,9 @@
struct target_desc;
struct remote_target;
-/* Debugging level. 0 is off, and non-zero values mean to print some debug
- information (higher values, more information). */
-extern int remote_debug;
+/* True when printing "remote" debug statements is enabled. */
+
+extern bool remote_debug;
/* Read a packet from the remote machine, with error checking, and
store it in *BUF. Resize *BUF using xrealloc if necessary to hold