From owner-freebsd-current Thu Sep 30 13:47:13 1999 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 21DD814E72 for ; Thu, 30 Sep 1999 13:47:10 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id NAA23553; Thu, 30 Sep 1999 13:47:07 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id NAA26339; Thu, 30 Sep 1999 13:47:07 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <37F3C651.EC9305B7@scc.nl> Date: Thu, 30 Sep 1999 13:47:07 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Marcel Moolenaar Subject: Re: Now that sigcontext is gone ... Cc: current@FreeBSD.ORG, Nate Williams Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Marcel Moolenaar wrote: > > That's right, it's not implemented yet. The work-around is to use > ucontext. uc_mcontext contains the trapframe which has tf_err > (uc.uc_mcontext.mc_tf.tf_err). Thanks. > I haven't paid any attention to implement any of the fields in siginfo_t > because that may only have complicated matters. It may be required to do > some non-trivial rewriting to get all the information at the right > place. Since real-time signals are also in the pipeline and also may > have specific needs, both "problems" can best be considered at the same > time (IMO). For this particular problem (getting the faulting address) it looks like it will be easy to fix in "machdep.c:sendsig()". The correct value should be in regs->tf_err on the i386. It's just a matter of copying that into sf.sf_si.si_addr here (line 677): if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; /* fill siginfo structure */ sf.sf_si.si_signo = sig; sf.sf_si.si_code = code; } On the alpha the value should come from frame->tf_regs[FRAME_TRAPARG_A0]. I'll try it when I get time. (Feel free to beat me to the punch :-). John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message