Clean up printtrap a little.

* Sort exceptions
* Add printing of ESR on book-e, and only print DSISR on AIM
This commit is contained in:
Justin Hibbits 2015-04-08 04:37:11 +00:00
parent e3e38bc79f
commit 39a4b70fbc

View File

@ -407,19 +407,25 @@ printtrap(u_int vector, struct trapframe *frame, int isfatal, int user)
printf("\n");
printf(" exception = 0x%x (%s)\n", vector, trapname(vector));
switch (vector) {
case EXC_DTMISS:
case EXC_DSE:
case EXC_DSI:
case EXC_DTMISS:
printf(" virtual address = 0x%" PRIxPTR "\n", frame->dar);
#ifdef AIM
printf(" dsisr = 0x%" PRIxPTR "\n",
frame->cpu.aim.dsisr);
#endif
break;
case EXC_ITMISS:
case EXC_ISE:
case EXC_ISI:
case EXC_ITMISS:
printf(" virtual address = 0x%" PRIxPTR "\n", frame->srr0);
break;
}
#ifdef BOOKE
printf(" esr = 0x%" PRIxPTR "\n",
frame->cpu.booke.esr);
#endif
printf(" srr0 = 0x%" PRIxPTR "\n", frame->srr0);
printf(" srr1 = 0x%" PRIxPTR "\n", frame->srr1);
printf(" lr = 0x%" PRIxPTR "\n", frame->lr);