* inflow.c (pass_signal, set_sigint_trap, clear_sigint_trap): Add
authorStu Grossman <grossman@cygnus>
Thu, 5 Nov 1992 03:54:01 +0000 (03:54 +0000)
committerStu Grossman <grossman@cygnus>
Thu, 5 Nov 1992 03:54:01 +0000 (03:54 +0000)
new routines to deal with sending SIGINTs to attached processes
when the user interrupts the controlling GDB.
* inftarg.c (child_wait), procfs.c (procfs_wait):  Add calls to
the aforementioned routines when waiting for the attached process.

gdb/ChangeLog
gdb/procfs.c

index 7a23f157a494c9edd7787ffb3a4f06ad687c8531..8fe65bc49b3a08db6e87e858f732edb317b94bc6 100644 (file)
@@ -1,5 +1,11 @@
 Wed Nov  4 15:27:31 1992  Stu Grossman  (grossman at cygnus.com)
 
+       * inflow.c (pass_signal, set_sigint_trap, clear_sigint_trap):  Add
+       new routines to deal with sending SIGINTs to attached processes
+       when the user interrupts the controlling GDB.
+       * inftarg.c (child_wait), procfs.c (procfs_wait):  Add calls to
+       the aforementioned routines when waiting for the attached process.
+
        * elfread.c, mipsread.c:  Include <string.h>.
        * i386-stub.c:  Include "ansidecl.h" to deal with prototypes.
        * serial.h:  Add prototype for serial_restore().        
index 1a694e0f0d4391353bf52a14551d022fbf1ffa0f..86885cc49772cf30ff625dbbaba16438f73aba26 100644 (file)
@@ -1956,10 +1956,17 @@ procfs_wait (statloc)
     }
   else if (!(pi.prstatus.pr_flags & (PR_STOPPED | PR_ISTOP)))
     {
+      if (attach_flag)
+       set_sigint_trap();      /* Causes SIGINT to be passed on to the
+                                  attached process. */
+
       if (ioctl (pi.fd, PIOCWSTOP, &pi.prstatus) < 0)
        {
          checkerr++;
        }
+
+      if (attach_flag)
+       clear_sigint_trap();
     }    
   if (checkerr)
     {