Chris Friesen wrote:
Daniel Jacobowitz wrote:
There used to be slots for badvaddr and cause. You'll have to ask
Ralf why he decided to clobber them for DSP state, I don't remember
:-) I suspect they may never have held useful information for you;
we don't context switch them for userspace, so an intervening fault
in kernel space or in another thread could change them.
I'm a bit confused as to how they would never have held useful
information--did you mean the registers themselves, or the entries in
struct sigcontext?
The entries in the sigcontext. As Ralf said, they never held valid values.
If the cause/badvaddr entries in struct sigcontext were filled in by the
exception handler in the kernel,
It would appear that they are not.
wouldn't the values in that struct be
completely valid even if the registers themselves were changed before
userspace could handle the signal?
If this is not the case then it seems like si_addr/si_code wouldn't be
trustworthy either.
This I am not sure about :(, However knowing the values of all registers
(and perhaps /proc/self/maps) and $pc you can easily derive what happened.
David Daney