aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.h
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/interps.h
parentc709acd150761fffe3536bf9e6a0b32870f41ca3 (diff)
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/interps.h')
-rw-r--r--gdb/interps.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/interps.h b/gdb/interps.h
index 97559d0acf..a000ef787e 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -69,6 +69,15 @@ extern void current_interp_command_loop (void);
extern void *top_level_interpreter_data (void);
extern struct interp *top_level_interpreter (void);
+/* True if the current interpreter is in async mode, false if in sync
+ mode. If in sync mode, running a synchronous execution command
+ (with execute_command, e.g, "next") will not return until the
+ command is finished. If in async mode, then running a synchronous
+ command returns right after resuming the target. Waiting for the
+ command's completion is later done on the top event loop (using
+ continuations). */
+extern int interpreter_async;
+
extern void clear_interpreter_hooks (void);
/* well-known interpreters */