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 [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message