public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Pass Ctrl-C to the target in target_terminal_inferior
@ 2016-04-13  0:16 sergiodj+buildbot
  2016-04-13  0:16 ` Failures on Fedora-x86_64-m32, branch master sergiodj+buildbot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sergiodj+buildbot @ 2016-04-13  0:16 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 93692b589dc7017d5a2fbdffdfad5f84f597d8f1 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 93692b589dc7017d5a2fbdffdfad5f84f597d8f1

Pass Ctrl-C to the target in target_terminal_inferior

If the user presses Ctrl-C immediately before target_terminal_inferior
is called and the target is resumed, instead of after, the Ctrl-C ends
up pending in the quit flag until the target next stops.

remote.c has this bit to handle this:

      if (!target_is_async_p ())
	{
	  ofunc = signal (SIGINT, sync_remote_interrupt);
	  /* If the user hit C-c before this packet, or between packets,
	     pretend that it was hit right here.  */
	  if (check_quit_flag ())
	    sync_remote_interrupt (SIGINT);
	}

But that's only reachable if async is off, while async is on by
default nowadays.  It's also obviously not reacheable on native
targets.

This patch generalizes that to all targets.

We can't remove that remote.c bit yet, until we get rid of the sync
SIGINT handler though.  That'll be done later in the series.

gdb/ChangeLog:
2016-04-12  Pedro Alves  <palves@redhat.com>

	* remote.c (remote_pass_ctrlc): New function.
	(init_remote_ops): Install it.
	* target.c (target_terminal_inferior): Pass pending Ctrl-C to the
	target.
	(target_pass_ctrlc, default_target_pass_ctrlc): New functions.
	* target.h (struct target_ops) <to_pass_ctrlc>: New method.
	(target_pass_ctrlc, default_target_pass_ctrlc): New declarations.
	* target-delegates.c: Regenerate.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-14  3:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13  0:16 [binutils-gdb] Pass Ctrl-C to the target in target_terminal_inferior sergiodj+buildbot
2016-04-13  0:16 ` Failures on Fedora-x86_64-m32, branch master sergiodj+buildbot
2016-04-13  1:32 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2016-04-13 10:56 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2016-04-14  3:55 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).