On Wed, Dec 12, 2007 at 11:44:14AM -0600, Chris Friesen wrote:
>
> Hi all,
>
> First, I'm not subscribed to the list so I'd appreciate being cc'd on any
> replies.
>
> We have a project getting started with MIPS, and one of the things that
> we're trying to bring in is some exception-handling code that logs
> various information about the ways that apps fail.
>
> In particular, the guys working on this have asked for the STATUS, CAUSE,
> BADVADDR, and FPC_EIR registers to be made available as part of struct
> sigcontext so that they can determine exactly why the app is failing.
>
> Looking at include/asm-mips/sigcontext.h I can see that these registers
> appear to be in the struct, but are either marked as "unused" or now have
> different names.
>
> Am I correct that these registers are not currently exported to userspace
> on a fault? If this is the case, why not? Does anyone have a patch to
> enable this export?
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.
FPC_EIR is, unless I misremember, constant and read only. You can
just read it.
--
Daniel Jacobowitz
CodeSourcery
|