gdb: change debug_bfd_cache to bool
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 21 Jan 2021 03:38:20 +0000 (22:38 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 21 Jan 2021 03:38:20 +0000 (22:38 -0500)
gdb/ChangeLog:

* gdb_bfd.c (debug_bfd_cache): Change type to bool.
(_initialize_gdb_bfd): Adjust.

Change-Id: I90fdcc2e2d405653d0eba776f316bcec361b2d18

gdb/ChangeLog
gdb/gdb_bfd.c

index ed01ed727f7aa2956b48035dc8d45cab369bac6f..d0e96331e5a1702e68520bcd11f593e1d0afd322 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-20  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * gdb_bfd.c (debug_bfd_cache): Change type to bool.
+       (_initialize_gdb_bfd): Adjust.
+
 2021-01-20  Simon Marchi  <simon.marchi@polymtl.ca>
 
        PR gdb/26828
index 509bf2cd4790e1067b3e5abe8236e2677bd47ba8..98921660f00cd9fa4ed6fc1787fe9b18bd03e71a 100644 (file)
@@ -134,9 +134,10 @@ show_bfd_sharing  (struct ui_file *file, int from_tty,
   fprintf_filtered (file, _("BFD sharing is %s.\n"), value);
 }
 
-/* When non-zero debugging of the bfd caches is enabled.  */
+/* When true debugging of the bfd caches is enabled.  */
+
+static bool debug_bfd_cache;
 
-static unsigned int debug_bfd_cache;
 static void
 show_bfd_cache_debug (struct ui_file *file, int from_tty,
                      struct cmd_list_element *c, const char *value)
@@ -1105,12 +1106,13 @@ filename, file size, file modification time, and file inode."),
                           &maintenance_set_cmdlist,
                           &maintenance_show_cmdlist);
 
-  add_setshow_zuinteger_cmd ("bfd-cache", class_maintenance,
-                            &debug_bfd_cache, _("\
-Set bfd cache debugging."), _("\
-Show bfd cache debugging."), _("\
+  add_setshow_boolean_cmd ("bfd-cache", class_maintenance,
+                          &debug_bfd_cache,
+                          _("Set bfd cache debugging."),
+                          _("Show bfd cache debugging."),
+                          _("\
 When non-zero, bfd cache specific debugging is enabled."),
-                            NULL,
-                            &show_bfd_cache_debug,
-                            &setdebuglist, &showdebuglist);
+                          NULL,
+                          &show_bfd_cache_debug,
+                          &setdebuglist, &showdebuglist);
 }