<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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user