the exception numbers are MI.
This commit is contained in:
parent
c2e3be8566
commit
7a55962329
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_exception.c,v 1.5 2005/02/26 23:10:19 perry Exp $ */
|
||||
/* $NetBSD: mach_exception.c,v 1.6 2005/06/25 08:28:34 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_exception.c,v 1.5 2005/02/26 23:10:19 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_exception.c,v 1.6 2005/06/25 08:28:34 christos Exp $");
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_compat_darwin.h"
|
||||
|
@ -414,12 +414,12 @@ mach_siginfo_to_exception(ksi, code)
|
|||
const struct ksiginfo *ksi;
|
||||
int *code;
|
||||
{
|
||||
code[1] = (long)ksi->ksi_addr;
|
||||
switch (ksi->ksi_signo) {
|
||||
case SIGBUS:
|
||||
switch (ksi->ksi_code) {
|
||||
case BUS_ADRALN:
|
||||
code[0] = MACH_BUS_ADRALN;
|
||||
code[1] = (long)ksi->ksi_addr;
|
||||
break;
|
||||
default:
|
||||
printf("untranslated siginfo signo %d, code %d\n",
|
||||
|
@ -432,7 +432,9 @@ mach_siginfo_to_exception(ksi, code)
|
|||
switch (ksi->ksi_code) {
|
||||
case SEGV_MAPERR:
|
||||
code[0] = MACH_SEGV_MAPERR;
|
||||
code[1] = (long)ksi->ksi_addr;
|
||||
break;
|
||||
case SEGV_ACCERR:
|
||||
code[0] = MACH_SEGV_ACCERR;
|
||||
break;
|
||||
default:
|
||||
printf("untranslated siginfo signo %d, code %d\n",
|
||||
|
@ -459,14 +461,14 @@ mach_siginfo_to_exception(ksi, code)
|
|||
case ILL_ILLOPC:
|
||||
case ILL_ILLOPN:
|
||||
case ILL_ILLADR:
|
||||
case ILL_ILLTRP:
|
||||
code[0] = MACH_ILL_ILLOPC;
|
||||
code[1] = (long)ksi->ksi_addr;
|
||||
break;
|
||||
case ILL_PRVOPC:
|
||||
case ILL_PRVREG:
|
||||
code[0] = MACH_ILL_PRVOPC;
|
||||
code[1] = (long)ksi->ksi_addr;
|
||||
break;
|
||||
case ILL_ILLTRP:
|
||||
code[0] = MACH_ILL_ILLTRP;
|
||||
break;
|
||||
default:
|
||||
printf("untranslated siginfo signo %d, code %d\n",
|
||||
|
@ -480,7 +482,6 @@ mach_siginfo_to_exception(ksi, code)
|
|||
ksi->ksi_signo, ksi->ksi_code);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_exception.h,v 1.4 2005/02/26 23:10:19 perry Exp $ */
|
||||
/* $NetBSD: mach_exception.h,v 1.5 2005/06/25 08:28:34 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -39,6 +39,18 @@
|
|||
#ifndef _MACH_EXCEPTION_H_
|
||||
#define _MACH_EXCEPTION_H_
|
||||
|
||||
/* really should be in mach_signal.h or siginfo.h */
|
||||
#define MACH_BUS_ADRALN 1
|
||||
|
||||
#define MACH_SEGV_MAPERR 1
|
||||
#define MACH_SEGV_ACCERR 2
|
||||
|
||||
#define MACH_TRAP_BRKPT 1
|
||||
|
||||
#define MACH_ILL_ILLOPC 1
|
||||
#define MACH_ILL_ILLTRP 2
|
||||
#define MACH_ILL_PRVOPC 3
|
||||
|
||||
#define MACH_EXC_BAD_ACCESS 1
|
||||
#define MACH_EXC_BAD_INSTRUCTION 2
|
||||
#define MACH_EXC_ARITHMETIC 3
|
||||
|
|
Loading…
Reference in New Issue