aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index c66efe4..4a2b518 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -151,6 +151,31 @@ ensure_python_env (struct gdbarch *gdbarch,
return make_cleanup (restore_python_env, env);
}
+/* Clear the quit flag. */
+
+void
+clear_quit_flag (void)
+{
+ /* This clears the flag as a side effect. */
+ PyOS_InterruptOccurred ();
+}
+
+/* Set the quit flag. */
+
+void
+set_quit_flag (void)
+{
+ PyErr_SetInterrupt ();
+}
+
+/* Return true if the quit flag has been set, false otherwise. */
+
+int
+check_quit_flag (void)
+{
+ return PyOS_InterruptOccurred ();
+}
+
/* A wrapper around PyRun_SimpleFile. FILE is the Python script to run
named FILENAME.