aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-04-27 23:10:26 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-04-27 23:10:26 +0000
commit890634eda79caf70305274a7169e6ff08fff4125 (patch)
treefe28dcad3d43801f3b555bc15eb3bbfb2fe01bc6 /gdb/procfs.c
parente6d84626b4813874c98658042d71502ca86f179a (diff)
downloadgdb-890634eda79caf70305274a7169e6ff08fff4125.zip
gdb-890634eda79caf70305274a7169e6ff08fff4125.tar.gz
gdb-890634eda79caf70305274a7169e6ff08fff4125.tar.bz2
* procfs.c (procfs_wait): Use the signal from the pr_info rather
than trying to deduce it from the fault.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 604cac6..1a23a9b 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -2315,14 +2315,6 @@ wait_again:
case PR_FAULTED:
switch (what)
{
- case FLTPRIV:
- case FLTILL:
- statval = (SIGILL << 8) | 0177;
- break;
- case FLTBPT:
- case FLTTRACE:
- statval = (SIGTRAP << 8) | 0177;
- break;
#ifdef FLTWATCH
case FLTWATCH:
statval = (SIGTRAP << 8) | 0177;
@@ -2333,19 +2325,12 @@ wait_again:
statval = (SIGTRAP << 8) | 0177;
break;
#endif
- case FLTSTACK:
- case FLTACCESS:
- case FLTBOUNDS:
- statval = (SIGSEGV << 8) | 0177;
- break;
- case FLTIOVF:
- case FLTIZDIV:
- case FLTFPE:
- statval = (SIGFPE << 8) | 0177;
- break;
- case FLTPAGE: /* Recoverable page fault */
default:
- error ("PIOCWSTOP, unknown why %d, what %d", why, what);
+ /* Use the signal which the kernel assigns. This is better than
+ trying to second-guess it from the fault. In fact, I suspect
+ that FLTACCESS can be either SIGSEGV or SIGBUS. */
+ statval = ((pi->prstatus.pr_info.si_signo) << 8) | 0177;
+ break;
}
break;
default: