This is the mail archive of the
mailing list for the GDB project.
fix jump_command in async mode.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 14 Mar 2008 08:06:20 +0000
- Subject: fix jump_command in async mode.
The jump command may call query to ask the user for confirmation:
if (!query ("Line %d is not in `%s'. Jump anyway? ", sal.line,
error (_("Not confirmed."));
/* NOTREACHED */
However, before that, in sync_execution mode, it already disabled
stdin with an async_disable_stdin call, which is bad when you're
going to ask the user for input...
This patch moves the stdin disabling to after the query call, before
proceeding the inferior.
This makes jump.exp pass cleanly with the linux native async support
patch I'll post next.
2008-03-14 Pedro Alves <email@example.com>
* infcmd.c (jump_command): Postpone disabling stdin until after
the possible query.
gdb/infcmd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- src.orig/gdb/infcmd.c 2008-03-14 06:00:52.000000000 +0000
+++ src/gdb/infcmd.c 2008-03-14 06:02:36.000000000 +0000
@@ -913,14 +913,6 @@ jump_command (char *arg, int from_tty)
if (async_exec && !target_can_async_p ())
error (_("Asynchronous execution not supported on this target."));
- /* If we are not asked to run in the bg, then prepare to run in the
- foreground, synchronously. */
- if (!async_exec && target_can_async_p ())
- /* Simulate synchronous execution */
- async_disable_stdin ();
error_no_arg (_("starting address"));
@@ -974,6 +966,14 @@ jump_command (char *arg, int from_tty)
+ /* If we are not asked to run in the bg, then prepare to run in the
+ foreground, synchronously. */
+ if (!async_exec && target_can_async_p ())
+ /* Simulate synchronous execution */
+ async_disable_stdin ();
proceed (addr, TARGET_SIGNAL_0, 0);