From owner-freebsd-emulation Fri Jun 5 21:35:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA17692 for freebsd-emulation-outgoing; Fri, 5 Jun 1998 21:35:55 -0700 (PDT) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from time.cdrom.com (root@time.cdrom.com [204.216.27.226]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA17682 for ; Fri, 5 Jun 1998 21:35:46 -0700 (PDT) (envelope-from jkh@time.cdrom.com) Received: from time.cdrom.com (jkh@localhost.cdrom.com [127.0.0.1]) by time.cdrom.com (8.8.8/8.8.8) with ESMTP id VAA03203 for ; Fri, 5 Jun 1998 21:35:43 -0700 (PDT) (envelope-from jkh@time.cdrom.com) Prev-Resent: Fri, 05 Jun 1998 21:35:43 -0700 Prev-Resent: "emulation@freebsd.org " Received: from mx01-ext.netapp.com (mx01-ext.netapp.com [198.95.224.34]) by time.cdrom.com (8.8.8/8.8.8) with SMTP id MAA01218 for ; Fri, 5 Jun 1998 12:54:11 -0700 (PDT) (envelope-from guy@netapp.com) Received: (qmail 1347 invoked from network); 5 Jun 1998 20:27:24 -0000 Received: from 172.20.6hide.netapp.com (HELO herra.netapp.com) (198.95.224.200) by mx01-ext.netapp.com with SMTP; 5 Jun 1998 20:27:24 -0000 Received: from tooting.netapp.com (tooting-f1.netapp.com [172.20.4.145]) by herra.netapp.com (8.8.7/8.8.7/GNAC-GW-2.1) with SMTP id MAA28296 for ; Fri, 5 Jun 1998 12:53:13 -0700 (PDT) Received: by tooting.netapp.com (SMI-8.6/SMI-SVR4) id MAA05129; Fri, 5 Jun 1998 12:53:11 -0700 From: guy@netapp.com (Guy Harris) Message-Id: <199806051953.MAA05129@tooting.netapp.com> Subject: POSIX 1003.1-1996-style SA_SIGINFO signals in FreeBSD? To: jkh@time.cdrom.com Date: Fri, 5 Jun 1998 12:53:10 -0700 (PDT) X-Mailer: ELM [version 2.4ME++ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Somebody in "comp.emulators.ms-windows.wine" wanted to catch SIGSEGV and get the fault address to implement some stuff in Wine. I looked at the 2.2.6 source, and the only way I found of getting the fault address was to find the trap frame via information in the signal context (I assume you can do that, I didn't check in detail) and extract it from "tf_err" in the trap frame (which appears to be where it gets stuffed by the page fault trap handler). It's a bit easier in SVR4-flavored systems, as you can establish the signal handler with SA_SIGINFO set in "sa_flags" and extract it from the "siginfo_t" structure a pointer to which is passed to the handler as its second argument. At least some of that is also specified by the 1996 edition of POSIX 1003.1 (I didn't check whether it specifies a fault address for SIGSEGV or not). Are there any plans to put that into, say, FreeBSD 3.0? Any idea if any of the other BSDs do it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message