1 /* Translate Mach exception codes into signal numbers. MIPS version.
2 Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
18 Cambridge, MA 02139, USA. */
21 #include <hurd/signal.h>
22 #include <mach/exception.h>
24 /* Translate the Mach exception codes, as received in an `exception_raise' RPC,
25 into a signal number and signal subcode. */
28 _hurd_exception2signal (int exception
, int code
, int subcode
,
29 int *signo
, long int *sigcode
, int *error
)
41 if (code
== KERN_PROTECTION_FAILURE
)
49 case EXC_BAD_INSTRUCTION
:
51 if (code
== EXC_MIPS_II
)
60 case EXC_MIPS_OV
: /* integer overflow */
62 *sigcode
= EXC_MIPS_FLT_OVERFLOW
;
71 /* Subcode is the fp_status word saved by the hardware.
72 Give an error code corresponding to the first bit set. */
73 if (subcode
== EXC_MIPS_FLT_UNIMP
)
83 /* 3.0 doesn't give this one, why, I don't know. */