Introduce switch_to_inferior_no_thread
[deliverable/binutils-gdb.git] / gdb / cli / cli-option.h
index d231d8b1adbf9a5713aae1f97c3a02b395fd574e..2cb4dea954aadc0eab6feafd03b6216ba26ee8cc 100644 (file)
@@ -1,6 +1,6 @@
 /* CLI options framework, for GDB.
 
-   Copyright (C) 2017-2019 Free Software Foundation, Inc.
+   Copyright (C) 2017-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -82,7 +82,7 @@ public:
      returns the address of some member.  */
   union
     {
-      int *(*boolean) (const option_def &, void *ctx);
+      bool *(*boolean) (const option_def &, void *ctx);
       unsigned int *(*uinteger) (const option_def &, void *ctx);
       int *(*integer) (const option_def &, void *ctx);
       const char **(*enumeration) (const option_def &, void *ctx);
@@ -155,7 +155,7 @@ template<typename Context>
 struct boolean_option_def : option_def
 {
   boolean_option_def (const char *long_option_,
-                     int *(*get_var_address_cb_) (Context *),
+                     bool *(*get_var_address_cb_) (Context *),
                      show_value_ftype *show_cmd_cb_,
                      const char *set_doc_,
                      const char *show_doc_ = nullptr,
@@ -165,7 +165,7 @@ struct boolean_option_def : option_def
                  show_cmd_cb_,
                  set_doc_, show_doc_, help_doc_)
   {
-    var_address.boolean = detail::get_var_address<int, Context>;
+    var_address.boolean = detail::get_var_address<bool, Context>;
   }
 };
 
@@ -173,11 +173,11 @@ struct boolean_option_def : option_def
    hood, but unlike boolean options, flag options don't take an on/off
    argument.  */
 
-template<typename Context = int>
+template<typename Context = bool>
 struct flag_option_def : boolean_option_def<Context>
 {
   flag_option_def (const char *long_option_,
-                    int *(*var_address_cb_) (Context *),
+                    bool *(*var_address_cb_) (Context *),
                     const char *set_doc_,
                     const char *help_doc_ = nullptr)
     : boolean_option_def<Context> (long_option_,
This page took 0.024421 seconds and 4 git commands to generate.