From owner-freebsd-hackers Wed Oct 21 07:52:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA27430 for freebsd-hackers-outgoing; Wed, 21 Oct 1998 07:52:17 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA27422 for ; Wed, 21 Oct 1998 07:52:12 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id NAA10177; Wed, 21 Oct 1998 13:55:03 +0100 From: Luigi Rizzo Message-Id: <199810211255.NAA10177@labinfo.iet.unipi.it> Subject: Re: Handling page faults in user space ? To: dg@root.com Date: Wed, 21 Oct 1998 13:55:03 +0100 (MET) Cc: hackers@FreeBSD.ORG In-Reply-To: <199810211427.HAA02579@implode.root.com> from "David Greenman" at Oct 21, 98 07:27:19 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >signal handler, the fault virtual address and maybe IP associated to > >the faulting instruction. > > > >Ideas anyone ? > > Yes, that is supported. The fault VA is passed back via the sigcontext > struct, sc_err. A pointer to the sigcontext is passed into the signal > handler as the third arg. See the sigaction(2) man page. Thanks a lot, that was it! However the sigaction manpage (at least on 2.2.6) seems incomplete. It only specifies three args for the handler, whereas from looking at macine/frame.h i see "struct sigframe" with a number of arguments, and i found the fourth arg to the signal handler to be exactly the fault address... cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message