gdbsupport, gdb: change observer_debug to bool
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 23 Apr 2021 20:28:26 +0000 (16:28 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 23 Apr 2021 20:28:26 +0000 (16:28 -0400)
gdb/ChangeLog:

* observable.c (observer_debug): Change to bool.

gdbsupport/ChangeLog:

* observable.h (observer_debug): Change to bool.

Change-Id: I58634235a20740a66eacb1c83bae3cf3304ae1fd

gdb/ChangeLog
gdb/observable.c
gdbsupport/ChangeLog
gdbsupport/observable.h

index 5013d730f35cef58903a3aae2d70bfa5a8d05af6..94a8296e6a1bd9684e8a6d5ecd7c76bb06ace519 100644 (file)
@@ -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.
index 10b8aad829eb4d242689f0f42b1b3a9a3c35195d..51f5edb0a1f6e6c8433d9dca846a9ff66a621dc8 100644 (file)
@@ -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);
 }
index dfbb06e61b617d21007e9b692c822aae1f8be17e..3ceeb3dab49e8820aab29863eb14ff1c7352ed9f 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 1a9e767ba18b8803e45344244756ea9c13f149ca..0532500dd5fa4549860a091c216589903dca7fec 100644 (file)
@@ -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.