Subject: Re: Return addresses from trap signals
To: Ben Harris <bjh21@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 03/05/2001 16:38:05
On Tue, Mar 06, 2001 at 12:33:21AM +0000, Ben Harris wrote:

 > What should happen if a handler for a trap signal (SIGILL, SIGSYS,
 > SIGSEGV, SIGTRAP) returns, or if the signal's ignored?  Should the failed
 > instruction be retried, or should the machine skip on to the next
 > instruction?  Does this depend on which signal it is?  I'm trying to work
 > out what the right value to put in trapframes on ARM systems is, and
 > following what a sigcontext will need might be as good an approach as any.

You only get into the machdep code you're concerned about if there's
actually a handler for the signal... and if the handler returns, I'd
say that you restart the insn.  (There are some user-level debugging
allocators and garbage-collectors that abuse SIGSEGV, and expect that
you can restart...)

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>