diff options
author | Stu Grossman <grossman@cygnus> | 1992-11-05 03:54:01 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-11-05 03:54:01 +0000 |
commit | 1549918a3f39110f41e78ab4ebbd022b4fe3da7d (patch) | |
tree | 268319c4dee1d6db77ca70dda30efa999645a13c /gdb/procfs.c | |
parent | df93a6c142231bdc1243bd65869b46e9e0045ac6 (diff) | |
download | gdb-1549918a3f39110f41e78ab4ebbd022b4fe3da7d.zip gdb-1549918a3f39110f41e78ab4ebbd022b4fe3da7d.tar.gz gdb-1549918a3f39110f41e78ab4ebbd022b4fe3da7d.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index 1a694e0..86885cc 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -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) { |