* linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
	all-stop mode.

gdb/testsuite/
	* lib/mi-support.exp (mi_expect_interrupt): New.
	(mi_reverse_list, mi_check_thread_states): New, moved and renamed
	from gdb.mi/mi-nonstop.exp.
	* gdb.mi/mi-nsintrall.exp, gdb.mi/nsintrall.c: New.
	* gdb.mi/mi-nonstop.exp (myreverse, check_thread_states): Moved to
	lib/mi-support.exp.
	Use mi_check_thread_states throughout.  Avoid ".*" and do not
	require an anchor after -exec-run.
This commit is contained in:
Pedro Alves
2008-09-22 11:00:41 +00:00
parent 29d1e62037
commit 1ad15515cd
7 changed files with 318 additions and 42 deletions

View File

@ -2946,18 +2946,24 @@ retry:
goto retry;
}
if (signo == TARGET_SIGNAL_INT && signal_pass_state (signo) == 0)
if (!non_stop)
{
/* If ^C/BREAK is typed at the tty/console, SIGINT gets
forwarded to the entire process group, that is, all LWPs
will receive it - unless they're using CLONE_THREAD to
share signals. Since we only want to report it once, we
mark it as ignored for all LWPs except this one. */
iterate_over_lwps (set_ignore_sigint, NULL);
lp->ignore_sigint = 0;
/* Only do the below in all-stop, as we currently use SIGINT
to implement target_stop (see linux_nat_stop) in
non-stop. */
if (signo == TARGET_SIGNAL_INT && signal_pass_state (signo) == 0)
{
/* If ^C/BREAK is typed at the tty/console, SIGINT gets
forwarded to the entire process group, that is, all LWPs
will receive it - unless they're using CLONE_THREAD to
share signals. Since we only want to report it once, we
mark it as ignored for all LWPs except this one. */
iterate_over_lwps (set_ignore_sigint, NULL);
lp->ignore_sigint = 0;
}
else
maybe_clear_ignore_sigint (lp);
}
else
maybe_clear_ignore_sigint (lp);
}
/* This LWP is stopped now. */