This is the mail archive of the
mailing list for the GDB project.
Fix async mode with remote targets
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 28 Nov 2009 20:07:48 +0300
- Subject: Fix async mode with remote targets
CodeSourcery has received a bug report that async mode does not work with
remote targets -- that is, if one does "continue &", GDB no longer accepts
What is happening is that resume does:
/* Install inferior's terminal modes. */
target_resume (resume_ptid, step, sig);
Where target_terminal_inferior is:
/* A background resume (``run&'') should leave GDB in control of the
if (target_is_async_p () && !sync_execution)
/* If GDB is resuming the inferior in the foreground, install
inferior's terminal modes. */
and remote_terminal_inferior has this:
In all-stop mode, target_is_async_p returns false until remote_resume does this:
if (target_can_async_p ())
target_async (inferior_event_handler, 0);
But this happens after target_terminal_inferior is called, and disabled stdin.
This patch fixes the problem. Approved off-list by Pedro and checked in.
There's a reasonable question why testsuite did not catch the problem. I'll get to