As was the original intent a long, long time ago -- but in this galaxy, and

in fact on this planet -- generate a SIGILL for user-mode A-line traps.
The core of this change is taken verbatim from PR 10511, submitted by
Christian Bauer.
This commit is contained in:
scottr 2000-11-15 07:15:36 +00:00
parent 1609858811
commit 96cb29b773
3 changed files with 8 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: macrom.c,v 1.46 2000/06/29 08:15:12 mrg Exp $ */
/* $NetBSD: macrom.c,v 1.47 2000/11/15 07:15:36 scottr Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
@ -754,20 +754,6 @@ mrg_aline_super(struct frame *frame)
#if defined(MRG_DEBUG)
printf(" exit\n");
#endif
}
/* handle a user mode A-line trap */
void
mrg_aline_user()
{
#if 1
/* send process a SIGILL; aline traps are illegal as yet */
#else /* how to handle real Mac App A-lines */
/* ignore for now */
I have no idea!
maybe pass SIGALINE?
maybe put global information about aline trap?
#endif
}
extern u_int32_t traceloopstart[];

View File

@ -1,4 +1,4 @@
/* $NetBSD: macrom.h,v 1.11 1997/05/12 07:53:04 scottr Exp $ */
/* $NetBSD: macrom.h,v 1.12 2000/11/15 07:15:36 scottr Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
@ -228,7 +228,6 @@ int mrg_PostEvent __P((void));
int mrg_SetTrapAddress __P((void));
void mrg_StripAddress __P((void));
void mrg_aline_super __P((struct frame *));
void mrg_aline_user __P((void));
void mrg_init __P((void));
void mrg_FixDiv __P((void));
void mrg_FixMul __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: macromasm.s,v 1.17 1998/02/21 00:37:08 scottr Exp $ */
/* $NetBSD: macromasm.s,v 1.18 2000/11/15 07:15:36 scottr Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
@ -37,6 +37,8 @@
#include "opt_adb.h"
#include "assym.h"
#include <machine/asm.h>
#include <machine/trap.h>
/* Define this symbol as global with (v) value */
@ -425,7 +427,6 @@ LGR_enter:
* 1010 line emulator; A-line trap
* (we fake MacOS traps from here)
*/
.global _mrg_aline_user
.global _mrg_aline_super
.global _mrg_ToolBoxtraps
.global _alinetrap
@ -437,8 +438,9 @@ _alinetrap:
movw sp@(FR_HW + 4), d0 | retrieve status register
andw #PSL_S, d0 | supervisor state?
bne Lalnosup | branch if supervisor
jbsr _mrg_aline_user | user a-line trap
bra Lalrts
addql #4, sp | pop frame ptr
movql #T_ILLINST, d0 | user-mode fault
jra _ASM_LABEL(fault)
Lalnosup:
#define FR_PC (FR_HW+2)
movl sp@(FR_PC + 4), a0 | retrieve PC