My application has the ability to record data to non-volatile memory. I am trying to determine which registers etc are best to record to diagnose what happened in the event of a processor exception (e.g. as caused by a divide-by-zero). The ESR, MCSR and DEAR look like obvious ones. What else would be recommended? Is there any existing guidance on this, e.g. an AN?