diff options
author | Pedro Alves <palves@redhat.com> | 2008-09-22 11:00:41 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-09-22 11:00:41 +0000 |
commit | 1ad15515cd017050d1ac497ca34f8e0343d66625 (patch) | |
tree | 5eb328386a669a043cdd718353bdd6da0c0ffa90 /gdb/linux-nat.c | |
parent | 29d1e62037baaf2bdbaf2511b2c4847b0185be0b (diff) | |
download | gdb-1ad15515cd017050d1ac497ca34f8e0343d66625.zip gdb-1ad15515cd017050d1ac497ca34f8e0343d66625.tar.gz gdb-1ad15515cd017050d1ac497ca34f8e0343d66625.tar.bz2 |
gdb/
* 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.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 42e19b5..bbf8fb7 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -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. */ |