From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Fix async mode with remote targets
Date: Sat, 28 Nov 2009 17:07:00 -0000 [thread overview]
Message-ID: <200911282007.49122.vladimir@codesourcery.com> (raw)
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
input.
What is happening is that resume does:
/* Install inferior's terminal modes. */
target_terminal_inferior ();
...
target_resume (resume_ptid, step, sig);
Where target_terminal_inferior is:
void
target_terminal_inferior (void)
{
/* A background resume (``run&'') should leave GDB in control of the
terminal. */
if (target_is_async_p () && !sync_execution)
return;
/* If GDB is resuming the inferior in the foreground, install
inferior's terminal modes. */
(*current_target.to_terminal_inferior) ();
}
and remote_terminal_inferior has this:
delete_file_handler (input_fd);
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
that shortly.
- Volodya
next reply other threads:[~2009-11-28 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-28 17:07 Vladimir Prus [this message]
[not found] ` <20091128172915.GG18125@adacore.com>
2009-11-28 17:40 ` Vladimir Prus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200911282007.49122.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox