Eliminate clear_quit_flag
authorPedro Alves <palves@redhat.com>
Tue, 12 Apr 2016 15:49:31 +0000 (16:49 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 12 Apr 2016 15:56:15 +0000 (16:56 +0100)
Nothing calls this anymore.

gdb/ChangeLog:
2016-04-12  Pedro Alves  <palves@redhat.com>

* defs.h (clear_quit_flag): Remove declaration.
* extension-priv.h (struct extension_language_ops)
<clear_quit_flag>: Remove field and update comments.
* extension.c (clear_quit_flag): Delete.
* guile/guile.c (guile_extension_ops): Adjust.
* python/python.c (python_extension_ops): Adjust.
(gdbpy_clear_quit_flag): Delete.

gdb/ChangeLog
gdb/defs.h
gdb/extension-priv.h
gdb/extension.c
gdb/guile/guile.c
gdb/python/python.c

index 46f86681574a694d0010033b31d9550574c170fc..7f0df5f89a4392fa0897193587f85f9a2eb21a75 100644 (file)
@@ -1,3 +1,13 @@
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+       * defs.h (clear_quit_flag): Remove declaration.
+       * extension-priv.h (struct extension_language_ops)
+       <clear_quit_flag>: Remove field and update comments.
+       * extension.c (clear_quit_flag): Delete.
+       * guile/guile.c (guile_extension_ops): Adjust.
+       * python/python.c (python_extension_ops): Adjust.
+       (gdbpy_clear_quit_flag): Delete.
+
 2016-04-12  Pedro Alves  <palves@redhat.com>
 
        * main.c (captured_main): Don't clear the quit flag.
index ad9b259baae7bf31fb344a41758eb753307f5802..006f660a375b192a3fcff9e297af9ee8c5ad39a0 100644 (file)
@@ -139,8 +139,6 @@ extern char *debug_file_directory;
    These functions use the extension_language_ops API to allow extension
    language(s) and GDB SIGINT handling to coexist seamlessly.  */
 
-/* * Clear the quit flag.  */
-extern void clear_quit_flag (void);
 /* * Evaluate to non-zero if the quit flag is set, zero otherwise.  This
    will clear the quit flag as a side effect.  */
 extern int check_quit_flag (void);
index 5ccbc2972a44c99b1e34b7c2a38728b824459eca..d7bc57240030d72ac5a280084281121d57a6a0e1 100644 (file)
@@ -232,7 +232,7 @@ struct extension_language_ops
   enum ext_lang_bp_stop (*breakpoint_cond_says_stop)
     (const struct extension_language_defn *, struct breakpoint *);
 
-  /* The next three are used to connect GDB's SIGINT handling with the
+  /* The next two are used to connect GDB's SIGINT handling with the
      extension language's.
 
      Terminology: If an extension language can use GDB's SIGINT handling then
@@ -242,9 +242,6 @@ struct extension_language_ops
      These need not be implemented, but if one of them is implemented
      then they all must be.  */
 
-  /* Clear the SIGINT indicator.  */
-  void (*clear_quit_flag) (const struct extension_language_defn *);
-
   /* Set the SIGINT indicator.
      This is called by GDB's SIGINT handler and must be async-safe.  */
   void (*set_quit_flag) (const struct extension_language_defn *);
index c00db471b46b1d8d9a742dcfcaf123874393657d..17268d6ec432fffcd8abdc1f1e4676105806bfaf 100644 (file)
@@ -794,25 +794,6 @@ restore_active_ext_lang (struct active_ext_lang_state *previous)
   xfree (previous);
 }
 
-/* Clear the quit flag.
-   The flag is cleared in all extension languages,
-   not just the currently active one.  */
-
-void
-clear_quit_flag (void)
-{
-  int i;
-  const struct extension_language_defn *extlang;
-
-  ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
-    {
-      if (extlang->ops->clear_quit_flag != NULL)
-       extlang->ops->clear_quit_flag (extlang);
-    }
-
-  quit_flag = 0;
-}
-
 /* Set the quit flag.
    This only sets the flag in the currently active extension language.
    If the currently active extension language does not have cooperative
index 7352b57156185e6e48c882d059ca415a8559d71a..f9481c94aec0c869b65f3db6cde484629c923179 100644 (file)
@@ -155,7 +155,6 @@ const struct extension_language_ops guile_extension_ops =
   gdbscm_breakpoint_cond_says_stop,
 
   NULL, /* gdbscm_check_quit_flag, */
-  NULL, /* gdbscm_clear_quit_flag, */
   NULL, /* gdbscm_set_quit_flag, */
 };
 
index 4dff2e62d1420c81333014c55586a831c6e5b083..9c972ec918071ff7236dd2880554a2845475e7c0 100644 (file)
@@ -146,7 +146,6 @@ static enum ext_lang_rc gdbpy_apply_type_printers
    const struct ext_lang_type_printers *, struct type *, char **);
 static void gdbpy_free_type_printers (const struct extension_language_defn *,
                                      struct ext_lang_type_printers *);
-static void gdbpy_clear_quit_flag (const struct extension_language_defn *);
 static void gdbpy_set_quit_flag (const struct extension_language_defn *);
 static int gdbpy_check_quit_flag (const struct extension_language_defn *);
 static enum ext_lang_rc gdbpy_before_prompt_hook
@@ -184,7 +183,6 @@ const struct extension_language_ops python_extension_ops =
   gdbpy_breakpoint_has_cond,
   gdbpy_breakpoint_cond_says_stop,
 
-  gdbpy_clear_quit_flag,
   gdbpy_set_quit_flag,
   gdbpy_check_quit_flag,
 
@@ -270,15 +268,6 @@ ensure_python_env (struct gdbarch *gdbarch,
   return make_cleanup (restore_python_env, env);
 }
 
-/* Clear the quit flag.  */
-
-static void
-gdbpy_clear_quit_flag (const struct extension_language_defn *extlang)
-{
-  /* This clears the flag as a side effect.  */
-  PyOS_InterruptOccurred ();
-}
-
 /* Set the quit flag.  */
 
 static void
This page took 0.047668 seconds and 4 git commands to generate.