aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-04-23 16:28:26 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-04-23 16:28:26 -0400
commit98c897e37a473ebda0f61b4e180fca0a314f0c9b (patch)
treeefa2e6683d216f5ce7373d24c63e49cd32a9efa2
parent69cc19455b61a3ec1e884a165fae69abe726addb (diff)
downloadgdb-98c897e37a473ebda0f61b4e180fca0a314f0c9b.zip
gdb-98c897e37a473ebda0f61b4e180fca0a314f0c9b.tar.gz
gdb-98c897e37a473ebda0f61b4e180fca0a314f0c9b.tar.bz2
gdbsupport, gdb: change observer_debug to bool
gdb/ChangeLog: * observable.c (observer_debug): Change to bool. gdbsupport/ChangeLog: * observable.h (observer_debug): Change to bool. Change-Id: I58634235a20740a66eacb1c83bae3cf3304ae1fd
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/observable.c12
-rw-r--r--gdbsupport/ChangeLog4
-rw-r--r--gdbsupport/observable.h2
4 files changed, 15 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5013d73..94a8296 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-23 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * observable.c (observer_debug): Change to bool.
+
2021-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
* dwarf2/read.c: Add 'unordered_set' include.
diff --git a/gdb/observable.c b/gdb/observable.c
index 10b8aad..51f5edb 100644
--- a/gdb/observable.c
+++ b/gdb/observable.c
@@ -28,7 +28,7 @@ namespace gdb
namespace observers
{
-unsigned int observer_debug;
+bool observer_debug = false;
#define DEFINE_OBSERVABLE(name) decltype (name) name (# name)
@@ -92,12 +92,12 @@ void _initialize_observer ();
void
_initialize_observer ()
{
- add_setshow_zuinteger_cmd ("observer", class_maintenance,
- &gdb::observers::observer_debug, _("\
+ add_setshow_boolean_cmd ("observer", class_maintenance,
+ &gdb::observers::observer_debug, _("\
Set observer debugging."), _("\
Show observer debugging."), _("\
When non-zero, observer debugging is enabled."),
- NULL,
- show_observer_debug,
- &setdebuglist, &showdebuglist);
+ NULL,
+ show_observer_debug,
+ &setdebuglist, &showdebuglist);
}
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index dfbb06e..3ceeb3d 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,5 +1,9 @@
2021-04-23 Simon Marchi <simon.marchi@polymtl.ca>
+ * observable.h (observer_debug): Change to bool.
+
+2021-04-23 Simon Marchi <simon.marchi@polymtl.ca>
+
* common-debug.h: Include preprocessor.h.
2021-03-24 Luis Machado <luis.machado@linaro.org>
diff --git a/gdbsupport/observable.h b/gdbsupport/observable.h
index 1a9e767..0532500 100644
--- a/gdbsupport/observable.h
+++ b/gdbsupport/observable.h
@@ -30,7 +30,7 @@ namespace gdb
namespace observers
{
-extern unsigned int observer_debug;
+extern bool observer_debug;
/* An observer is an entity which is interested in being notified
when GDB reaches certain states, or certain events occur in GDB.