aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 12f0146..756dd4f 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -45,6 +45,7 @@
#include "filestuff.h"
#include <signal.h>
#include "event-top.h"
+#include "infrun.h"
/* The selected interpreter. This will be used as a set command
variable, so it should always be malloc'ed - since
@@ -369,7 +370,11 @@ catch_command_errors (catch_command_errors_ftype *command,
TRY_CATCH (e, mask)
{
+ int was_sync = sync_execution;
+
command (arg, from_tty);
+
+ maybe_wait_sync_command_done (was_sync);
}
return handle_command_errors (e);
}
@@ -388,7 +393,11 @@ catch_command_errors_const (catch_command_errors_const_ftype *command,
TRY_CATCH (e, mask)
{
+ int was_sync = sync_execution;
+
command (arg, from_tty);
+
+ maybe_wait_sync_command_done (was_sync);
}
return handle_command_errors (e);
}