aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 65143d1..6388ba2 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -368,6 +368,16 @@ check_frame_language_change (void)
/* See top.h. */
void
+wait_sync_command_done (void)
+{
+ while (gdb_do_one_event () >= 0)
+ if (!sync_execution)
+ break;
+}
+
+/* See top.h. */
+
+void
maybe_wait_sync_command_done (int was_sync)
{
/* If the interpreter is in sync mode (we're running a user
@@ -375,11 +385,7 @@ maybe_wait_sync_command_done (int was_sync)
just ran a synchronous command that started the target, wait
for that command to end. */
if (!interpreter_async && !was_sync && sync_execution)
- {
- while (gdb_do_one_event () >= 0)
- if (!sync_execution)
- break;
- }
+ wait_sync_command_done ();
}
/* Execute the line P as a command, in the current user context.