<machine/signal.h>

. use netbsd sigframe, sigcontext struct
	. netbsd sigframe *contains* sigcontext; use that directly
	  in kernel sigsend
	. drop two fields from minix x86 stackframe.h (process context)
	  that were unused, retadr and st

use in-sigframe sigcontext

Change-Id: Ib59d699596dc3a78163dee59f19730482fdddf11
This commit is contained in:
Ben Gras
2013-12-11 00:47:22 +01:00
committed by Lionel Sambuc
parent 66a4f9a240
commit 7597f4a8fc
22 changed files with 411 additions and 145 deletions

View File

@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <machine/frame.h>
int max_error = 4;
#include "common.h"
@@ -17,12 +18,12 @@ int max_error = 4;
static void signal_handler(int signum)
{
struct sigframe *sigframe;
struct sigframe_sigcontext *sigframe;
/* report signal */
sigframe = (struct sigframe *) ((char *) &signum -
(char *) &((struct sigframe *) NULL)->sf_signo);
printf("Signal %d at 0x%x\n", signum, sigframe->sf_scp->sc_regs.pc);
sigframe = (struct sigframe_sigcontext *) ((char *) &signum -
(char *) &((struct sigframe_sigcontext *) NULL)->sf_signum);
printf("Signal %d at 0x%x\n", signum, sigframe->sf_scp->sc_eip);
/* count as error */
e(0);