diff options
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/infcmd.c | 2 | ||||
-rw-r--r-- | gdb/infrun.c | 14 | ||||
-rw-r--r-- | gdb/infrun.h | 5 |
4 files changed, 27 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index edef298..bc681d9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2016-06-21 Pedro Alves <palves@redhat.com> + * infcmd.c (prepare_execution_command): Use + all_uis_on_sync_execution_starting. + * infrun.c (all_uis_on_sync_execution_starting): New function. + * infrun.h (all_uis_on_sync_execution_starting): Declare. + +2016-06-21 Pedro Alves <palves@redhat.com> + * annotate.c: Include top.h. (async_background_execution_p): Delete. (print_value_flags): Check the UI's prompt state rather then diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 5c3f212..e229d03 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -510,7 +510,7 @@ prepare_execution_command (struct target_ops *target, int background) simulate synchronous (fg) execution. Note no cleanup is necessary for this. stdin is re-enabled whenever an error reaches the top level. */ - async_disable_stdin (); + all_uis_on_sync_execution_starting (); } } diff --git a/gdb/infrun.c b/gdb/infrun.c index 25313b4..06ec00f 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3873,6 +3873,20 @@ all_uis_check_sync_execution_done (void) } } +/* See infrun.h. */ + +void +all_uis_on_sync_execution_starting (void) +{ + struct switch_thru_all_uis state; + + SWITCH_THRU_ALL_UIS (state) + { + if (current_ui->prompt_state == PROMPT_NEEDED) + async_disable_stdin (); + } +} + /* A cleanup that restores the execution direction to the value saved in *ARG. */ diff --git a/gdb/infrun.h b/gdb/infrun.h index 01eff9a..39be375 100644 --- a/gdb/infrun.h +++ b/gdb/infrun.h @@ -238,4 +238,9 @@ extern void maybe_remove_breakpoints (void); ready for input). */ extern void all_uis_check_sync_execution_done (void); +/* If a UI was in sync execution mode, and hasn't displayed the prompt + yet, re-disable its prompt (a synchronous execution command was + started or re-started). */ +extern void all_uis_on_sync_execution_starting (void); + #endif /* INFRUN_H */ |