aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-09-02 16:56:30 +0000
committerPedro Alves <palves@redhat.com>2011-09-02 16:56:30 +0000
commitb4a14fd09b84468e7d28a2889d99a27008781fb1 (patch)
tree4ae20f93ec8f3fd4518dc2f5ce66e788d981a511 /gdb/infrun.c
parentc709acd150761fffe3536bf9e6a0b32870f41ca3 (diff)
downloadgdb-b4a14fd09b84468e7d28a2889d99a27008781fb1.zip
gdb-b4a14fd09b84468e7d28a2889d99a27008781fb1.tar.gz
gdb-b4a14fd09b84468e7d28a2889d99a27008781fb1.tar.bz2
2011-09-02 Pedro Alves <pedro@codesourcery.com>
* top.c: Include interps.h. (execute_command): If the target can async, but the interpreter is in sync mode, synchronously wait for the command to finish before returning. (execute_command_to_string): Force the interpreter to sync mode. * infrun.c: Include interps.h. (fetch_inferior_event): Don't restore the prompt yet if the interpreter is in sync mode. * interps.c (interpreter_async): New global. * interps.h (interpreter_async): Declare. * inf-loop.c: Include interps.h. (inferior_event_handler): Don't print the language change or run breakpoint commands yet if the interpreter in is sync mode. * main.c (captured_command_loop): Flip the interpreter to async mode. * cli/cli-script.c: Include interps.h. (execute_user_command, while_command, if_command): Force the interpreter to sync mode. * python/python.c: Include interps.h. (python_command, execute_gdb_command): Force the interpreter to sync mode.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6febe07..f9b814d 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -55,6 +55,7 @@
#include "jit.h"
#include "tracepoint.h"
#include "continuations.h"
+#include "interps.h"
/* Prototypes for local functions */
@@ -2814,7 +2815,7 @@ fetch_inferior_event (void *client_data)
/* If the inferior was in sync execution mode, and now isn't,
restore the prompt. */
- if (was_sync && !sync_execution)
+ if (interpreter_async && was_sync && !sync_execution)
display_gdb_prompt (0);
}