From 98c897e37a473ebda0f61b4e180fca0a314f0c9b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 23 Apr 2021 16:28:26 -0400 Subject: [PATCH] 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 --- gdb/ChangeLog | 4 ++++ gdb/observable.c | 12 ++++++------ gdbsupport/ChangeLog | 4 ++++ gdbsupport/observable.h | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5013d730f35..94a8296e6a1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-04-23 Simon Marchi + + * observable.c (observer_debug): Change to bool. + 2021-04-23 Andrew Burgess * dwarf2/read.c: Add 'unordered_set' include. diff --git a/gdb/observable.c b/gdb/observable.c index 10b8aad829e..51f5edb0a1f 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 dfbb06e61b6..3ceeb3dab49 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,7 @@ +2021-04-23 Simon Marchi + + * observable.h (observer_debug): Change to bool. + 2021-04-23 Simon Marchi * common-debug.h: Include preprocessor.h. diff --git a/gdbsupport/observable.h b/gdbsupport/observable.h index 1a9e767ba18..0532500dd5f 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. -- 2.30.2