From a149683b0c277279d892c9617233643188a34251 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 12 Apr 2016 16:49:31 +0100 Subject: [PATCH] Eliminate clear_quit_flag Nothing calls this anymore. gdb/ChangeLog: 2016-04-12 Pedro Alves * defs.h (clear_quit_flag): Remove declaration. * extension-priv.h (struct extension_language_ops) : 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 | 10 ++++++++++ gdb/defs.h | 2 -- gdb/extension-priv.h | 5 +---- gdb/extension.c | 19 ------------------- gdb/guile/guile.c | 1 - gdb/python/python.c | 11 ----------- 6 files changed, 11 insertions(+), 37 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 46f8668..7f0df5f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 2016-04-12 Pedro Alves + * defs.h (clear_quit_flag): Remove declaration. + * extension-priv.h (struct extension_language_ops) + : 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 + * main.c (captured_main): Don't clear the quit flag. 2016-04-12 Pedro Alves diff --git a/gdb/defs.h b/gdb/defs.h index ad9b259..006f660 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -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); diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h index 5ccbc29..d7bc572 100644 --- a/gdb/extension-priv.h +++ b/gdb/extension-priv.h @@ -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 *); diff --git a/gdb/extension.c b/gdb/extension.c index c00db47..17268d6 100644 --- a/gdb/extension.c +++ b/gdb/extension.c @@ -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 diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c index 7352b57..f9481c9 100644 --- a/gdb/guile/guile.c +++ b/gdb/guile/guile.c @@ -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, */ }; diff --git a/gdb/python/python.c b/gdb/python/python.c index 4dff2e6..9c972ec 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -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 -- 2.7.4