From 6b5c4dc9dfb76ddf9ef4238cb6bff9deb2171e43 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 6 May 2015 16:35:59 -0600 Subject: [PATCH] rearrange a bit --- gui/gdbutil.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gui/gdbutil.py b/gui/gdbutil.py index b6f4f4a..6e38c88 100644 --- a/gui/gdbutil.py +++ b/gui/gdbutil.py @@ -35,15 +35,6 @@ def _prompt_window(attr): gui_prompt_substitutions['W'] = _prompt_window -@in_gdb_thread -def is_running(): - """Return True if the inferior is running.""" - # This seems good enough for now. - # We can deal with scheduler locking and the rest later. - if gdb.selected_thread() and gdb.selected_thread().is_running(): - return True - return False - # GDB's API should do this... def substitute_prompt_with_window(prompt, window): global _current_window_for_prompt @@ -71,3 +62,12 @@ def prompt_help_with_window(window): gdb.prompt.prompt_substitutions = save _current_window_for_prompt = None return result + +@in_gdb_thread +def is_running(): + """Return True if the inferior is running.""" + # This seems good enough for now. + # We can deal with scheduler locking and the rest later. + if gdb.selected_thread() and gdb.selected_thread().is_running(): + return True + return False