2001-05-25 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 30 May 2001 18:15:45 +0000 (18:15 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 30 May 2001 18:15:45 +0000 (18:15 +0000)
* lin-lwp.c (stop_wait_callback): Discard redundant SIGINT events.

gdb/ChangeLog
gdb/lin-lwp.c

index 4b1253b1c6c5239a0f220a62fcc4d49b9beb9c20..fb34c1023d5755869d4341add834478721f9db37 100644 (file)
@@ -28,6 +28,7 @@
 
 2001-05-25  Michael Snyder  <msnyder@redhat.com>
 
+       * lin-lwp.c (stop_wait_callback): Discard redundant SIGINT events.
        * remote.c (remote_write_bytes): Update 'p' packet pointer.
 
 2001-05-25  Jim Blandy  <jimb@redhat.com>
index 2d2a2b6d9f579c6e96515f8a0a2ca40296b5cc5d..923d43b393f2e15dd90f5c018abeed7644d7a4b0 100644 (file)
@@ -610,6 +610,15 @@ stop_wait_callback (struct lwp_info *lp, void *data)
                                - DECR_PC_AFTER_BREAK,
                              pid_to_ptid (pid));
            }
+         else if (WSTOPSIG (status) == SIGINT &&
+                  signal_pass_state (SIGINT) == 0)
+           {
+             /* Since SIGINT gets forwarded to the entire process group
+                (in the case where ^C/BREAK is typed at the tty/console),
+                just ignore all SIGINT events from all lwp's except for
+                the one that was caught by lin_lwp_wait.  */
+             ;  /* Don't save.  Signal will disappear into oblivion. */
+           }
          else
            {
              if (debug_lin_lwp)
@@ -618,7 +627,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
                                    strsignal (WSTOPSIG (status)), pid);
 
              /* The thread was stopped with a signal other than
-                SIGSTOP, and didn't accidentiliy trip a breakpoint.
+                SIGSTOP, and didn't accidentally trip a breakpoint.
                 Record the wait status.  */
              lp->status = status;
            }