Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2001 09:13:23 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        <ia64@FreeBSD.org>
Subject:   Re: exception_return() doesn't call ast()
Message-ID:  <Pine.BSF.4.33.0108080908370.2442-200000@herring.nlsystems.com>
In-Reply-To: <XFMail.010807133555.jhb@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Tue, 7 Aug 2001, John Baldwin wrote:

> Currently, we aren't calling ast() during exception returns.  I have an ugly
> patch to do this, but I'm not sure that is right.  It does seem to compile and
> run at least.  It is at http://www.FreeBSD.org/~jhb/patches/ia64_ast.patch and
> included below.  I'm pretty sure I've screwed up the way to call the function,
> etc.:

I have to refresh my memory on the docs here. I'll get back to you.

>
> Also, I'm trying to compile a simple program so I can test out signal handling
> a bit to make sure I didn't break it.  I usually use 'cat' in single user mode
> (use Ctrl-Z, fg, and Ctrl-C as my test) but I ran into the following glitch
> trying to compile cat(1):
>
> > ia64-unknown-linux-gcc cat.c -o cat
> In file included from
> /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64
> -unknown-linux/include/sys/param.h:91,
>                  from cat.c:51:
> /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64
> -unknown-linux/include/sys/signal.h:241: warning: `MINSIGSTKSZ' redefined
> /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64
> -unknown-linux/include/machine/signal.h:42: warning: this is the location of
> the previous definition
> /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64
> -unknown-linux/bin/ld: cannot find -lgcc
>
> (I had to update /usr/local/ia64-unknown-linux/include/sys/types.h with
> -current sys/types.h to fix a compile error.  The warning stems from an out of
> date sys/signal.h as well, but I'm trying to change as few things as possible
> to avoid inadvertent breakage.)

I update my copy of /usr/local/ia64-unknown-linux/include manually but its
pretty chaotic. You should be able to just spam it entirely with fresh
includes from src/include, src/sys/sys and src/sys/ia64/include - thats
what I do.

I used the attached test program for testing signal delivery.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160


[-- Attachment #2 --]
#include <stdio.h>
#include <signal.h>

char stack[SIGSTKSZ];

void
sig(int sig, siginfo_t *si, void *ucontext)
{
	printf("ping!\n");
}

int
main(int argc, char** argv)
{
	struct sigaltstack ss;
	struct sigaction sa;

	ss.ss_sp = stack;
	ss.ss_size = sizeof(stack);
	ss.ss_flags = 0;
	if (sigaltstack(&ss, 0) < 0)
		perror("sigaltstack");

	sa.sa_sigaction = sig;
	sa.sa_flags = SA_ONSTACK | SA_SIGINFO;
	sigemptyset(&sa.sa_mask);
	sigaction(SIGUSR1, &sa, 0);

	kill(getpid(), SIGUSR1);
}
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0108080908370.2442-200000>